aaron.ballman added a comment.

Precommit CI seems to be failing with relevant failures:

  Failed Tests (2):
    Clang :: Parser/stmt-attributes.c
    Clang :: Sema/attr-noinline.c



================
Comment at: clang/include/clang/Basic/Attr.td:1764
+def NoInline : DeclOrStmtAttr {
+  let Spellings = [Clang<"noinline">, Declspec<"noinline">];
+  let Documentation = [NoInlineDocs];
----------------
xbolva00 wrote:
> What I need to mention here. With Clang<"noinline">, we lost support for 
> [[gnu::noinline]] syntax, now unrecognized. Maybe it is ok, as we have now 
> more powerful attribute?
> 
> 
Nope, we need to retain at least part of `GCC<"noinline">` because people may 
be relying on `[[gnu::noinline]]`. The GNU version should be disallowed as a 
statement attribute unless GCC gets the same functionality. I suspect using the 
`GCC` spelling may cause issues (because GCC spelling implies a GNU attribute 
as does the Clang spelling). So you may need to use `CXX11<"gnu", "noinline">` 
and `C2x<"gnu", "noinline">` to retain those spellings.

Btw, you can use an `Accessors` field here to give the semantic attribute the 
ability to differentiate between the GCC and the Clang spellings. The GNU 
spelling is a bit of a question mark; I think it's fine to allow it as a 
statement attribute, but we might want to warn that the use is not compatible 
with GCC.

You'll have to update the documentation to describe what's supported where and 
under which spelling.


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

https://reviews.llvm.org/D119061

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

Reply via email to