diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-01 21:51:42 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2010-11-01 21:51:42 +0000 |
commit | 65e7a6b5f077827964570a7fdabffa62fcc2319e (patch) | |
tree | aa29a2ed8229250de392e7c9363a6ee02e6b34a0 | |
parent | 19cc1c715e97885f10b3496f91d0a8ae24642faa (diff) |
Clean up temporaries created by an asm statement. Fixes rdar://8540491
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@117961 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Parse/ParseStmt.cpp | 1 | ||||
-rw-r--r-- | test/SemaCXX/asm.cpp | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp index d340d574d4..76956732d4 100644 --- a/lib/Parse/ParseStmt.cpp +++ b/lib/Parse/ParseStmt.cpp @@ -1458,6 +1458,7 @@ bool Parser::ParseAsmOperandsOpt(llvm::SmallVectorImpl<IdentifierInfo *> &Names, 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; diff --git a/test/SemaCXX/asm.cpp b/test/SemaCXX/asm.cpp new file mode 100644 index 0000000000..cc2e6e75ca --- /dev/null +++ b/test/SemaCXX/asm.cpp @@ -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 +} |