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

llvm-svn: 117961
This commit is contained in:
Argyrios Kyrtzidis 2010-11-01 21:51:42 +00:00
parent d7a824006e
commit 375584c7eb
2 changed files with 14 additions and 0 deletions

View File

@ -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;

View File

@ -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
}