[cfe-commits] r157082 - in /cfe/trunk: lib/StaticAnalyzer/Core/ExprEngine.cpp test/Analysis/cxx11-crashes.cpp
Anna Zaks
ganna at apple.com
Fri May 18 15:47:43 PDT 2012
Author: zaks
Date: Fri May 18 17:47:43 2012
New Revision: 157082
URL: http://llvm.org/viewvc/llvm-project?rev=157082&view=rev
Log:
[analyzer] Fix a c++11 crash: xvalues can be locations (VisitMemberExpr)
Added:
cfe/trunk/test/Analysis/cxx11-crashes.cpp
Modified:
cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
Modified: cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp?rev=157082&r1=157081&r2=157082&view=diff
==============================================================================
--- cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp (original)
+++ cfe/trunk/lib/StaticAnalyzer/Core/ExprEngine.cpp Fri May 18 17:47:43 2012
@@ -1537,7 +1537,7 @@
// For all other cases, compute an lvalue.
SVal L = state->getLValue(field, baseExprVal);
- if (M->isLValue())
+ if (M->isGLValue())
Bldr.generateNode(M, Pred, state->BindExpr(M, LCtx, L), false, 0,
ProgramPoint::PostLValueKind);
else {
Added: cfe/trunk/test/Analysis/cxx11-crashes.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Analysis/cxx11-crashes.cpp?rev=157082&view=auto
==============================================================================
--- cfe/trunk/test/Analysis/cxx11-crashes.cpp (added)
+++ cfe/trunk/test/Analysis/cxx11-crashes.cpp Fri May 18 17:47:43 2012
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -analyze -analyzer-checker=core -std=c++11 -verify %s
+
+// radar://11485149, PR12871
+class PlotPoint {
+ bool valid;
+};
+
+PlotPoint limitedFit () {
+ PlotPoint fit0;
+ fit0 = limitedFit ();
+ return fit0;
+}
More information about the cfe-commits
mailing list