[PATCH] D105988: [OpenCL] NULL introduced prior to v2.0

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 15 03:37:12 PDT 2021


Anastasia added inline comments.


================
Comment at: clang/lib/Headers/opencl-c-base.h:167
 
-#if defined(__OPENCL_CPP_VERSION__) || (__OPENCL_C_VERSION__ >= CL_VERSION_2_0)
+#if defined(__OPENCL_CPP_VERSION__) || defined(__OPENCL_C_VERSION__)
 #define NULL ((void*)0)
----------------
I think we should drop `#if` here since the condition now includes both OpenCL kernel languages that clang supports.


================
Comment at: clang/test/SemaOpenCL/null_literal.cl:7
 
 #define NULL ((void*)0)
 
----------------
Anastasia wrote:
> I think we should remove this `NULL` definition but instead add `-finclude-default-header -fdeclare-opencl-builtins` to test the definition you are adding in the header.
Ok, is this a full diff? https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface


Because the file appears to be incompletely displayed or something...


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

https://reviews.llvm.org/D105988



More information about the cfe-commits mailing list