[llvm-branch-commits] [cfe-branch] r156394 - in /cfe/branches/release_31: ./ lib/Analysis/UninitializedValues.cpp test/SemaCXX/warn-unreachable.cpp
Bill Wendling
isanbard at gmail.com
Tue May 8 11:22:25 PDT 2012
Author: void
Date: Tue May 8 13:22:25 2012
New Revision: 156394
URL: http://llvm.org/viewvc/llvm-project?rev=156394&view=rev
Log:
Merging r155803:
------------------------------------------------------------------------
r155803 | rsmith | 2012-04-29 17:16:51 -0700 (Sun, 29 Apr 2012) | 8 lines
PR11926 + duplicates: Fix crash in -Wuninitialized when using a compiler like
g++4.7, which reuses stack space allocated for temporaries. CFGElement::getAs
returns a suitably-cast version of 'this'. Patch by Markus Trippelsdorf!
No test: this code has the same observable behavior as the old code when built
with most compilers, and the tests were already failing when built with a
compiler for which this produced a broken binary.
------------------------------------------------------------------------
Modified:
cfe/branches/release_31/ (props changed)
cfe/branches/release_31/lib/Analysis/UninitializedValues.cpp
cfe/branches/release_31/test/SemaCXX/warn-unreachable.cpp (props changed)
Propchange: cfe/branches/release_31/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue May 8 13:22:25 2012
@@ -1,3 +1,3 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:155076,155278-155279,155342,155534-155535,155576,155670,155728
+/cfe/trunk:155076,155278-155279,155342,155534-155535,155576,155670,155728,155803
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_31/lib/Analysis/UninitializedValues.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_31/lib/Analysis/UninitializedValues.cpp?rev=156394&r1=156393&r2=156394&view=diff
==============================================================================
--- cfe/branches/release_31/lib/Analysis/UninitializedValues.cpp (original)
+++ cfe/branches/release_31/lib/Analysis/UninitializedValues.cpp Tue May 8 13:22:25 2012
@@ -168,7 +168,8 @@
if (block->empty())
return 0;
- const CFGStmt *cstmt = block->front().getAs<CFGStmt>();
+ CFGElement front = block->front();
+ const CFGStmt *cstmt = front.getAs<CFGStmt>();
if (!cstmt)
return 0;
Propchange: cfe/branches/release_31/test/SemaCXX/warn-unreachable.cpp
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue May 8 13:22:25 2012
@@ -1,2 +1,2 @@
/cfe/branches/type-system-rewrite/test/SemaCXX/warn-unreachable.cpp:134693-134817
-/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,155076,155278-155279,155342,155534-155535,155576,155670,155728
+/cfe/trunk/test/SemaCXX/warn-unreachable.cpp:121961,155076,155278-155279,155342,155534-155535,155576,155670,155728,155803
More information about the llvm-branch-commits
mailing list