airlied added a comment.

In D106778#2904509 <https://reviews.llvm.org/D106778#2904509>, @Anastasia wrote:

> Generally LGTM, but I think we should guard the `else` blocks with 
> CL_VERSION_2_0 or higher to avoid exposing the functions in earlier standards 
> because the spec says:
>
>   The C11 style atomic functions in this sub-section require support for 
> OpenCL 2.0 or newer. However, this statement does not apply to the "OpenCL C 
> 1.x Legacy Atomics" descriptions at the end of this sub-section. 
>
> Adding @azabaznov to check if he can suggest anything for testing. Although 
> it seems like this is only related to the new functionality of OpenCL3.0.





================
Comment at: clang/lib/Headers/opencl-c.h:13678
+uintptr_t __ovld atomic_fetch_sub_explicit(volatile __local atomic_uintptr_t 
*object, ptrdiff_t operand, memory_order order, memory_scope scope);
+#endif
+#endif
----------------
Anastasia wrote:
> can we annotate `#endif` with a comment, please to improve readability? The 
> same applies to other places.
Isn't this the same problem we talked about before? how to annotate

#if defined(__opencl_c_generic_address_space)
<decls>
#else 
<alt decls>
#endif 

does it make sense to put //defined(__opencl_c_generic_address_space) on the 
endif?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106778/new/

https://reviews.llvm.org/D106778

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to