From: Ted Kremenek Date: Thu, 14 Aug 2008 22:11:13 +0000 (+0000) Subject: Default initialize only pointers and integer types (for now). X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fa07784e15752daef0bd648bd22e54df6627850e;p=clang Default initialize only pointers and integer types (for now). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54798 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/GRExprEngine.cpp b/lib/Analysis/GRExprEngine.cpp index cb423e18af..f4ffcb12e0 100644 --- a/lib/Analysis/GRExprEngine.cpp +++ b/lib/Analysis/GRExprEngine.cpp @@ -202,6 +202,15 @@ const GRState* GRExprEngine::getInitialState() { ScopedDecl *SD = const_cast(I->first); if (VarDecl* VD = dyn_cast(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(VD) ||