aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/Environment.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-02-19 01:08:41 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-02-19 01:08:41 +0000
commit7ff07dce18a7c693fe1a15bd7b790d8de9d21e92 (patch)
treef9ffe127fe2b3a327b2d9613f99838161e887114 /lib/StaticAnalyzer/Core/Environment.cpp
parentb76fdf69df5f35c3af9ebe3afc72b0d3c9bf76e7 (diff)
[analyzer] Fix crash when analyzing C++ code.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126007 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/Environment.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/Environment.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/StaticAnalyzer/Core/Environment.cpp b/lib/StaticAnalyzer/Core/Environment.cpp
index a0a93c68a3..33f1945ce7 100644
--- a/lib/StaticAnalyzer/Core/Environment.cpp
+++ b/lib/StaticAnalyzer/Core/Environment.cpp
@@ -56,6 +56,7 @@ SVal Environment::getSVal(const Stmt *E, SValBuilder& svalBuilder) const {
return svalBuilder.makeIntVal(cast<IntegerLiteral>(E));
}
case Stmt::ImplicitCastExprClass:
+ case Stmt::CXXFunctionalCastExprClass:
case Stmt::CStyleCastExprClass: {
// We blast through no-op casts to get the descendant
// subexpression that has a value.
@@ -75,9 +76,6 @@ SVal Environment::getSVal(const Stmt *E, SValBuilder& svalBuilder) const {
case Stmt::CXXBindTemporaryExprClass:
E = cast<CXXBindTemporaryExpr>(E)->getSubExpr();
continue;
- case Stmt::CXXFunctionalCastExprClass:
- E = cast<CXXFunctionalCastExpr>(E)->getSubExpr();
- continue;
// Handle all other Stmt* using a lookup.
default:
break;