[OpenCL] NULL redefined as nullptr in C++ mode.
authorAnastasia Stulova <anastasia.stulova@arm.com>
Tue, 27 Jul 2021 15:27:36 +0000 (16:27 +0100)
committerAnastasia Stulova <anastasia.stulova@arm.com>
Tue, 27 Jul 2021 15:33:50 +0000 (16:33 +0100)
commite5f47eedeb02595247e433ad756607e6c1397ae3
tree5392bf8fe125a863f5ba5f5dc60c45431d147fa0
parent973de7185606a21fd5e9d5e8c014fbf898c0e72f
[OpenCL] NULL redefined as nullptr in C++ mode.

Redefines NULL as nullptr instead of ((void*)0)
in C++ for OpenCL.

Such internal representation of NULL provides
compatibility with C++11 and later language
standards.

Patch by Topotuna (Justas Janickas)!

Differential Revision: https://reviews.llvm.org/D105987
clang/lib/Headers/opencl-c-base.h
clang/test/SemaOpenCL/null_literal.cl