[PATCH] D67414: [AST] Treat "inline gnu_inline" the same way as "extern inline gnu_inline" in C++ mode

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 13 09:26:22 PDT 2019


mstorsjo marked an inline comment as done.
mstorsjo added inline comments.


================
Comment at: clang/test/SemaCUDA/gnu-inline.cu:8
 void foo();
-inline __attribute__((gnu_inline)) void bar() { foo(); }
+inline __attribute__((gnu_inline)) void bar() { foo(); } // expected-warning {{'gnu_inline' attribute without 'extern' in C++ treated as externally available, this changed in Clang 10}}
----------------
tra wrote:
> >>! In D67414#1669156, @mstorsjo wrote:
> > The warning did trigger in an existing CUDA test as well - I'm not familiar with cuda and how it relates to other languages, so suggestions on what to do wrt it, if anything, are also welcome.
> 
> I believe what we care about here is whether `gnu_inline` is handled at all.
> If `gnu_inline` needs `extern`, you should add it here and revert the warning check.
Ok, that makes sense, will change it.


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

https://reviews.llvm.org/D67414





More information about the cfe-commits mailing list