aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhongxing Xu <xuzhongxing@gmail.com>2008-10-22 09:00:19 +0000
committerZhongxing Xu <xuzhongxing@gmail.com>2008-10-22 09:00:19 +0000
commitc92e5feb73a99e0e44d00c3ce0275d32bc56d7c6 (patch)
tree17857e3ed86416485364989f82563bd6d6c7a31f
parented340f7d26b3a8fedeb2aebeb5b23429e79d18e0 (diff)
Adjust parameter order to more natural one.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57964 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Analysis/PathSensitive/GRState.h4
-rw-r--r--include/clang/Analysis/PathSensitive/Store.h6
-rw-r--r--lib/Analysis/BasicStore.cpp6
-rw-r--r--lib/Analysis/GRExprEngine.cpp2
4 files changed, 9 insertions, 9 deletions
diff --git a/include/clang/Analysis/PathSensitive/GRState.h b/include/clang/Analysis/PathSensitive/GRState.h
index 1b3b4a599e..87c180db55 100644
--- a/include/clang/Analysis/PathSensitive/GRState.h
+++ b/include/clang/Analysis/PathSensitive/GRState.h
@@ -352,8 +352,8 @@ public:
}
// Get the lvalue for a field reference.
- SVal GetLValue(const GRState* St, const FieldDecl* D, SVal Base) {
- return StoreMgr->getLValueField(St, D, Base);
+ SVal GetLValue(const GRState* St, SVal Base, const FieldDecl* D) {
+ return StoreMgr->getLValueField(St, Base, D);
}
// Get the lvalue for an array index.
diff --git a/include/clang/Analysis/PathSensitive/Store.h b/include/clang/Analysis/PathSensitive/Store.h
index e6599ef078..5a93e0e5ea 100644
--- a/include/clang/Analysis/PathSensitive/Store.h
+++ b/include/clang/Analysis/PathSensitive/Store.h
@@ -53,10 +53,10 @@ public:
virtual SVal getLValueVar(const GRState* St, const VarDecl* VD) = 0;
virtual SVal getLValueIvar(const GRState* St, const ObjCIvarDecl* D,
- SVal Base)=0;
+ SVal Base) = 0;
- virtual SVal getLValueField(const GRState* St, const FieldDecl* D,
- SVal Base) = 0;
+ virtual SVal getLValueField(const GRState* St, SVal Base,
+ const FieldDecl* D) = 0;
virtual SVal getLValueElement(const GRState* St,
SVal Base, SVal Offset) = 0;
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp
index 2a003335b6..cdecb19319 100644
--- a/lib/Analysis/BasicStore.cpp
+++ b/lib/Analysis/BasicStore.cpp
@@ -49,7 +49,7 @@ public:
SVal getLValueVar(const GRState* St, const VarDecl* VD);
SVal getLValueIvar(const GRState* St, const ObjCIvarDecl* D, SVal Base);
- SVal getLValueField(const GRState* St, const FieldDecl* D, SVal Base);
+ SVal getLValueField(const GRState* St, SVal Base, const FieldDecl* D);
SVal getLValueElement(const GRState* St, SVal Base, SVal Offset);
virtual Store
@@ -89,8 +89,8 @@ SVal BasicStoreManager::getLValueIvar(const GRState* St, const ObjCIvarDecl* D,
}
-SVal BasicStoreManager::getLValueField(const GRState* St, const FieldDecl* D,
- SVal Base) {
+SVal BasicStoreManager::getLValueField(const GRState* St, SVal Base,
+ const FieldDecl* D) {
if (Base.isUnknownOrUndef())
return Base;
diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp
index ebf8df968f..ae474bef61 100644
--- a/lib/Analysis/GRExprEngine.cpp
+++ b/lib/Analysis/GRExprEngine.cpp
@@ -899,7 +899,7 @@ void GRExprEngine::VisitMemberExpr(MemberExpr* M, NodeTy* Pred,
// FIXME: Should we insert some assumption logic in here to determine
// if "Base" is a valid piece of memory? Before we put this assumption
// later when using FieldOffset lvals (which we no longer have).
- SVal L = StateMgr.GetLValue(St, M->getMemberDecl(), GetSVal(St, Base));
+ SVal L = StateMgr.GetLValue(St, GetSVal(St, Base), M->getMemberDecl());
if (asLValue)
MakeNode(Dst, M, *I, SetSVal(St, M, L));