summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp
diff options
context:
space:
mode:
authorJordan Rose <jordan_rose@apple.com>2012-08-21 20:52:19 +0000
committerJordan Rose <jordan_rose@apple.com>2012-08-21 20:52:19 +0000
commit81125c449708be9fa520ee6e823dd29f9023e930 (patch)
tree090d996d97409a9e1dfcae0bf8ad7d24340618cc /clang/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp
parentda32944cac23abc9d4f4c2766d70c2fda38b56da (diff)
downloadbcm5719-llvm-81125c449708be9fa520ee6e823dd29f9023e930.tar.gz
bcm5719-llvm-81125c449708be9fa520ee6e823dd29f9023e930.zip
[analyzer] Push "references are non-null" knowledge up to the common parent.
This reduces duplication across the Basic and Range constraint managers, and keeps their internals free of dealing with the semantics of C++. It's still a little unfortunate that the constraint manager is dealing with this at all, but this is pretty much the only place to put it so that it will apply to all symbolic values, even when embedded in larger expressions. llvm-svn: 162313
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp5
1 files changed, 0 insertions, 5 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp b/clang/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp
index fb6d4be09da..9a3c5d19224 100644
--- a/clang/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp
+++ b/clang/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp
@@ -363,11 +363,6 @@ const llvm::APSInt* BasicConstraintManager::getSymVal(ProgramStateRef state,
bool BasicConstraintManager::isNotEqual(ProgramStateRef state,
SymbolRef sym,
const llvm::APSInt& V) const {
- // Special case: references are known to be non-zero.
- if (sym->getType(getBasicVals().getContext())->isReferenceType())
- if (V == 0)
- return true;
-
// Retrieve the NE-set associated with the given symbol.
const ConstNotEqTy::data_type* T = state->get<ConstNotEq>(sym);
OpenPOWER on IntegriCloud