diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-11-10 06:34:14 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2011-11-10 06:34:14 +0000 |
commit | 180f47959a066795cc0f409433023af448bb0328 (patch) | |
tree | e5a8c5e3c47c68d4ee460e09489ebac5cf60b8a4 /lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp | |
parent | 64b4b43a23aa8b8009470e3cc451333f623d7d58 (diff) |
Constant expression evaluation: support for evaluation of structs and unions of
literal types, as well as derived-to-base casts for lvalues and
derived-to-virtual-base casts.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@144265 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp b/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp index ae28300d13..97cc44f0cb 100644 --- a/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp +++ b/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp @@ -83,8 +83,6 @@ void UnreachableCodeChecker::checkEndAnalysis(ExplodedGraph &G, if (!C || !PM) return; - ASTContext &Ctx = B.getContext(); - // Find CFGBlocks that were not covered by any node for (CFG::const_iterator I = C->begin(), E = C->end(); I != E; ++I) { const CFGBlock *CB = *I; @@ -117,7 +115,7 @@ void UnreachableCodeChecker::checkEndAnalysis(ExplodedGraph &G, ci != ce; ++ci) { if (const CFGStmt *S = (*ci).getAs<CFGStmt>()) if (const CallExpr *CE = dyn_cast<CallExpr>(S->getStmt())) { - if (CE->isBuiltinCall(Ctx) == Builtin::BI__builtin_unreachable) { + if (CE->isBuiltinCall() == Builtin::BI__builtin_unreachable) { foundUnreachable = true; break; } |