summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaOpenCL/invalid-image.cl
Commit message (Collapse)AuthorAgeFilesLines
* [OpenCL] Pretty print __private addr spaceAnastasia Stulova2019-12-271-5/+5
| | | | | | | | | | Add printing of __private address space to TypePrinter to allow it appears in diagnostics and AST dumps as all other language addr spaces. Tags: #clang Differential Revision: https://reviews.llvm.org/D71272
* [OpenCL] Rename lang mode flag for C++ modeAnastasia Stulova2019-07-251-1/+1
| | | | | | | | | | | | Rename lang mode flag to -cl-std=clc++/-cl-std=CLC++ or -std=clc++/-std=CLC++. This aligns with OpenCL C conversion and removes ambiguity with OpenCL C++. Differential Revision: https://reviews.llvm.org/D65102 llvm-svn: 367008
* [OpenCL][PR40707] Allow OpenCL C types in C++ mode.Anastasia Stulova2019-02-151-1/+2
| | | | | | Allow all OpenCL types to be parsed in C++ mode. llvm-svn: 354121
* [OpenCL] Use the semantic spelling of the Access attribute, rather than a ↵Joey Gouly2016-11-161-0/+6
| | | | | | | | | string. Also fix a latent bug, due to an incorrect traversal of the AttributeList. llvm-svn: 287100
* [OpenCL] Improved diagnostics of OpenCL types.Anastasia Stulova2016-07-111-3/+9
| | | | | | | | | | | | | | - Changes diagnostics for Blocks to be implicitly const qualified OpenCL v2.0 s6.12.5. - Added and unified diagnostics of some OpenCL special types: blocks, images, samplers, pipes. These types are intended for use with the OpenCL builtin functions only and, therefore, most regular uses are not allowed including assignments, arithmetic operations, pointer dereferencing, etc. Review: http://reviews.llvm.org/D21989 llvm-svn: 275061
* [OpenCL] Complete image types support.Alexey Bader2016-04-081-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I. Current implementation of images is not conformant to spec in the following points: 1. It makes no distinction with respect to access qualifiers and therefore allows to use images with different access type interchangeably. The following code would compile just fine: void write_image(write_only image2d_t img); kernel void foo(read_only image2d_t img) { write_image(img); } // Accepted code which is disallowed according to s6.13.14. 2. It discards access qualifier on generated code, which leads to generated code for the above example: call void @write_image(%opencl.image2d_t* %img); In OpenCL2.0 however we can have different calls into write_image with read_only and wite_only images. Also generally following compiler steps have no easy way to take different path depending on the image access: linking to the right implementation of image types, performing IR opts and backend codegen differently. 3. Image types are language keywords and can't be redeclared s6.1.9, which can happen currently as they are just typedef names. 4. Default access qualifier read_only is to be added if not provided explicitly. II. This patch corrects the above points as follows: 1. All images are encapsulated into a separate .def file that is inserted in different points where image handling is required. This avoid a lot of code repetition as all images are handled the same way in the code with no distinction of their exact type. 2. The Cartesian product of image types and image access qualifiers is added to the builtin types. This simplifies a lot handling of access type mismatch as no operations are allowed by default on distinct Builtin types. Also spec intended access qualifier as special type qualifier that are combined with an image type to form a distinct type (see statement above - images can't be created w/o access qualifiers). 3. Improves testing of images in Clang. Author: Anastasia Stulova Reviewers: bader, mgrang. Subscribers: pxli168, pekka.jaaskelainen, yaxunl. Differential Revision: http://reviews.llvm.org/D17821 llvm-svn: 265783
* [OpenCL] Add Sema checks for typesXiuli Pan2016-02-251-0/+8
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
OpenPOWER on IntegriCloud