[cfe-commits] r57964 - in /cfe/trunk: include/clang/Analysis/PathSensitive/GRState.h include/clang/Analysis/PathSensitive/Store.h lib/Analysis/BasicStore.cpp lib/Analysis/GRExprEngine.cpp

Zhongxing Xu xuzhongxing at gmail.com
Wed Oct 22 02:00:20 PDT 2008


Author: zhongxingxu
Date: Wed Oct 22 04:00:19 2008
New Revision: 57964

URL: http://llvm.org/viewvc/llvm-project?rev=57964&view=rev
Log:
Adjust parameter order to more natural one.

Modified:
    cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h
    cfe/trunk/include/clang/Analysis/PathSensitive/Store.h
    cfe/trunk/lib/Analysis/BasicStore.cpp
    cfe/trunk/lib/Analysis/GRExprEngine.cpp

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h?rev=57964&r1=57963&r2=57964&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/GRState.h Wed Oct 22 04:00:19 2008
@@ -352,8 +352,8 @@
   }
   
   // 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.

Modified: cfe/trunk/include/clang/Analysis/PathSensitive/Store.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Analysis/PathSensitive/Store.h?rev=57964&r1=57963&r2=57964&view=diff

==============================================================================
--- cfe/trunk/include/clang/Analysis/PathSensitive/Store.h (original)
+++ cfe/trunk/include/clang/Analysis/PathSensitive/Store.h Wed Oct 22 04:00:19 2008
@@ -53,10 +53,10 @@
   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;

Modified: cfe/trunk/lib/Analysis/BasicStore.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BasicStore.cpp?rev=57964&r1=57963&r2=57964&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/BasicStore.cpp (original)
+++ cfe/trunk/lib/Analysis/BasicStore.cpp Wed Oct 22 04:00:19 2008
@@ -49,7 +49,7 @@
   
   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::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;

Modified: cfe/trunk/lib/Analysis/GRExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/GRExprEngine.cpp?rev=57964&r1=57963&r2=57964&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Wed Oct 22 04:00:19 2008
@@ -899,7 +899,7 @@
     // 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));





More information about the cfe-commits mailing list