diff options
| author | Ted Kremenek <kremenek@apple.com> | 2011-01-25 21:08:47 +0000 |
|---|---|---|
| committer | Ted Kremenek <kremenek@apple.com> | 2011-01-25 21:08:47 +0000 |
| commit | fedad3c668c24fa91367e5651a9df13eb55cfd58 (patch) | |
| tree | c7d43af16a42e23a495fd208332b0a1a619ef0c0 /clang/lib | |
| parent | 2992efa403cde194341dae33dc7b165004b3c5d3 (diff) | |
| download | bcm5719-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.cpp | 4 |
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; |

