summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-01-25 21:08:47 +0000
committerTed Kremenek <kremenek@apple.com>2011-01-25 21:08:47 +0000
commitfedad3c668c24fa91367e5651a9df13eb55cfd58 (patch)
treec7d43af16a42e23a495fd208332b0a1a619ef0c0 /clang/lib
parent2992efa403cde194341dae33dc7b165004b3c5d3 (diff)
downloadbcm5719-llvm-fedad3c668c24fa91367e5651a9df13eb55cfd58.tar.gz
bcm5719-llvm-fedad3c668c24fa91367e5651a9df13eb55cfd58.zip
Don't try and symbolicate unions; we don't reason
about them yet. Fixes crash reported in PR 9049. llvm-svn: 124228
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/StaticAnalyzer/SymbolManager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/SymbolManager.cpp b/clang/lib/StaticAnalyzer/SymbolManager.cpp
index 08677dafcfa..518bb172d58 100644
--- a/clang/lib/StaticAnalyzer/SymbolManager.cpp
+++ b/clang/lib/StaticAnalyzer/SymbolManager.cpp
@@ -233,13 +233,15 @@ QualType SymbolRegionValue::getType(ASTContext& C) const {
SymbolManager::~SymbolManager() {}
bool SymbolManager::canSymbolicate(QualType T) {
+ T = T.getCanonicalType();
+
if (Loc::IsLocType(T))
return true;
if (T->isIntegerType())
return T->isScalarType();
- if (T->isRecordType())
+ if (T->isRecordType() && !T->isUnionType())
return true;
return false;
OpenPOWER on IntegriCloud