[clang] [AST] Treat "inline gnu_inline" the same way as "extern inline gnu_inline...
authorMartin Storsjo <martin@martin.st>
Fri, 27 Sep 2019 12:25:19 +0000 (12:25 +0000)
committerMartin Storsjo <martin@martin.st>
Fri, 27 Sep 2019 12:25:19 +0000 (12:25 +0000)
commit71decf841c7396ad96cf95a9123c2df19a4121f6
tree8acaf5e33a3aba1a42f0c73f0653ace9c8976c78
parent5ebab1f8f943e967662dd4ffc843bceb3de2e3d2
[clang] [AST] Treat "inline gnu_inline" the same way as "extern inline gnu_inline" in C++ mode

This matches how GCC handles it, see e.g. https://gcc.godbolt.org/z/HPplnl.
GCC documents the gnu_inline attribute with "In C++, this attribute does
not depend on extern in any way, but it still requires the inline keyword
to enable its special behavior."

The previous behaviour of gnu_inline in C++, without the extern
keyword, can be traced back to the original commit that added
support for gnu_inline, SVN r69045.

Differential Revision: https://reviews.llvm.org/D67414

llvm-svn: 373078
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/AST/Decl.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/CodeGen/inline.c
clang/test/SemaCUDA/gnu-inline.cu
clang/test/SemaCXX/gnu_inline.cpp [new file with mode: 0644]
clang/test/SemaCXX/undefined-inline.cpp