[PATCH] D119061: [Clang] noinline call site attribute
Dávid Bolvanský via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Feb 25 10:47:31 PST 2022
xbolva00 added inline comments.
================
Comment at: clang/test/Sema/attr-noinline.cpp:23
+
+ [[gnu::noinline]] bar(); // expected-warning {{'noinline' attribute is ignored in statements as it only applies to functions}}
+}
----------------
aaron.ballman wrote:
> It might be nice to clarify the diagnostic; it's not that `noinline` attribute is ignored always, it's that `[[gnu::noinline]]` and `__attribute__((noinline))` are ignored specifically.
>
> Can you add one more test case for:
> ```
> __attribute__((noinline)) bar();
> ```
> (I would expect this to also diagnose.)
```
__attribute__((noinline)) bar();
```
is not diagnosed, as "// The Clang spelling implies GNU<name>, CXX11<"clang", name>, and optionally," :[] Not sure if this could be easily fixed.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119061/new/
https://reviews.llvm.org/D119061
More information about the cfe-commits
mailing list