[clang] [clang][SYCL] Add sycl_external attribute and restrict emitting device code (PR #140282)
Tom Honermann via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 16 07:01:07 PDT 2025
================
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+// expected-warning at +1{{'sycl_external' attribute ignored}}
+[[clang::sycl_external]] void bar() {}
+
+// expected-warning at +1{{'sycl_external' attribute ignored}}
+[[clang::sycl_external]] int a;
----------------
tahonermann wrote:
Per my comment on the diagnostic definition, I think invalid uses should elicit errors rather than warnings. This test should then move to `sycl-external-attr.cpp`.
https://github.com/llvm/llvm-project/pull/140282
More information about the cfe-commits
mailing list