[cfe-commits] r157211 - in /cfe/trunk: lib/StaticAnalyzer/Core/ExprEngineC.cpp test/Analysis/cxx11-crashes.cpp
Anna Zaks
ganna at apple.com
Mon May 21 15:07:01 PDT 2012
Author: zaks
Date: Mon May 21 17:07:00 2012
New Revision: 157211
URL: http://llvm.org/viewvc/llvm-project?rev=157211&view=rev
Log:
[analyzer] Bind UnknownVal to InitListExpr for unsupported types
(ex: float).
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp
cfe/trunk/test/Analysis/cxx11-crashes.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp?rev=157211&r1=157210&r2=157211&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngineC.cpp Mon May 21 17:07:00 2012
@@ -568,8 +568,10 @@
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,
Modified: cfe/trunk/test/Analysis/cxx11-crashes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/cxx11-crashes.cpp?rev=157211&r1=157210&r2=157211&view=diff
==============================================================================
--- cfe/trunk/test/Analysis/cxx11-crashes.cpp (original)
+++ cfe/trunk/test/Analysis/cxx11-crashes.cpp Mon May 21 17:07:00 2012
@@ -31,3 +31,8 @@
namespace fs = boost::filesystem;
fs::path p;
}
+
+// PR12873 radrar://11499139
+void testFloatInitializer() {
+ const float ysize={0.015}, xsize={0.01};
+}
More information about the cfe-commits
mailing list