summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Core
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2012-09-05 22:31:58 +0000
committerAnna Zaks <ganna@apple.com>2012-09-05 22:31:58 +0000
commite5cb4981d06e30594a947b5c44fe84cd71763a97 (patch)
tree0925643250a7b4928c5e28d1d6d0e8f6221afd63 /clang/lib/StaticAnalyzer/Core
parentb4b2b57ee003b039ec5aca1a12af2cfb0a1868fd (diff)
downloadbcm5719-llvm-e5cb4981d06e30594a947b5c44fe84cd71763a97.tar.gz
bcm5719-llvm-e5cb4981d06e30594a947b5c44fe84cd71763a97.zip
[analyzer] Fix a crash PR13762.
llvm-svn: 163262
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core')
-rw-r--r--clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index 3bf16fa0da6..00b2f4a6bee 100644
--- a/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/clang/lib/StaticAnalyzer/Core/ExprEngineC.cpp
@@ -567,7 +567,8 @@ void ExprEngine::VisitInitListExpr(const InitListExpr *IE,
QualType T = getContext().getCanonicalType(IE->getType());
unsigned NumInitElements = IE->getNumInits();
- if (T->isArrayType() || T->isRecordType() || T->isVectorType()) {
+ if (T->isArrayType() || T->isRecordType() || T->isVectorType() ||
+ T->isAnyComplexType()) {
llvm::ImmutableList<SVal> vals = getBasicVals().getEmptySValList();
// Handle base case where the initializer has no elements.
OpenPOWER on IntegriCloud