HomePhabricator

[OpenCL] Ignore parentheses for sampler initialization

Authored by svenvh on Aug 12 2019, 5:44 AM.

Description

[OpenCL] Ignore parentheses for sampler initialization

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.

Differential Revision: https://reviews.llvm.org/D66080

llvm-svn: 368561