This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Add clang extension for variadic functions
ClosedPublic

Authored by Anastasia on Jan 4 2021, 12:26 PM.

Details

Summary

This feature is primarily important in C++ mode because it opens up more opportunities to describe metaprogramming algorithms with function types.

This is clang and not a vendor extension and therefore it is only intended for internal or experimental use. The full feature will require changes in vendor toolchains that can be provided in the future via either vendor extensions or Khronos extensions.

This patch is implemented on top of related extension: https://reviews.llvm.org/D94021

Diff Detail

Event Timeline

Anastasia created this revision.Jan 4 2021, 12:26 PM
Anastasia requested review of this revision.Jan 4 2021, 12:26 PM
Anastasia retitled this revision from [OpenCL] Add clang extension for variadic function to [OpenCL] Add clang extension for variadic functions.

LGTM, just one question: I see in the other review you updated clang/test/SemaOpenCL/extension-version.cl. Do you need to do the same here?

Anastasia updated this revision to Diff 314869.Jan 6 2021, 5:50 AM

Added missing testing in extension-version.cl

LGTM, just one question: I see in the other review you updated clang/test/SemaOpenCL/extension-version.cl. Do you need to do the same here?

Good spot! Thanks!

mantognini accepted this revision.Jan 6 2021, 6:06 AM

Thanks for the update.

This revision is now accepted and ready to land.Jan 6 2021, 6:06 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2021, 12:40 PM