[PATCH] D75563: [clang][Parse] properly parse asm-qualifiers, asm inline

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 5 14:17:19 PST 2020


nickdesaulniers marked 2 inline comments as done and an inline comment as not done.
nickdesaulniers added inline comments.


================
Comment at: clang/lib/Parse/ParseStmtAsm.cpp:725
 /// [GNU] gnu-asm-statement:
-///         'asm' type-qualifier[opt] '(' asm-argument ')' ';'
+///         'asm' asm-qualifier[opt] '(' asm-argument ')' ';'
 ///
----------------
I guess this should be `asm-qualifier-list[opt]`?


================
Comment at: clang/test/Parser/asm-qualifiers.c:54
+asm ("");
+asm volatile (""); // expected-warning {{meaningless 'volatile' on asm outside function}}
+asm inline (""); // expected-error {{expected '(' after 'asm'}}
----------------
I'll probably also drop parsing for this here, too, in a follow up; GCC treats this case as a parse error.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75563/new/

https://reviews.llvm.org/D75563





More information about the cfe-commits mailing list