Fixes PR29134.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
lgtm
It looks like we already generate llvm.assume() for these and that eventually behaves the same as the unreachable instruction. Neat. :)
Paths
| Differential D43221
Teach Wreturn-type, Wunreachable-code, and alpha.deadcode.UnreachableCode to treat __assume(0) like __builtin_unreachable. ClosedPublic Authored by thakis on Feb 12 2018, 9:09 PM.
Diff Detail Event TimelineComment Actions lgtm It looks like we already generate llvm.assume() for these and that eventually behaves the same as the unreachable instruction. Neat. :) This revision is now accepted and ready to land.Feb 13 2018, 12:43 PM
Revision Contents
Diff 133989 include/clang/AST/Expr.h
lib/AST/Expr.cpp
lib/Analysis/CFG.cpp
lib/Analysis/ReachableCode.cpp
lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp
test/Analysis/unreachable-code-path.c
test/Sema/return.c
test/Sema/warn-unreachable.c
|