diff options
author | Jordy Rose <jediknil@belkadan.com> | 2011-06-10 08:49:37 +0000 |
---|---|---|
committer | Jordy Rose <jediknil@belkadan.com> | 2011-06-10 08:49:37 +0000 |
commit | 1734737d9f9ebeb7938a1c66be75374da63cabcd (patch) | |
tree | e76b8d8692d058ec011d57cf4a235527313a6a1d /clang/lib/StaticAnalyzer/Core/Environment.cpp | |
parent | 82818e4d9525a396cc08a321a62c1538cf56d003 (diff) | |
download | bcm5719-llvm-1734737d9f9ebeb7938a1c66be75374da63cabcd.tar.gz bcm5719-llvm-1734737d9f9ebeb7938a1c66be75374da63cabcd.zip |
[analyzer] PR8962 again. Ban ParenExprs (and friends) from block-level expressions (by calling IgnoreParens before adding expressions to blocks). Undo 132769 (LiveVariables' local IgnoreParens), since it's no longer necessary.
Also, have Environment stop looking through NoOp casts; it didn't match the behavior of LiveVariables. And once that's gone, the whole cast block of that switch is unnecessary.
llvm-svn: 132840
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/Environment.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/Environment.cpp | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/Environment.cpp b/clang/lib/StaticAnalyzer/Core/Environment.cpp index e9f5016b36c..48f126bfd86 100644 --- a/clang/lib/StaticAnalyzer/Core/Environment.cpp +++ b/clang/lib/StaticAnalyzer/Core/Environment.cpp @@ -77,21 +77,6 @@ SVal Environment::getSVal(const Stmt *E, SValBuilder& svalBuilder, // For special C0xx nullptr case, make a null pointer SVal. case Stmt::CXXNullPtrLiteralExprClass: return svalBuilder.makeNull(); - case Stmt::ImplicitCastExprClass: - case Stmt::CXXFunctionalCastExprClass: - case Stmt::CStyleCastExprClass: { - // We blast through no-op casts to get the descendant - // subexpression that has a value. - const CastExpr* C = cast<CastExpr>(E); - QualType CT = C->getType(); - if (CT->isVoidType()) - return UnknownVal(); - if (C->getCastKind() == CK_NoOp) { - E = C->getSubExpr(); - continue; - } - break; - } case Stmt::ExprWithCleanupsClass: E = cast<ExprWithCleanups>(E)->getSubExpr(); continue; |