Commit Graph

3 Commits

Author SHA1 Message Date
Anastasia Stulova 1f95cc097c [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
llvm-svn: 262616
2016-03-03 13:33:19 +00:00
Xiuli Pan 379554ac5b [OpenCL] Add Sema checks for types
Summary:
Add Sema checks for opencl type: image, pipe....
This patch is partitioned from http://reviews.llvm.org/D16047

Reviewers: Anastasia, yaxunl

Subscribers: pekka.jaaskelainen, cfe-commits

Differential Revision: http://reviews.llvm.org/D17437

llvm-svn: 261818
2016-02-25 03:34:20 +00:00
Guy Benyei 610541989a Add OpenCL samplers as Clang builtin types and check sampler related restrictions.
llvm-svn: 174601
2013-02-07 10:55:47 +00:00