diff options
author | Anna Zaks <ganna@apple.com> | 2011-12-05 18:58:25 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-12-05 18:58:25 +0000 |
commit | a636fbe73f1ee04d1b3172ffc2914e08a78ec490 (patch) | |
tree | e8d42b749b723166db8117eb3b5289d537bfbb84 /clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp | |
parent | 51090d5f7f4246c38d746bbb10642f64c51d2329 (diff) | |
download | bcm5719-llvm-a636fbe73f1ee04d1b3172ffc2914e08a78ec490.tar.gz bcm5719-llvm-a636fbe73f1ee04d1b3172ffc2914e08a78ec490.zip |
[analyzer] Remove all uses of ConstraintManager::canResonAbout() from
ExprEngine.
Teach SimpleConstraintManager::assumeSymRel() to propagate constraints
to symbolic expressions.
+ One extra warning (real bug) is now generated due to enhanced
assumeSymRel().
llvm-svn: 145832
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp b/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp index f7924319e5b..2e6f33353ec 100644 --- a/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp +++ b/clang/lib/StaticAnalyzer/Core/SimpleSValBuilder.cpp @@ -260,9 +260,10 @@ SVal SimpleSValBuilder::MakeSymIntVal(const SymExpr *LHS, // Wrap the LHS up in a NonLoc again and let evalCastFromNonLoc do the // dirty work. if (isIdempotent) { - if (SymbolRef LHSSym = dyn_cast<SymbolData>(LHS)) - return evalCastFromNonLoc(nonloc::SymbolVal(LHSSym), resultTy); - return evalCastFromNonLoc(nonloc::SymExprVal(LHS), resultTy); + if (isa<SymbolData>(LHS)) + return evalCastFromNonLoc(nonloc::SymbolVal(LHS), resultTy); + else + return evalCastFromNonLoc(nonloc::SymExprVal(LHS), resultTy); } // If we reach this point, the expression cannot be simplified. |