]> granicus.if.org Git - clang/commitdiff
Default initialize only pointers and integer types (for now).
authorTed Kremenek <kremenek@apple.com>
Thu, 14 Aug 2008 22:11:13 +0000 (22:11 +0000)
committerTed Kremenek <kremenek@apple.com>
Thu, 14 Aug 2008 22:11:13 +0000 (22:11 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54798 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/GRExprEngine.cpp

index cb423e18af2b96c8acc6aab303044bef26934a56..f4ffcb12e015ff06da304e54851bc4661db491bb 100644 (file)
@@ -202,6 +202,15 @@ const GRState* GRExprEngine::getInitialState() {
     
     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) ||