[cfe-commits] r54798 - /cfe/trunk/lib/Analysis/GRExprEngine.cpp

Ted Kremenek kremenek at apple.com
Thu Aug 14 15:11:13 PDT 2008


Author: kremenek
Date: Thu Aug 14 17:11:13 2008
New Revision: 54798

URL: http://llvm.org/viewvc/llvm-project?rev=54798&view=rev
Log:
Default initialize only pointers and integer types (for now).

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

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

==============================================================================
--- cfe/trunk/lib/Analysis/GRExprEngine.cpp (original)
+++ cfe/trunk/lib/Analysis/GRExprEngine.cpp Thu Aug 14 17:11:13 2008
@@ -202,6 +202,15 @@
     
     ScopedDecl *SD = const_cast<ScopedDecl*>(I->first);
     if (VarDecl* VD = dyn_cast<VarDecl>(SD)) {
+      // Punt on static variables for now.
+      if (VD->getStorageClass() ==  VarDecl::Static)
+        continue;
+      
+      // Only handle pointers and integers for now.
+      QualType T = VD->getType();      
+      if (!(LVal::IsLValType(T) || T->isIntegerType()))
+        continue;
+      
       // Initialize globals and parameters to symbolic values.
       // Initialize local variables to undefined.
       RVal X = (VD->hasGlobalStorage() || isa<ParmVarDecl>(VD) ||





More information about the cfe-commits mailing list