================
@@ -12251,6 +12264,9 @@ bool Sema::CheckFunctionDeclaration(Scope *S,
FunctionDecl *NewFD,
if (NewFD->hasAttr<SYCLKernelEntryPointAttr>())
SYCL().CheckSYCLEntryPointFunctionDecl(NewFD);
+ if (NewFD->hasAttr<SYCLExternalAttr>())
+ SYCL().CheckSYCLExternalFunctionDecl(NewFD);
----------------
schittir wrote:
```
namespace { struct S9 {}; }
struct T9 {
using type = S9;
};
template<typename>
[[clang::sycl_external]] void func9() {} // error here : {{'sycl_external' can
only be applied to functions with external linkage}}
template<typename T>
[[clang::sycl_external]] void test_func9() {
func9<typename T::type>(); // note here: {{in instantiation of function
template specialization 'func9<(anonymous namespace)::S9>' requested here}}
}
template void test_func9<T9>(); // note here: {{in instantiation of function
template specialization 'test_func9<T9>' requested here}}
```
This case is being diagnosed at present. Will fix it.
https://github.com/llvm/llvm-project/pull/140282
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits