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

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

Reply via email to