This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Reject block arguments
ClosedPublic

Authored by svenvh on Jun 22 2020, 9:44 AM.

Details

Summary

OpenCL 2.0 does not allow block arguments, primarily because it is
difficult to support function pointers on the various architectures
that OpenCL targets. Clang was still accepting them.

Rename and reuse the err_opencl_half_param diagnostic.

Fixes PR46324.

Diff Detail

Event Timeline

svenvh created this revision.Jun 22 2020, 9:44 AM
Anastasia added inline comments.Jun 23 2020, 9:38 AM
clang/test/SemaOpenCL/invalid-block.cl
31

Can we add a test case with a block as a parameter of another block. :)

svenvh updated this revision to Diff 273253.Jun 25 2020, 1:47 AM

Add test case with a block as a parameter of another block.

Anastasia accepted this revision.Jun 26 2020, 2:49 AM

LGTM! Thanks!

This revision is now accepted and ready to land.Jun 26 2020, 2:49 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJun 29 2020, 6:26 AM