Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/Sema/SemaType.cpp
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
Show First 20 Lines • Show All 5,073 Lines • ▼ Show 20 Lines | case DeclaratorChunk::Function: { | ||||
diag::err_parameters_retval_cannot_have_fp16_type) << 1; | diag::err_parameters_retval_cannot_have_fp16_type) << 1; | ||||
D.setInvalidType(true); | D.setInvalidType(true); | ||||
} | } | ||||
} | } | ||||
if (LangOpts.OpenCL) { | if (LangOpts.OpenCL) { | ||||
// OpenCL v2.0 s6.12.5 - A block cannot be the return value of a | // OpenCL v2.0 s6.12.5 - A block cannot be the return value of a | ||||
// function. | // function. | ||||
if (T->isBlockPointerType() || T->isImageType() || T->isSamplerT() || | if (!T->isSampledImageType() && | ||||
T->isPipeType()) { | (T->isBlockPointerType() || T->isImageType() || T->isSamplerT() || | ||||
T->isPipeType())) { | |||||
S.Diag(D.getIdentifierLoc(), diag::err_opencl_invalid_return) | S.Diag(D.getIdentifierLoc(), diag::err_opencl_invalid_return) | ||||
<< T << 1 /*hint off*/; | << T << 1 /*hint off*/; | ||||
D.setInvalidType(true); | D.setInvalidType(true); | ||||
} | } | ||||
// OpenCL doesn't support variadic functions and blocks | // OpenCL doesn't support variadic functions and blocks | ||||
// (s6.9.e and s6.12.5 OpenCL v2.0) except for printf. | // (s6.9.e and s6.12.5 OpenCL v2.0) except for printf. | ||||
// We also allow here any toolchain reserved identifiers. | // We also allow here any toolchain reserved identifiers. | ||||
if (FTI.isVariadic && | if (FTI.isVariadic && | ||||
▲ Show 20 Lines • Show All 3,972 Lines • Show Last 20 Lines |