This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Fix version reporting of C++ for OpenCL 2021
ClosedPublic

Authored by Topotuna on Aug 19 2021, 8:19 AM.

Details

Summary

C++ for OpenCL version 2021 and later are expected to consist of a
major version number only. Therefore, a different constructor for
VersionTuple needs to be called when reporting language version.

Diff Detail

Event Timeline

Topotuna created this revision.Aug 19 2021, 8:19 AM
Topotuna requested review of this revision.Aug 19 2021, 8:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 19 2021, 8:19 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
Anastasia accepted this revision.Aug 19 2021, 8:32 AM

LGTM! Thanks!

I imagine you will be adding some tests that will check the correctness of diagnostic wording in the subsequent commits?

This revision is now accepted and ready to land.Aug 19 2021, 8:32 AM

LGTM! Thanks!

I imagine you will be adding some tests that will check the correctness of diagnostic wording in the subsequent commits?

Yes, I will add tests for diagnostics reporting once C++ for OpenCL 2021 achieves similar functionality as OpenCL 3.0.

This revision was automatically updated to reflect the committed changes.

Changes rG054e331d9dbd and rG37cdc7ebd9a3 contain test cases that display C++ for OpenCL version 2021 in diagnostics.