[cfe-commits] r117961 - in /cfe/trunk: lib/Parse/ParseStmt.cpp test/SemaCXX/asm.cpp
Douglas Gregor
dgregor at apple.com
Mon Nov 1 14:57:05 PDT 2010
On Nov 1, 2010, at 2:51 PM, Argyrios Kyrtzidis wrote:
> 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
Should this have a codegen test verifying that the temporary object is destroyed?
- Doug
> 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
> +}
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
More information about the cfe-commits
mailing list