Debian Codegraph @

llvm-project/llvm/projects/opencl-clang/patches/clang/0002-Remove-wrong-check-of-__opencl_c_images-feature-macr.patch

raw
1 From 9780cc0e044c73dcd549c67a1278a4ff7daf3b01 Mon Sep 17 00:00:00 2001
2 From: Marcin Naczk <[email protected]>
3 Date: Fri, 4 Nov 2022 15:41:16 +0100
4 Subject: [PATCH] Remove wrong check of __opencl_c_images feature macro
5
6 Deleted mechanism that wrongly assumes that
7 all functions that use image types must be under
8 __opencl_c_images feature macro
9 Mechanism added by https://reviews.llvm.org/D103911
10 More info on github issue:
11 https://github.com/llvm/llvm-project/issues/58017
12
13 diff --git a/clang/lib/Sema/SemaType.cpp b/clang/lib/Sema/SemaType.cpp
14 index 8cb1ed28fe3e..a3d3f16fd8a4 100644
15 --- a/clang/lib/Sema/SemaType.cpp
16 +++ b/clang/lib/Sema/SemaType.cpp
17 @@ -1751,13 +1751,7 @@ static QualType ConvertDeclSpecToType(TypeProcessingState &state) {
18 // __opencl_c_3d_image_writes feature. OpenCL C v3.0 API s4.2 - For devices
19 // that support OpenCL 3.0, cl_khr_3d_image_writes must be returned when and
20 // only when the optional feature is supported
21 - if ((Result->isImageType() || Result->isSamplerT()) &&
22 - (IsOpenCLC30Compatible &&
23 - !OpenCLOptions.isSupported("__opencl_c_images", S.getLangOpts()))) {
24 - S.Diag(DS.getTypeSpecTypeLoc(), diag::err_opencl_requires_extension)
25 - << 0 << Result << "__opencl_c_images";
26 - declarator.setInvalidType();
27 - } else if (Result->isOCLImage3dWOType() &&
28 + if (Result->isOCLImage3dWOType() &&
29 !OpenCLOptions.isSupported("cl_khr_3d_image_writes",
30 S.getLangOpts())) {
31 S.Diag(DS.getTypeSpecTypeLoc(), diag::err_opencl_requires_extension)