]> granicus.if.org Git - clang/commitdiff
RegionStore: Handle implicit parameters.
authorTed Kremenek <kremenek@apple.com>
Wed, 4 Mar 2009 00:23:05 +0000 (00:23 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 4 Mar 2009 00:23:05 +0000 (00:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65987 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/RegionStore.cpp

index 7bae5e4487bf76c2198b1599583186db7040575a..a05a42fdc39904443b3c6477799cfe4ae3280763 100644 (file)
@@ -704,15 +704,17 @@ SVal RegionStoreManager::Retrieve(const GRState* St, Loc L, QualType T) {
   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));
   }