summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2013-12-19 22:32:39 +0000
committerJordan Rose <jordan_rose@apple.com>2013-12-19 22:32:39 +0000
commit7ae33624585e1c6f0e4ceab28eb0c860aab67bfc (patch)
tree0296f38e9724d575603690a7e4deb1cc3cdec0df /clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
parenta1a22edd179f9b8452dc67b8bc37f8a2b946594f (diff)
downloadbcm5719-llvm-7ae33624585e1c6f0e4ceab28eb0c860aab67bfc.tar.gz
bcm5719-llvm-7ae33624585e1c6f0e4ceab28eb0c860aab67bfc.zip
[analyzer] Always use 'bool' as the SValBuilder condition type in C++.
We have assertions for this, but a few edge cases had snuck through where we were still unconditionally using 'int'. <rdar://problem/15703011> llvm-svn: 197733
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngine.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngine.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
index 36be970485e..e7b1e1fde8d 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -118,7 +118,7 @@ ProgramStateRef ExprEngine::getInitialState(const LocationContext *InitLoc) {
SVal V = state->getSVal(loc::MemRegionVal(R));
SVal Constraint_untested = evalBinOp(state, BO_GT, V,
svalBuilder.makeZeroVal(T),
- getContext().IntTy);
+ svalBuilder.getConditionType());
Optional<DefinedOrUnknownSVal> Constraint =
Constraint_untested.getAs<DefinedOrUnknownSVal>();
OpenPOWER on IntegriCloud