This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Fix checking of vector type casting
ClosedPublic

Authored by yaxunl on Oct 2 2017, 8:58 AM.

Details

Summary

Currently clang allows the following code

int a;
int b = (const int) a;

However it does not the following code

int4 a;
int4 b = (const int4) a;

This is because Clang compares the qualified types instead of unqualified types for vector type casting, which causes the inconsistency.

This patch fixes that.

Diff Detail

Repository
rL LLVM

Event Timeline

yaxunl created this revision.Oct 2 2017, 8:58 AM
bader accepted this revision.Oct 3 2017, 5:21 AM

LGTM.

This revision is now accepted and ready to land.Oct 3 2017, 5:21 AM
This revision was automatically updated to reflect the committed changes.