This is an archive of the discontinued LLVM Phabricator instance.

[OpenCL] Ignore parentheses for sampler initialization
ClosedPublic

Authored by svenvh on Aug 12 2019, 4:43 AM.

Details

Summary

The sampler handling logic in SemaInit.cpp would inadvertently treat
parentheses around sampler arguments as an implicit cast, leading to
an unreachable "can't implicitly cast lvalue to rvalue with
this cast kind". Fix by ignoring parentheses once we are in the
sampler initializer case.

Diff Detail

Repository
rL LLVM

Event Timeline

svenvh created this revision.Aug 12 2019, 4:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2019, 4:43 AM
Anastasia accepted this revision.Aug 12 2019, 5:06 AM

LGTM! Thanks!

This revision is now accepted and ready to land.Aug 12 2019, 5:06 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 12 2019, 5:43 AM