This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Add -Wconversion to fdeclare-opencl-builtins test
ClosedPublic

Authored by svenvh on Sep 18 2019, 8:42 AM.

Details

Summary

Add the -Wconversion -Werror options to check no unexpected conversion
is done.

Patch by Pierre Gondois and Sven van Haastregt.

Diff Detail

Repository
rL LLVM

Event Timeline

svenvh created this revision.Sep 18 2019, 8:42 AM
Herald added a project: Restricted Project. · View Herald Transcript
Anastasia added inline comments.Sep 24 2019, 8:20 AM
clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl
102 ↗(On Diff #220684)

I am slightly confused about this error, isn't get_sub_group_size supposed to return uint?

svenvh marked an inline comment as done.Sep 24 2019, 8:25 AM
svenvh added inline comments.
clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl
102 ↗(On Diff #220684)

I think this is a side-effect from the previous error. It failed to resolve get_sub_group_size so it inserted a placeholder declaration with return type int. Does that make sense?

Anastasia accepted this revision.Sep 24 2019, 2:46 PM

LGTM!

clang/test/SemaOpenCL/fdeclare-opencl-builtins.cl
102 ↗(On Diff #220684)

Ok, yes it's possibly a misparsing issue! Thanks!

This revision is now accepted and ready to land.Sep 24 2019, 2:46 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptSep 26 2019, 6:31 AM