[cfe-commits] r117961 - in /cfe/trunk: lib/Parse/ParseStmt.cpp test/SemaCXX/asm.cpp
Argyrios Kyrtzidis
akyrtzi at gmail.com
Mon Nov 1 14:51:42 PDT 2010
Author: akirtzidis
Date: Mon Nov 1 16:51:42 2010
New Revision: 117961
URL: http://llvm.org/viewvc/llvm-project?rev=117961&view=rev
Log:
Clean up temporaries created by an asm statement. Fixes rdar://8540491
Added:
cfe/trunk/test/SemaCXX/asm.cpp
Modified:
cfe/trunk/lib/Parse/ParseStmt.cpp
Modified: cfe/trunk/lib/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Parse/ParseStmt.cpp?rev=117961&r1=117960&r2=117961&view=diff
==============================================================================
--- cfe/trunk/lib/Parse/ParseStmt.cpp (original)
+++ cfe/trunk/lib/Parse/ParseStmt.cpp Mon Nov 1 16:51:42 2010
@@ -1458,6 +1458,7 @@
SkipUntil(tok::r_paren);
return true;
}
+ Res = Actions.MakeFullExpr(Res.get()).release();
Exprs.push_back(Res.release());
// Eat the comma and continue parsing if it exists.
if (Tok.isNot(tok::comma)) return false;
Added: cfe/trunk/test/SemaCXX/asm.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/asm.cpp?rev=117961&view=auto
==============================================================================
--- cfe/trunk/test/SemaCXX/asm.cpp (added)
+++ cfe/trunk/test/SemaCXX/asm.cpp Mon Nov 1 16:51:42 2010
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+struct A
+{
+ ~A();
+};
+int foo(A);
+
+void bar()
+{
+ A a;
+ asm("" : : "r"(foo(a)) ); // rdar://8540491
+}
More information about the cfe-commits
mailing list