[cfe-commits] r91471 - in /cfe/trunk: include/clang/Analysis/PathSensitive/ValueManager.h lib/Analysis/RegionStore.cpp
Ted Kremenek
kremenek at apple.com
Tue Dec 15 15:23:27 PST 2009
Author: kremenek
Date: Tue Dec 15 17:23:27 2009
New Revision: 91471
URL: http://llvm.org/viewvc/llvm-project?rev=91471&view=rev
Log:
Remove ValueManager::getRegionValueSymbolValOrUnknown(). It was just extra veneer on top of getRegionValueSymbolVal().
Modified:
cfe/trunk/include/clang/Analysis/PathSensitive/ValueManager.h
cfe/trunk/lib/Analysis/RegionStore.cpp
Modified: cfe/trunk/include/clang/Analysis/PathSensitive/ValueManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/ValueManager.h?rev=91471&r1=91470&r2=91471&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/ValueManager.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/ValueManager.h Tue Dec 15 17:23:27 2009
@@ -97,13 +97,6 @@
DefinedOrUnknownSVal getRegionValueSymbolVal(const MemRegion *R,
QualType T = QualType());
- DefinedOrUnknownSVal getRegionValueSymbolValOrUnknown(const MemRegion *R,
- QualType T) {
- if (SymMgr.canSymbolicate(T))
- return getRegionValueSymbolVal(R, T);
- return UnknownVal();
- }
-
DefinedOrUnknownSVal getConjuredSymbolVal(const void *SymbolTag,
const Expr *E, unsigned Count);
DefinedOrUnknownSVal getConjuredSymbolVal(const void *SymbolTag,
Modified: cfe/trunk/lib/Analysis/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=91471&r1=91470&r2=91471&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Tue Dec 15 17:23:27 2009
@@ -987,12 +987,12 @@
assert(!isa<UnknownVal>(L) && "location unknown");
assert(!isa<UndefinedVal>(L) && "location undefined");
-
+
// FIXME: Is this even possible? Shouldn't this be treated as a null
// dereference at a higher level?
if (isa<loc::ConcreteInt>(L))
return SValuator::CastResult(state, UndefinedVal());
-
+
const MemRegion *MR = cast<loc::MemRegionVal>(L).getRegion();
// FIXME: return symbolic value for these cases.
@@ -1090,8 +1090,7 @@
}
// All other values are symbolic.
- return SValuator::CastResult(state,
- ValMgr.getRegionValueSymbolValOrUnknown(R, RTy));
+ return SValuator::CastResult(state, ValMgr.getRegionValueSymbolVal(R, RTy));
}
std::pair<const GRState*, const MemRegion*>
@@ -1256,7 +1255,7 @@
}
// All other values are symbolic.
- return ValMgr.getRegionValueSymbolValOrUnknown(R, Ty);
+ return ValMgr.getRegionValueSymbolVal(R, Ty);
}
SVal RegionStoreManager::RetrieveObjCIvar(const GRState* state,
@@ -1296,7 +1295,7 @@
if (R->hasGlobalsOrParametersStorage() ||
isa<UnknownSpaceRegion>(R->getMemorySpace()))
- return ValMgr.getRegionValueSymbolValOrUnknown(R, VD->getType());
+ return ValMgr.getRegionValueSymbolVal(R, VD->getType());
return UndefinedVal();
}
@@ -1307,7 +1306,7 @@
QualType valTy = R->getValueType(getContext());
// All other values are symbolic.
- return ValMgr.getRegionValueSymbolValOrUnknown(R, valTy);
+ return ValMgr.getRegionValueSymbolVal(R, valTy);
}
SVal RegionStoreManager::RetrieveStruct(const GRState *state,
More information about the cfe-commits
mailing list