diff options
author | Anna Zaks <ganna@apple.com> | 2011-12-05 18:58:30 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2011-12-05 18:58:30 +0000 |
commit | d066f79c80a0e40bf0a10c15d21621fd5742f352 (patch) | |
tree | 093d089461833fe660ee82e8e4f46f347e4c7868 /clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | |
parent | a636fbe73f1ee04d1b3172ffc2914e08a78ec490 (diff) | |
download | bcm5719-llvm-d066f79c80a0e40bf0a10c15d21621fd5742f352.tar.gz bcm5719-llvm-d066f79c80a0e40bf0a10c15d21621fd5742f352.zip |
[analyzer] Unify SymbolVal and SymExprVal under a single SymbolVal
class.
We are going into the direction of handling SymbolData and other SymExpr
uniformly, so it makes less sense to keep two different SVal classes.
For example, the checkers would have to take an extra step to reason
about each type separately.
The classes have the same members, we were just using the SVal kind
field for easy differentiation in 3 switch statements. The switch
statements look more ugly now, but we can make the code more readable in
other ways, for example, moving some code into separate functions.
llvm-svn: 145833
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngine.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp index f5d26c96455..9b0e66fffbe 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp +++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp @@ -1665,7 +1665,8 @@ void ExprEngine::evalEagerlyAssume(ExplodedNodeSet &Dst, ExplodedNodeSet &Src, const ProgramState *state = Pred->getState(); SVal V = state->getSVal(Ex); - if (nonloc::SymExprVal *SEV = dyn_cast<nonloc::SymExprVal>(&V)) { + nonloc::SymbolVal *SEV = dyn_cast<nonloc::SymbolVal>(&V); + if (SEV && SEV->isExpression()) { const std::pair<const ProgramPointTag *, const ProgramPointTag*> &tags = getEagerlyAssumeTags(); |