]> granicus.if.org Git - clang/commitdiff
Adjust parameter order to more natural one.
authorZhongxing Xu <xuzhongxing@gmail.com>
Wed, 22 Oct 2008 09:00:19 +0000 (09:00 +0000)
committerZhongxing Xu <xuzhongxing@gmail.com>
Wed, 22 Oct 2008 09:00:19 +0000 (09:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@57964 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Analysis/PathSensitive/GRState.h
include/clang/Analysis/PathSensitive/Store.h
lib/Analysis/BasicStore.cpp
lib/Analysis/GRExprEngine.cpp

index 1b3b4a599e5acd5640c84ec0925543a12ebc3b8b..87c180db551f9cc9c5b2a3c8ba077cfc9a2e3f2f 100644 (file)
@@ -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.
index e6599ef078e4b57df92f4be169e9ed8d992be4e4..5a93e0e5ea034038f3513f3406edfcd11fee5161 100644 (file)
@@ -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;
index 2a003335b6ba98bbcb0c80f607ce7187c946d7fd..cdecb1931943bb03eb08f6b64749db709df8fc5e 100644 (file)
@@ -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;
index ebf8df968fb8b890ebe74414298abf3c6616aa65..ae474bef61e074ae752d2aa990c12ddfe40ece3f 100644 (file)
@@ -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));