Fix crash reported in <rdar://problem/6695527>. We now have
SVal::GetRValueSymbolVal do the checking if we can symbolicate a type instead of
having BasicStoreManager do it (which wasn't always doing the check
consistently). Having this check in SVal::GetRValueSymbolVal keeps the check in
one centralized place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67245 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/BasicStore.cpp b/lib/Analysis/BasicStore.cpp
index 8cfe7a9..b883f88 100644
--- a/lib/Analysis/BasicStore.cpp
+++ b/lib/Analysis/BasicStore.cpp
@@ -526,19 +526,15 @@
if (VD->getStorageClass() == VarDecl::Static)
continue;
- // Only handle pointers and integers for now.
- QualType T = VD->getType();
- if (Loc::IsLocType(T) || T->isIntegerType()) {
- // Initialize globals and parameters to symbolic values.
- // Initialize local variables to undefined.
- const MemRegion *R = StateMgr.getRegion(VD);
- SVal X = (VD->hasGlobalStorage() || isa<ParmVarDecl>(VD) ||
- isa<ImplicitParamDecl>(VD))
- ? SVal::GetRValueSymbolVal(StateMgr.getSymbolManager(), R)
- : UndefinedVal();
+ // Initialize globals and parameters to symbolic values.
+ // Initialize local variables to undefined.
+ const MemRegion *R = StateMgr.getRegion(VD);
+ SVal X = (VD->hasGlobalStorage() || isa<ParmVarDecl>(VD) ||
+ isa<ImplicitParamDecl>(VD))
+ ? SVal::GetRValueSymbolVal(StateMgr.getSymbolManager(), R)
+ : UndefinedVal();
- St = BindInternal(St, Loc::MakeVal(R), X);
- }
+ St = BindInternal(St, Loc::MakeVal(R), X);
}
}
return St;