================
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -fsycl-is-device -fsyntax-only -verify %s
+
+// expected-warning@+1{{'sycl_external' attribute only applies to functions}}
+[[clang::sycl_external]] int a;
+
+
+// expected-warning@+2{{'sycl_external' attribute only applies to functions}}
+struct s {
+[[clang::sycl_external]] int b;
+};
+
+// FIXME: The first declaration of a function is required to have the 
attribute.
+// The attribute may be optionally present on subsequent declarations
+int foo(int c);
+
+[[clang::sycl_external]] void foo();
----------------
tahonermann wrote:

The test file naming is inconsistent with naming of the test files for 
`sycl_kernel_entry_point`. The `-grammar.cpp` suffix is intended for use in 
exercising the syntax of the attribute itself, not what it appertains to. These 
tests are more appropriate for `sycl-external-attr.cpp` (or perhaps a 
`sycl-external-attr-appertainment.cpp`).

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