Anastasia added a comment. 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 ---------------- can we annotate `#endif` with a comment, please to improve readability? The same applies to other places. 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