[cfe-commits] r73951 - in /cfe/trunk: include/clang/Analysis/PathSensitive/ValueManager.h lib/Analysis/GRExprEngine.cpp lib/Analysis/RegionStore.cpp lib/Analysis/SVals.cpp
Zhongxing Xu
xuzhongxing at gmail.com
Mon Jun 22 23:13:19 PDT 2009
Author: zhongxingxu
Date: Tue Jun 23 01:13:19 2009
New Revision: 73951
URL: http://llvm.org/viewvc/llvm-project?rev=73951&view=rev
Log:
ValueManager::makeNonLoc -> ValueManager::makeIntVal
Clean up code with ValueManager.
Modified:
cfe/trunk/include/clang/Analysis/PathSensitive/ValueManager.h
cfe/trunk/lib/Analysis/GRExprEngine.cpp
cfe/trunk/lib/Analysis/RegionStore.cpp
cfe/trunk/lib/Analysis/SVals.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=73951&r1=73950&r2=73951&view=diff
==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/ValueManager.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/ValueManager.h Tue Jun 23 01:13:19 2009
@@ -90,7 +90,7 @@
NonLoc makeNonLoc(SymbolRef sym);
- NonLoc makeNonLoc(const llvm::APSInt& V);
+ NonLoc makeIntVal(const llvm::APSInt& V);
NonLoc makeNonLoc(const SymExpr *lhs, BinaryOperator::Opcode op,
const llvm::APSInt& rhs, QualType T);
Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=73951&r1=73950&r2=73951&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Tue Jun 23 01:13:19 2009
@@ -944,8 +944,7 @@
} else if (const EnumConstantDecl* ED = dyn_cast<EnumConstantDecl>(D)) {
assert(!asLValue && "EnumConstantDecl does not have lvalue.");
- BasicValueFactory& BasicVals = StateMgr.getBasicVals();
- SVal V = nonloc::ConcreteInt(BasicVals.getValue(ED->getInitVal()));
+ SVal V = ValMgr.makeIntVal(ED->getInitVal());
MakeNode(Dst, Ex, Pred, state->bindExpr(Ex, V));
return;
Modified: cfe/trunk/lib/Analysis/RegionStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/RegionStore.cpp?rev=73951&r1=73950&r2=73951&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Tue Jun 23 01:13:19 2009
@@ -1100,7 +1100,7 @@
if (j >= len)
break;
- SVal Idx = ValMgr.makeNonLoc(i);
+ SVal Idx = ValMgr.makeIntVal(i);
ElementRegion* ER = MRMgr.getElementRegion(ElementTy, Idx,R,getContext());
SVal V = NonLoc::MakeVal(getBasicVals(), str[j], sizeof(char)*8, true);
@@ -1118,7 +1118,7 @@
if (VI == VE)
break;
- SVal Idx = ValMgr.makeNonLoc(i);
+ SVal Idx = ValMgr.makeIntVal(i);
ElementRegion* ER = MRMgr.getElementRegion(ElementTy, Idx, R, getContext());
if (CAT->getElementType()->isStructureType())
@@ -1131,7 +1131,7 @@
// to 0.
if (ElementTy->isIntegerType()) {
while (i < Size) {
- SVal Idx = ValMgr.makeNonLoc(i);
+ SVal Idx = ValMgr.makeIntVal(i);
ElementRegion* ER = MRMgr.getElementRegion(ElementTy, Idx,R,getContext());
SVal V = ValMgr.makeZeroVal(ElementTy);
state = Bind(state, Loc::MakeVal(ER), V);
Modified: cfe/trunk/lib/Analysis/SVals.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/SVals.cpp?rev=73951&r1=73950&r2=73951&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/SVals.cpp (original)
+++ cfe/trunk/lib/Analysis/SVals.cpp Tue Jun 23 01:13:19 2009
@@ -264,7 +264,7 @@
return nonloc::SymbolVal(sym);
}
-NonLoc ValueManager::makeNonLoc(const APSInt& V) {
+NonLoc ValueManager::makeIntVal(const APSInt& V) {
return nonloc::ConcreteInt(BasicVals.getValue(V));
}
More information about the cfe-commits
mailing list