[clang] clang/AMDGPU: Report some missing OpenCL 2.0 feature macros (PR #160826)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Wed Oct 1 07:02:20 PDT 2025
================
@@ -156,10 +159,31 @@
#pragma OPENCL EXTENSION cl_amd_media_ops2: enable
#if (__OPENCL_C_VERSION__ >= 300)
-#ifndef __opencl_c_generic_address_space
-#error "Missing __opencl_c_generic_address_space define"
-#else
-#error "Incorrect __opencl_c_generic_address_space define"
+ #ifndef __opencl_c_program_scope_global_variables
+ #error "Missing __opencl_c_program_scope_global_variables define"
+ #endif
#endif
-#pragma OPENCL EXTENSION __opencl_c_generic_address_space: enable
+
+#if (__OPENCL_C_VERSION__ >= 300)
+ #ifdef FLAT_SUPPORT
+ #ifndef __opencl_c_generic_address_space
+ #error "Missing __opencl_c_generic_address_space define"
+ #endif
+ #else
+ #ifdef __opencl_c_generic_address_space
+ #error "Incorrect __opencl_c_atomic_scope_all_devices define"
----------------
arsenm wrote:
```suggestion
#error "Incorrect __opencl_c_generic_address_space define"
```
https://github.com/llvm/llvm-project/pull/160826
More information about the cfe-commits
mailing list