diff options
author | Jordan Rose <jordan_rose@apple.com> | 2012-08-21 20:52:19 +0000 |
---|---|---|
committer | Jordan Rose <jordan_rose@apple.com> | 2012-08-21 20:52:19 +0000 |
commit | 58fc86d68d53eb6c47cc34974b6f37627a5f386c (patch) | |
tree | 7de669d7b0955cbe94c4808e3eaa60dbbf8b1d80 /lib/StaticAnalyzer/Core/BasicConstraintManager.cpp | |
parent | 51a6b3f58b0dbbc51a77b8f4a509720954406ceb (diff) |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162313 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/BasicConstraintManager.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/BasicConstraintManager.cpp | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp b/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp index fb6d4be09d..9a3c5d1922 100644 --- a/lib/StaticAnalyzer/Core/BasicConstraintManager.cpp +++ b/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); |