summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2011-12-05 18:58:30 +0000
committerAnna Zaks <ganna@apple.com>2011-12-05 18:58:30 +0000
commitd066f79c80a0e40bf0a10c15d21621fd5742f352 (patch)
tree093d089461833fe660ee82e8e4f46f347e4c7868 /clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
parenta636fbe73f1ee04d1b3172ffc2914e08a78ec490 (diff)
downloadbcm5719-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/SValBuilder.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/SValBuilder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp b/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
index 331f5934b57..617e0ddc729 100644
--- a/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
+++ b/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp
@@ -45,7 +45,7 @@ NonLoc SValBuilder::makeNonLoc(const SymExpr *lhs, BinaryOperator::Opcode op,
// BasicValueFactory again.
assert(lhs);
assert(!Loc::isLocType(type));
- return nonloc::SymExprVal(SymMgr.getSymIntExpr(lhs, op, rhs, type));
+ return nonloc::SymbolVal(SymMgr.getSymIntExpr(lhs, op, rhs, type));
}
NonLoc SValBuilder::makeNonLoc(const SymExpr *lhs, BinaryOperator::Opcode op,
@@ -53,7 +53,7 @@ NonLoc SValBuilder::makeNonLoc(const SymExpr *lhs, BinaryOperator::Opcode op,
assert(lhs && rhs);
assert(SymMgr.getType(lhs) == SymMgr.getType(rhs));
assert(!Loc::isLocType(type));
- return nonloc::SymExprVal(SymMgr.getSymSymExpr(lhs, op, rhs, type));
+ return nonloc::SymbolVal(SymMgr.getSymSymExpr(lhs, op, rhs, type));
}
OpenPOWER on IntegriCloud