[all-commits] [llvm/llvm-project] 4fde2b: [OpenCL] Add clang extension for function pointers.

Anastasia Stulova via All-commits all-commits at lists.llvm.org
Wed Jan 6 12:40:36 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4fde2b6a0c080cb2a598383b5850038d67ca6833
      https://github.com/llvm/llvm-project/commit/4fde2b6a0c080cb2a598383b5850038d67ca6833
  Author: Anastasia Stulova <anastasia.stulova at arm.com>
  Date:   2021-01-06 (Wed, 06 Jan 2021)

  Changed paths:
    M clang/docs/LanguageExtensions.rst
    M clang/include/clang/Basic/OpenCLExtensions.def
    M clang/lib/Basic/Targets/AMDGPU.h
    M clang/lib/Basic/Targets/NVPTX.h
    M clang/lib/Parse/ParseDecl.cpp
    M clang/lib/Sema/SemaDecl.cpp
    M clang/lib/Sema/SemaType.cpp
    M clang/test/Misc/amdgcn.languageOptsOpenCL.cl
    M clang/test/Misc/nvptx.languageOptsOpenCL.cl
    M clang/test/Misc/r600.languageOptsOpenCL.cl
    M clang/test/Parser/opencl-cxx-virtual.cl
    M clang/test/SemaOpenCL/extension-version.cl
    M clang/test/SemaOpenCL/func.cl
    M clang/test/SemaOpenCLCXX/members.cl

  Log Message:
  -----------
  [OpenCL] Add clang extension for function pointers.

The new clang internal extension '__cl_clang_function_pointers'
allows use of function pointers and other features that have
the same functionality:
- Use of member function pointers;
- Unrestricted use of references to functions;
- Virtual member functions.

This not a vendor extension and therefore it doesn't require any
special target support. Exposing this functionality fully
will require vendor or Khronos extension.

Tags: #clang

Differential Revision: https://reviews.llvm.org/D94021


  Commit: 0e874fc014be818a9c6782729f2c8e8273a7a906
      https://github.com/llvm/llvm-project/commit/0e874fc014be818a9c6782729f2c8e8273a7a906
  Author: Anastasia Stulova <anastasia.stulova at arm.com>
  Date:   2021-01-06 (Wed, 06 Jan 2021)

  Changed paths:
    M clang/docs/LanguageExtensions.rst
    M clang/include/clang/Basic/OpenCLExtensions.def
    M clang/lib/Basic/Targets/AMDGPU.h
    M clang/lib/Basic/Targets/NVPTX.h
    M clang/lib/Sema/SemaType.cpp
    M clang/test/Misc/amdgcn.languageOptsOpenCL.cl
    M clang/test/Misc/nvptx.languageOptsOpenCL.cl
    M clang/test/Misc/r600.languageOptsOpenCL.cl
    M clang/test/SemaOpenCL/extension-version.cl
    M clang/test/SemaOpenCL/func.cl

  Log Message:
  -----------
  [OpenCL] Add clang extension for variadic functions.

With the internal clang extension '__cl_clang_variadic_functions'
variadic functions are accepted by the frontend.

This is not a fully supported vendor/Khronos extension
as it can only be used on targets with variadic prototype
support or in metaprogramming to represent functions with
generic prototype without calling such functions in the
kernel code.

Tags: #clang

Differential Revision: https://reviews.llvm.org/D94027


Compare: https://github.com/llvm/llvm-project/compare/badc7606b0f6...0e874fc014be


More information about the All-commits mailing list