[llvm-branch-commits] [cfe-branch] r118536 - in /cfe/branches/Apple/whitney: lib/Parse/ParseStmt.cpp test/SemaCXX/asm.cpp

Daniel Dunbar daniel at zuster.org
Tue Nov 9 09:30:21 PST 2010


Author: ddunbar
Date: Tue Nov  9 11:30:21 2010
New Revision: 118536

URL: http://llvm.org/viewvc/llvm-project?rev=118536&view=rev
Log:
Merge r117961:
--
Author: Argyrios Kyrtzidis <akyrtzi at gmail.com>
Date:   Mon Nov 1 21:51:42 2010 +0000

    Clean up temporaries created by an asm statement. Fixes rdar://8540491

Added:
    cfe/branches/Apple/whitney/test/SemaCXX/asm.cpp
Modified:
    cfe/branches/Apple/whitney/lib/Parse/ParseStmt.cpp

Modified: cfe/branches/Apple/whitney/lib/Parse/ParseStmt.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/lib/Parse/ParseStmt.cpp?rev=118536&r1=118535&r2=118536&view=diff
==============================================================================
--- cfe/branches/Apple/whitney/lib/Parse/ParseStmt.cpp (original)
+++ cfe/branches/Apple/whitney/lib/Parse/ParseStmt.cpp Tue Nov  9 11:30:21 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/branches/Apple/whitney/test/SemaCXX/asm.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/Apple/whitney/test/SemaCXX/asm.cpp?rev=118536&view=auto
==============================================================================
--- cfe/branches/Apple/whitney/test/SemaCXX/asm.cpp (added)
+++ cfe/branches/Apple/whitney/test/SemaCXX/asm.cpp Tue Nov  9 11:30:21 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 llvm-branch-commits mailing list