File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,12 @@ template<typename>
2929[[clang::sycl_external]] void func6 () {}
3030template void func6<S6>();
3131
32+ // FIXME: C++23 [temp.expl.spec]p12 states:
33+ // ... Similarly, attributes appearing in the declaration of a template
34+ // have no effect on an explicit specialization of that template.
35+ // Clang currently instantiates and propagates attributes from a function
36+ // template to its explicit specializations resulting in the following
37+ // spurious error.
3238// expected-error@+3{{'clang::sycl_external' can only be applied to functions with external linkage}}
3339namespace { struct S7 {}; }
3440template <typename >
@@ -126,6 +132,7 @@ class B {
126132
127133 [[clang::sycl_external]] virtual void bar () = 0;
128134};
135+ [[clang::sycl_external]] void B::bar () {}
129136
130137[[clang::sycl_external]] constexpr int square (int x);
131138
You can’t perform that action at this time.
0 commit comments