diff options
-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 +} |