[PATCH] D18652: [Inline asm] Correctly parse GCC-style asm line following MS-style asm line
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 31 11:46:14 PDT 2016
rsmith added a subscriber: rsmith.
================
Comment at: lib/Parse/ParseStmtAsm.cpp:423
@@ -421,3 +422,3 @@
bool isAsm = Tok.is(tok::kw_asm);
- if (SingleLineMode && !isAsm)
+ if (SingleLineMode && (!isAsm || NextToken().is(tok::l_paren)))
break;
----------------
The next token in GCC-style inline asm could also be `volatile` (or `const` or `goto` -- though we don't support the latter).
Please make this GCC / MS dialect selection the same way that `ParseAsmStatement` does (and factor out a static `isGCCAsmStatement(Token &TokAfterAsm)` function or similar).
http://reviews.llvm.org/D18652
More information about the cfe-commits
mailing list