================
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+// expected-warning@+1{{'clang::sycl_external' attribute ignored}}
+[[clang::sycl_external]] void bar() {}
+
+// expected-warning@+1{{'clang::sycl_external' attribute ignored}}
+[[clang::sycl_external]] int a;
+
+// expected-warning@+2{{'clang::sycl_external' attribute ignored}}
+namespace not_sycl {
+[[clang::sycl_external]] void foo() {}
+}
----------------
tahonermann wrote:

I don't think the namespace scoped example adds anything here, but I think it 
would be good to exercise a function template.
```suggestion
// expected-warning@+2{{'clang::sycl_external' attribute ignored}}
template<typename>
[[clang::sycl_external]] void ft(T) {}
template void ft(int);
```

https://github.com/llvm/llvm-project/pull/140282
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to