[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,38 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
+
+// Semantic tests for sycl_external attribute
+
+[[clang::sycl_external(3)]] // expected-error {{'sycl_external' attribute takes no arguments}}
+void bar() {}
----------------
tahonermann wrote:

This test would be more appropriately exercised in `sycl-external-attr-grammar.cpp`.

https://github.com/llvm/llvm-project/pull/140282


More information about the cfe-commits mailing list