aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/BasicObjCFoundationChecks.cpp
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2008-10-17 05:57:07 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2008-10-17 05:57:07 +0000
commit1c96b24285d05c0eac455ae96d7c9ff43d42bc96 (patch)
tree4d2ab34daff9c66fe996657201955fb24de6cd84 /lib/Analysis/BasicObjCFoundationChecks.cpp
parentef8b28e9459e729b7bd8c826d204621b039611fa (diff)
This patch did the following renaming. There should be no functional changes.
RVal => SVal LVal => Loc NonLVal => NonLoc lval => loc nonlval => nonloc git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57671 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BasicObjCFoundationChecks.cpp')
-rw-r--r--lib/Analysis/BasicObjCFoundationChecks.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/Analysis/BasicObjCFoundationChecks.cpp b/lib/Analysis/BasicObjCFoundationChecks.cpp
index b3f534d1af..8e322189e6 100644
--- a/lib/Analysis/BasicObjCFoundationChecks.cpp
+++ b/lib/Analysis/BasicObjCFoundationChecks.cpp
@@ -118,7 +118,7 @@ class VISIBILITY_HIDDEN BasicObjCFoundationChecks : public GRSimpleAPICheck {
typedef std::vector<BugReport*> ErrorsTy;
ErrorsTy Errors;
- RVal GetRVal(const GRState* St, Expr* E) { return VMgr->GetRVal(St, E); }
+ SVal GetSVal(const GRState* St, Expr* E) { return VMgr->GetSVal(St, E); }
bool isNSString(ObjCInterfaceType* T, const char* suffix);
bool AuditNSString(NodeTy* N, ObjCMessageExpr* ME);
@@ -193,8 +193,8 @@ bool BasicObjCFoundationChecks::Audit(ExplodedNode<GRState>* N,
return false;
}
-static inline bool isNil(RVal X) {
- return isa<lval::ConcreteInt>(X);
+static inline bool isNil(SVal X) {
+ return isa<loc::ConcreteInt>(X);
}
//===----------------------------------------------------------------------===//
@@ -214,7 +214,7 @@ bool BasicObjCFoundationChecks::CheckNilArg(NodeTy* N, unsigned Arg) {
Expr * E = ME->getArg(Arg);
- if (isNil(GetRVal(N->getState(), E))) {
+ if (isNil(GetSVal(N->getState(), E))) {
WarnNilArg(N, ME, Arg);
return true;
}
@@ -350,7 +350,7 @@ class VISIBILITY_HIDDEN AuditCFNumberCreate : public GRSimpleAPICheck {
IdentifierInfo* II;
GRStateManager* VMgr;
- RVal GetRVal(const GRState* St, Expr* E) { return VMgr->GetRVal(St, E); }
+ SVal GetSVal(const GRState* St, Expr* E) { return VMgr->GetSVal(St, E); }
public:
@@ -468,18 +468,18 @@ static const char* GetCFNumberTypeStr(uint64_t i) {
bool AuditCFNumberCreate::Audit(ExplodedNode<GRState>* N,GRStateManager&){
CallExpr* CE = cast<CallExpr>(cast<PostStmt>(N->getLocation()).getStmt());
Expr* Callee = CE->getCallee();
- RVal CallV = GetRVal(N->getState(), Callee);
- lval::FuncVal* FuncV = dyn_cast<lval::FuncVal>(&CallV);
+ SVal CallV = GetSVal(N->getState(), Callee);
+ loc::FuncVal* FuncV = dyn_cast<loc::FuncVal>(&CallV);
if (!FuncV || FuncV->getDecl()->getIdentifier() != II || CE->getNumArgs()!=3)
return false;
// Get the value of the "theType" argument.
- RVal TheTypeVal = GetRVal(N->getState(), CE->getArg(1));
+ SVal TheTypeVal = GetSVal(N->getState(), CE->getArg(1));
// FIXME: We really should allow ranges of valid theType values, and
// bifurcate the state appropriately.
- nonlval::ConcreteInt* V = dyn_cast<nonlval::ConcreteInt>(&TheTypeVal);
+ nonloc::ConcreteInt* V = dyn_cast<nonloc::ConcreteInt>(&TheTypeVal);
if (!V)
return false;
@@ -494,11 +494,11 @@ bool AuditCFNumberCreate::Audit(ExplodedNode<GRState>* N,GRStateManager&){
// Look at the value of the integer being passed by reference. Essentially
// we want to catch cases where the value passed in is not equal to the
// size of the type being created.
- RVal TheValueExpr = GetRVal(N->getState(), CE->getArg(2));
+ SVal TheValueExpr = GetSVal(N->getState(), CE->getArg(2));
// FIXME: Eventually we should handle arbitrary locations. We can do this
// by having an enhanced memory model that does low-level typing.
- lval::MemRegionVal* LV = dyn_cast<lval::MemRegionVal>(&TheValueExpr);
+ loc::MemRegionVal* LV = dyn_cast<loc::MemRegionVal>(&TheValueExpr);
if (!LV)
return false;