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

Zhongxing Xu xuzhongxing at gmail.com
Thu Feb 19 01:56:13 PST 2009


Author: zhongxingxu
Date: Thu Feb 19 03:56:08 2009
New Revision: 65041

URL: http://llvm.org/viewvc/llvm-project?rev=65041&view=rev
Log:
only track integer and pointer values for now.

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=65041&r1=65040&r2=65041&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/RegionStore.cpp (original)
+++ cfe/trunk/lib/Analysis/RegionStore.cpp Thu Feb 19 03:56:08 2009
@@ -620,8 +620,13 @@
   if (const VarRegion* VR = dyn_cast<VarRegion>(R)) {
     const VarDecl *VD = VR->getDecl();
     
-    if (isa<ParmVarDecl>(VD))
-      return SVal::GetRValueSymbolVal(getSymbolManager(), VR);
+    if (isa<ParmVarDecl>(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