=?utf-8?q?Mészáros?= Gergely <[email protected]>,
=?utf-8?q?Mészáros?= Gergely <[email protected]>,Gergely
 Meszaros <[email protected]>,Gergely Meszaros
 <[email protected]>,"Meszaros, Gergely" <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>


================
@@ -0,0 +1,25 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+// RUN: %clang_cc1 -fsyntax-only -x c++ -fsycl-is-host -verify %s
+// RUN: %clang_cc1 -fsyntax-only -x c++ -fsycl-is-device -verify=sycl %s
+// RUN: %clang_cc1 -fsyntax-only -x hlsl -triple 
dxil-pc-shadermodel6.3-library -verify=hlsl %s
+
+// hlsl-error@#constant{{'opencl_constant' attribute is not supported in HLSL}}
+// hlsl-error@#generic{{'opencl_generic' attribute is not supported in HLSL}}
+// hlsl-error@#global{{'opencl_global' attribute is not supported in HLSL}}
+// hlsl-error@#global_host{{'opencl_global_host' attribute is not supported in 
HLSL}}
+// hlsl-error@#global_device{{'opencl_global_device' attribute is not 
supported in HLSL}}
+// hlsl-error@#local{{'opencl_local' attribute is not supported in HLSL}}
+// hlsl-error@#private{{'opencl_private' attribute is not supported in HLSL}}
+
+// sycl-error@#constant{{'opencl_constant' attribute is not supported in SYCL 
when compiling for the device}}
----------------
tahonermann wrote:

> TBH I'm not entirely sure why `__attribute__((opencl_*))` is supported for 
> C++/Obj-C/CUDA etc (why isn't this guarded by `getLangOpts().Opencl || 
> getLangOpts().OpenCLCPlusPlus`) either, but I also didn't want to change that.

I would very much like to change that and have it on a task list to do sometime 
after we merge new address space attributes for SYCL (see 
https://github.com/llvm/llvm-project/pull/200849).

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

Reply via email to