Properly handle temporaries that are created in a AsmStmt.
Previously the temporaries would get destroyed before the asm call.
llvm-svn: 118001
diff --git a/clang/lib/Parse/ParseStmt.cpp b/clang/lib/Parse/ParseStmt.cpp
index 7695673..78d0d2f 100644
--- a/clang/lib/Parse/ParseStmt.cpp
+++ b/clang/lib/Parse/ParseStmt.cpp
@@ -188,6 +188,7 @@
<< Attr.Range;
bool msAsm = false;
Res = ParseAsmStatement(msAsm);
+ Res = Actions.ActOnFinishFullStmt(Res.get());
if (msAsm) return move(Res);
SemiError = "asm";
break;
@@ -1458,7 +1459,6 @@
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;