================
@@ -213,3 +188,163 @@ void test() {
 }
 
 } // namespace badref7
+
+
+#include <stdatomic.h>
+// Check for atomic parameters and subobjects.
+namespace atomic1 {
+// Kernel entry point template definition.
+template<typename KNT, typename T>
+[[clang::sycl_kernel_entry_point(KNT)]]
+void kernel_single_task(T t) {} // expected-note-re {{within parameter 't' of 
type '(lambda at {{.*}})' declared here}}
+                                // expected-note-re@-1 {{within parameter 't' 
of type '(lambda at {{.*}})' declared here}}
+                                // expected-note-re@-2 {{within parameter 't' 
of type '(lambda at {{.*}})' declared here}}
+                                // expected-note-re@-3 {{within parameter 't' 
of type '(lambda at {{.*}})' declared here}}
+                                // expected-note@-4 {{within parameter 't' of 
type 'atomic1::Kernel' declared here}}
+
+struct Sa { 
+  int a;
+  _Atomic int b; // expected-error {{'_Atomic(int)' cannot be used as the type 
of a kernel parameter}}
+                 // expected-note@-3 {{within field of type 'Sa' declared 
here}}
----------------
ianayl wrote:

Data member name is included now, although should I change the rest of our 
diagnostics to use "data member" too, specifically for SYCL? It'd deviate from 
the rest of the diagnostics that still uses "field" however

https://github.com/llvm/llvm-project/pull/208571
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to