This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG5c63bf3abdc7: [OpenCL] Add NULL to standards prior to v2.0.
(authored by Anastasia).
Changed prior to commit:
https://reviews.llvm.org/D105988?vs=
Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.
LGTM! Thanks
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105988/new/
https://reviews.llvm.org/D105988
___
cfe-commits mailing list
Topotuna marked 2 inline comments as done.
Topotuna added inline comments.
Comment at: clang/test/SemaOpenCL/null_literal.cl:7
#define NULL ((void*)0)
Anastasia wrote:
> Anastasia wrote:
> > I think we should remove this `NULL` definition but instead add
>
Topotuna updated this revision to Diff 358911.
Topotuna added a comment.
Full diff now added. Redundant condition `#if` removed
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105988/new/
https://reviews.llvm.org/D105988
Files:
clang/lib/Headers/opencl-c-base.h
clang/test/SemaOpenCL/
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
Topotuna updated this revision to Diff 358628.
Topotuna added a comment.
Wrong diff file added previously
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105988/new/
https://reviews.llvm.org/D105988
Files:
clang/lib/Headers/opencl-c-base.h
clang/test/SemaOpenCL/null_literal.cl
Inde
Topotuna updated this revision to Diff 358625.
Topotuna added a comment.
Added compile time flags
-finclude-default-header -fdeclare-opencl-builtins
instead of
#define NULL ((void*)0)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105988/new/
https://reviews.llvm.org/D105988
File
Anastasia added a comment.
This seems reasonable.
Comment at: clang/test/SemaOpenCL/null_literal.cl:7
#define NULL ((void*)0)
I think we should remove this `NULL` definition but instead add
`-finclude-default-header -fdeclare-opencl-builtins` to test the
Topotuna created this revision.
Herald added subscribers: ldrumm, Anastasia, yaxunl.
Topotuna requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
NULL macro maps to ((void*)0) for OpenCL versions earlier than 2.0
NULL was undefined in OpenCL p