[all-commits] [llvm/llvm-project] e5f47e: [OpenCL] NULL redefined as nullptr in C++ mode.

Anastasia Stulova via All-commits all-commits at lists.llvm.org
Tue Jul 27 08:34:32 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e5f47eedeb02595247e433ad756607e6c1397ae3
      https://github.com/llvm/llvm-project/commit/e5f47eedeb02595247e433ad756607e6c1397ae3
  Author: Anastasia Stulova <anastasia.stulova at arm.com>
  Date:   2021-07-27 (Tue, 27 Jul 2021)

  Changed paths:
    M clang/lib/Headers/opencl-c-base.h
    M clang/test/SemaOpenCL/null_literal.cl

  Log Message:
  -----------
  [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




More information about the All-commits mailing list