[cfe-commits] r65987 - /cfe/trunk/lib/Analysis/RegionStore.cpp

Ted Kremenek kremenek at apple.com
Tue Mar 3 16:23:05 PST 2009


Author: kremenek
Date: Tue Mar  3 18:23:05 2009
New Revision: 65987

URL: http://llvm.org/viewvc/llvm-project?rev=65987&view=rev
Log:
RegionStore: Handle implicit parameters.

Modified:
    cfe/trunk/lib/Analysis/RegionStore.cpp

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

==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Tue Mar  3 18:23:05 2009
@@ -704,15 +704,17 @@
   if (const VarRegion* VR = dyn_cast<VarRegion>(R)) {
     const VarDecl *VD = VR->getDecl();
     
-    if (isa<ParmVarDecl>(VD) || VD->hasGlobalStorage()) {
+    if (VD == SelfDecl)
+      return loc::MemRegionVal(getSelfRegion(0));
+    
+    if (isa<ParmVarDecl>(VD) || isa<ImplicitParamDecl>(VD) ||
+        VD->hasGlobalStorage()) {
       QualType VTy = VD->getType();
       if (Loc::IsLocType(VTy) || VTy->isIntegerType())
         return SVal::GetRValueSymbolVal(getSymbolManager(), VR);
       else
         return UnknownVal();
     }
-    else if (VD == SelfDecl)
-      return loc::MemRegionVal(getSelfRegion(0));
   }
   
 





More information about the cfe-commits mailing list