Index: clang/lib/AST/Decl.cpp =================================================================== --- clang/lib/AST/Decl.cpp +++ clang/lib/AST/Decl.cpp @@ -3048,7 +3048,6 @@ /// an externally visible symbol, but "extern inline" will not create an /// externally visible symbol. bool FunctionDecl::isInlineDefinitionExternallyVisible() const { - assert(doesThisDeclarationHaveABody() && "Must have the function definition"); assert(isInlined() && "Function must be inline"); ASTContext &Context = getASTContext(); Index: clang/test/SemaCUDA/gnu-inline.cu =================================================================== --- /dev/null +++ clang/test/SemaCUDA/gnu-inline.cu @@ -0,0 +1,10 @@ +// 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(); +inline __attribute__((gnu_inline)) void bar() { foo(); }