diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-08-14 22:11:13 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-08-14 22:11:13 +0000 |
commit | c7138bb0a7627e3259e1d943b3d877b2ad98614c (patch) | |
tree | 9d76132de89adffcd6679c51aed97ba060e75aa8 /clang | |
parent | 12c9ddced12912e4b4e4f7fba9bb424e2685cc98 (diff) | |
download | bcm5719-llvm-c7138bb0a7627e3259e1d943b3d877b2ad98614c.tar.gz bcm5719-llvm-c7138bb0a7627e3259e1d943b3d877b2ad98614c.zip |
Default initialize only pointers and integer types (for now).
llvm-svn: 54798
Diffstat (limited to 'clang')
-rw-r--r-- | clang/lib/Analysis/GRExprEngine.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/Analysis/GRExprEngine.cpp b/clang/lib/Analysis/GRExprEngine.cpp index cb423e18af2..f4ffcb12e01 100644 --- a/clang/lib/Analysis/GRExprEngine.cpp +++ b/clang/lib/Analysis/GRExprEngine.cpp @@ -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) || |