[OpenCL] Apply missing restrictions for Blocks in OpenCL v2.0
Applying the following restrictions for block types in OpenCL (v2.0 s6.12.5): - __block storage class is disallowed - every block declaration must be const qualified and initialized - a block can't be used as a return type of a function - a blocks can't be used to declare a structure or union field - extern speficier is disallowed Corrected image and sampler types diagnostics with struct and unions. Review: http://reviews.llvm.org/D16928 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@262616 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/DiagnosticSemaKinds.td 12 additions, 4 deletionsinclude/clang/Basic/DiagnosticSemaKinds.td
- lib/Sema/SemaDecl.cpp 55 additions, 23 deletionslib/Sema/SemaDecl.cpp
- lib/Sema/SemaType.cpp 10 additions, 1 deletionlib/Sema/SemaType.cpp
- test/CodeGen/blocks-opencl.cl 4 additions, 3 deletionstest/CodeGen/blocks-opencl.cl
- test/SemaOpenCL/event_t.cl 1 addition, 1 deletiontest/SemaOpenCL/event_t.cl
- test/SemaOpenCL/invalid-block.cl 42 additions, 12 deletionstest/SemaOpenCL/invalid-block.cl
- test/SemaOpenCL/invalid-kernel-parameters.cl 4 additions, 1 deletiontest/SemaOpenCL/invalid-kernel-parameters.cl
- test/SemaOpenCL/sampler_t.cl 5 additions, 1 deletiontest/SemaOpenCL/sampler_t.cl
Loading
Please register or sign in to comment