From 58fc86d68d53eb6c47cc34974b6f37627a5f386c Mon Sep 17 00:00:00 2001 From: Jordan Rose Date: Tue, 21 Aug 2012 20:52:19 +0000 Subject: [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 --- lib/StaticAnalyzer/Core/BasicConstraintManager.cpp | 5 ----- 1 file changed, 5 deletions(-) (limited to 'lib/StaticAnalyzer/Core/BasicConstraintManager.cpp') 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(sym); -- cgit v1.2.3-18-g5258