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

2021-07-23 Thread Anastasia Stulova via Phabricator via cfe-commits
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=

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

2021-07-15 Thread Anastasia Stulova via Phabricator via cfe-commits
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

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

2021-07-15 Thread Justas Janickas via Phabricator via cfe-commits
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 >

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

2021-07-15 Thread Justas Janickas via Phabricator via cfe-commits
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/

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

2021-07-15 Thread Anastasia Stulova via Phabricator via cfe-commits
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

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

2021-07-14 Thread Justas Janickas via Phabricator via cfe-commits
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

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

2021-07-14 Thread Justas Janickas via Phabricator via cfe-commits
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

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

2021-07-14 Thread Anastasia Stulova via Phabricator via cfe-commits
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

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

2021-07-14 Thread Justas Janickas via Phabricator via cfe-commits
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