summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaOpenCL/invalid-pipes-cl2.0.cl
Commit message (Collapse)AuthorAgeFilesLines
* [OpenCL] Pretty print __private addr spaceAnastasia Stulova2019-12-271-7/+7
| | | | | | | | | | 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] Move addr space deduction to Sema.Anastasia Stulova2019-11-271-1/+1
| | | | | | | | | | | | | | | | In order to simplify implementation we are moving add space deduction into Sema while constructing variable declaration and on template instantiation. Pointee are deduced to generic addr space during creation of types. This commit also - fixed addr space dedution for auto type; - factors out in a separate helper function OpenCL specific logic from type diagnostics in var decl. Tags: #clang Differential Revision: https://reviews.llvm.org/D65744
* [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] Support pipe keyword in C++ modeSven van Haastregt2019-05-221-1/+4
| | | | | | | | | | | | Support the OpenCL C pipe feature in C++ for OpenCL mode, to preserve backwards compatibility with OpenCL C. Various changes had to be made in Parse and Sema to enable pipe-specific diagnostics, so enable a SemaOpenCL test for C++. Differential Revision: https://reviews.llvm.org/D62181 llvm-svn: 361382
* [OpenCL] Allow function declaration with empty argument list.Alexey Bader2017-10-111-1/+1
| | | | | | | | | | | | | | | | Treat 'f()' as 'f(void)' rather than a function w/o a prototype. Reviewers: Anastasia, yaxunl Reviewed By: Anastasia, yaxunl Subscribers: cfe-commits, echuraev, chapuni Differential Revision: https://reviews.llvm.org/D33681 Re-apply revision 306653. llvm-svn: 315453
* Revert r306653, "[OpenCL] Allow function declaration with empty argument list."NAKAMURA Takumi2017-06-291-1/+1
| | | | | | It broke bots. llvm-svn: 306660
* [OpenCL] Allow function declaration with empty argument list.Alexey Bader2017-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: does it make sense to enable K&R function declaration style for OpenCL? clang throws following error message for the declaration w/o arguments: ``` int my_func(); error: function with no prototype cannot use the spir_function calling convention ``` Current way to fix this issue is to specify that parameter list is empty by using 'void': ``` int my_func(void); ``` Let me know what do you think about this patch. Reviewers: Anastasia, yaxunl Reviewed By: Anastasia Subscribers: cfe-commits, echuraev Differential Revision: https://reviews.llvm.org/D33681 llvm-svn: 306653
* [OpenCL] reserve_id_t cannot be used as argument to kernel functionEgor Churaev2017-05-251-0/+5
| | | | | | | | | | | | Reviewers: Anastasia Reviewed By: Anastasia Subscribers: yaxunl, cfe-commits, bader Differential Revision: https://reviews.llvm.org/D33483 llvm-svn: 303846
* [OpenCL] Refactor read_only/write_only pipes.Joey Gouly2016-12-011-0/+9
| | | | | | | | | | | This adds the access qualifier to the Pipe Type, rather than using a class hierarchy. It also fixes mergeTypes for Pipes, by disallowing merges. Only identical pipe types can be merged. The test case in invalid-pipes-cl2.0.cl is added to check that. llvm-svn: 288332
* [OpenCL] Prohibit using reserve_id_t in program scope.Alexey Bader2016-11-291-0/+8
| | | | | | | | | | | | Patch by Egor Churaev (echuraev). Reviewers: Anastasia Subscribers: cfe-commits, yaxunl, bader Differential Revision: https://reviews.llvm.org/D27099 llvm-svn: 288126
* [OpenCL] Introduce ReadPipeType and WritePipeType.Joey Gouly2016-11-181-6/+6
| | | | | | | This allows Sema to diagnose passing a read_only pipe to a write_only pipe argument. llvm-svn: 287343
* [OpenCL] Improved diagnostics of OpenCL types.Anastasia Stulova2016-07-111-3/+14
| | | | | | | | | | | | | | - 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] Fix pipe type dump.Xiuli Pan2016-05-031-1/+1
| | | | | | | | | | | | | | Summary: Fix the dump of PipeType. Now we will have "pipe int" and element type. Reviewers: yaxunl, Anastasia Subscribers: cfe-commits, bader Differential Revision: http://reviews.llvm.org/D19524 llvm-svn: 268364
* [OpenCL] Add Sema checks for typesXiuli Pan2016-02-251-0/+3
| | | | | | | | | | | | | | 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
* [OpenCL] Pipe type supportXiuli Pan2016-01-091-0/+8
Summary: Support for OpenCL 2.0 pipe type. This is a bug-fix version for bader's patch reviews.llvm.org/D14441 Reviewers: pekka.jaaskelainen, Anastasia Subscribers: bader, Anastasia, cfe-commits Differential Revision: http://reviews.llvm.org/D15603 llvm-svn: 257254
OpenPOWER on IntegriCloud