nickdesaulniers marked 4 inline comments as done.
nickdesaulniers added inline comments.


================
Comment at: clang/lib/Parse/ParseStmtAsm.cpp:746-755
   ParseTypeQualifierListOpt(DS, AR_VendorAttributesParsed);
 
   // GNU asms accept, but warn, about type-qualifiers other than volatile.
   if (DS.getTypeQualifiers() & DeclSpec::TQ_const)
     Diag(Loc, diag::warn_asm_qualifier_ignored) << "const";
   if (DS.getTypeQualifiers() & DeclSpec::TQ_restrict)
     Diag(Loc, diag::warn_asm_qualifier_ignored) << "restrict";
----------------
nickdesaulniers wrote:
> I think in a follow up commit, I'll just delete this (the call to 
> `ParseTypeQualifierListOpt` and subsequent `warn_asm_qualifier_ignored` 
> emission); making it a parse error to put type qualifiers after the keyword 
> `asm`, which would match the behavior of GCC, and not waste time looking for 
> and parsing type qualifiers.  It maybe made sense when 
> `ParseTypeQualifierListOpt` was being abused to parse `volatile`, but this 
> patch fixes that.
Chatting with @aaron.ballman , I think it makes sense to tackle this in this 
CL, which will simplify the requested changes to parsing (above).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75563



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to