aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/StaticAnalyzer/Core/ExprEngineC.cpp6
-rw-r--r--test/Analysis/cxx11-crashes.cpp5
2 files changed, 9 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngineC.cpp b/lib/StaticAnalyzer/Core/ExprEngineC.cpp
index 8a02b2ca96..2e3e9f51e7 100644
--- a/lib/StaticAnalyzer/Core/ExprEngineC.cpp
+++ b/lib/StaticAnalyzer/Core/ExprEngineC.cpp
@@ -568,8 +568,10 @@ void ExprEngine::VisitInitListExpr(const InitListExpr *IE,
state->getSVal(initEx, LCtx)));
return;
}
-
- llvm_unreachable("unprocessed InitListExpr type");
+
+ assert(IE->getNumInits() == 1);
+ B.generateNode(IE, Pred, state->BindExpr(IE, LCtx, UnknownVal()));
+ return;
}
void ExprEngine::VisitGuardedExpr(const Expr *Ex,
diff --git a/test/Analysis/cxx11-crashes.cpp b/test/Analysis/cxx11-crashes.cpp
index 6e60ac63cc..a7bfe4ebe5 100644
--- a/test/Analysis/cxx11-crashes.cpp
+++ b/test/Analysis/cxx11-crashes.cpp
@@ -31,3 +31,8 @@ void radar11487541() {
namespace fs = boost::filesystem;
fs::path p;
}
+
+// PR12873 radrar://11499139
+void testFloatInitializer() {
+ const float ysize={0.015}, xsize={0.01};
+}