mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-26 12:36:07 +00:00

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
11 lines
254 B
Plaintext
11 lines
254 B
Plaintext
// RUN: %clang_cc1 -fsyntax-only -verify %s
|
|
|
|
#include "Inputs/cuda.h"
|
|
|
|
// expected-no-diagnostics
|
|
|
|
// Check that we can handle gnu_inline functions when compiling in CUDA mode.
|
|
|
|
void foo();
|
|
extern inline __attribute__((gnu_inline)) void bar() { foo(); }
|