================
@@ -3,6 +3,30 @@
 // RUN: %clang_cc1 -verify -cl-std=CL2.0 -triple amdgcn-amd-amdhsa 
-Wno-unused-value %s
 
 void foo() {
+    typedef __amdgpu_named_workgroup_barrier_t SugaredArray[2];
+
+    struct TestSimple {
+        __amdgpu_named_workgroup_barrier_t x;
+    };
+
+    struct TestArray {
+        __amdgpu_named_workgroup_barrier_t y[2];
+    };
+
+    struct TestSugared {
+        SugaredArray z[2];
+    };
+
+    struct GoodWrapper {
+        __amdgpu_named_workgroup_barrier_t x;
----------------
Pierre-vh wrote:

Downstream has a need for it because there is a desire to create wrappers 
around named barriers with helper functions. Of course the example here is 
simple but in reality you'd have a few helper functions in a struct like that.

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

Reply via email to