Skip to content

Commit 96ab694

Browse files
committed
[SYCL-PTX] Address review comments
Signed-off-by: Victor Lomuller <[email protected]>
1 parent 4b1e7bb commit 96ab694

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

clang/lib/Sema/SemaType.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4952,12 +4952,11 @@ static TypeSourceInfo *GetFullTypeForDeclarator(TypeProcessingState &state,
49524952
if (LangOpts.OpenCL || LangOpts.SYCLIsDevice) {
49534953
// OpenCL v2.0 s6.12.5 - A block cannot be the return value of a
49544954
// function.
4955-
if (T->isBlockPointerType() || T->isImageType() || T->isSamplerT()) {
4956-
if (!T->isSampledImageType()) {
4957-
S.Diag(D.getIdentifierLoc(), diag::err_opencl_invalid_return)
4958-
<< T << 1 /*hint off*/;
4959-
D.setInvalidType(true);
4960-
}
4955+
if (!T->isSampledImageType() &&
4956+
(T->isBlockPointerType() || T->isImageType() || T->isSamplerT())) {
4957+
S.Diag(D.getIdentifierLoc(), diag::err_opencl_invalid_return)
4958+
<< T << 1 /*hint off*/;
4959+
D.setInvalidType(true);
49614960
}
49624961
// OpenCL doesn't support variadic functions and blocks
49634962
// (s6.9.e and s6.12.5 OpenCL v2.0) except for printf.

sycl/include/CL/__spirv/spirv_types.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,5 @@ __SYCL_SPV_IMAGE_TYPE(image1d_array_wo);
113113
__SYCL_SPV_IMAGE_TYPE(image2d_array_wo);
114114

115115
#undef __SYCL_SPV_IMAGE_TYPE
116+
#undef __SYCL_SPV_SAMPLED_AND_IMAGE_TYPE
116117
#endif

0 commit comments

Comments
 (0)