diff options
author | Xiuli Pan <xiulipan@outlook.com> | 2016-03-04 07:11:16 +0000 |
---|---|---|
committer | Xiuli Pan <xiulipan@outlook.com> | 2016-03-04 07:11:16 +0000 |
commit | 4415bdbdc3afdb3c0a70afbfb7f74d39486b4a98 (patch) | |
tree | d1138a38eddd2ec4ecd4321646db584ee25525ca /clang/test/SemaOpenCL | |
parent | bacb98873594c6c5df06dad6bb54f7fd396c175f (diff) | |
download | bcm5719-llvm-4415bdbdc3afdb3c0a70afbfb7f74d39486b4a98.tar.gz bcm5719-llvm-4415bdbdc3afdb3c0a70afbfb7f74d39486b4a98.zip |
[OpenCL] Refine pipe builtin support
Summary:
Refine the type builtin support as the request with
http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160201/148637.html
Reviewers: pekka.jaaskelainen, Anastasia, yaxunl
Subscribers: rsmith, cfe-commits
Differential Revision: http://reviews.llvm.org/D16876
llvm-svn: 262692
Diffstat (limited to 'clang/test/SemaOpenCL')
-rw-r--r-- | clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl b/clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl index 7836a25e7f3..e9214c1b279 100644 --- a/clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl +++ b/clang/test/SemaOpenCL/invalid-pipe-builtin-cl2.0.cl @@ -5,22 +5,22 @@ void test1(read_only pipe int p, global int* ptr){ reserve_id_t rid; // read/write_pipe - read_pipe(tmp, p); // expected-error {{first argument to read_pipe must be a pipe type}} - read_pipe(p); // expected-error {{invalid number of arguments to function: read_pipe}} - read_pipe(p, tmp, tmp, ptr); // expected-error {{invalid argument type to function read_pipe (expecting 'reserve_id_t')}} - read_pipe(p, rid, rid, ptr); // expected-error {{invalid argument type to function read_pipe (expecting 'unsigned int')}} - read_pipe(p, tmp); // expected-error {{invalid argument type to function read_pipe (expecting 'int *')}} + read_pipe(tmp, p); // expected-error {{first argument to 'read_pipe' must be a pipe type}} + read_pipe(p); // expected-error {{invalid number of arguments to function: 'read_pipe'}} + read_pipe(p, tmp, tmp, ptr); // expected-error {{invalid argument type to function 'read_pipe' (expecting 'reserve_id_t')}} + read_pipe(p, rid, rid, ptr); // expected-error {{invalid argument type to function 'read_pipe' (expecting 'unsigned int')}} + read_pipe(p, tmp); // expected-error {{invalid argument type to function 'read_pipe' (expecting 'int *')}} write_pipe(p, ptr); // expected-error {{invalid pipe access modifier (expecting write_only)}} write_pipe(p, rid, tmp, ptr); // expected-error {{invalid pipe access modifier (expecting write_only)}} // reserve_read/write_pipe - reserve_read_pipe(p, ptr); // expected-error{{invalid argument type to function reserve_read_pipe (expecting 'unsigned int')}} - work_group_reserve_read_pipe(tmp, tmp); // expected-error{{first argument to work_group_reserve_read_pipe must be a pipe type}} + reserve_read_pipe(p, ptr); // expected-error{{invalid argument type to function 'reserve_read_pipe' (expecting 'unsigned int')}} + work_group_reserve_read_pipe(tmp, tmp); // expected-error{{first argument to 'work_group_reserve_read_pipe' must be a pipe type}} sub_group_reserve_write_pipe(p, tmp); // expected-error{{invalid pipe access modifier (expecting write_only)}} // commit_read/write_pipe - commit_read_pipe(tmp, rid); // expected-error{{first argument to commit_read_pipe must be a pipe type}} - work_group_commit_read_pipe(p, tmp); // expected-error{{invalid argument type to function work_group_commit_read_pipe (expecting 'reserve_id_t')}} + commit_read_pipe(tmp, rid); // expected-error{{first argument to 'commit_read_pipe' must be a pipe type}} + work_group_commit_read_pipe(p, tmp); // expected-error{{invalid argument type to function 'work_group_commit_read_pipe' (expecting 'reserve_id_t')}} sub_group_commit_write_pipe(p, tmp); // expected-error{{invalid pipe access modifier (expecting write_only)}} } @@ -29,27 +29,27 @@ void test2(write_only pipe int p, global int* ptr){ reserve_id_t rid; // read/write_pipe - write_pipe(tmp, p); // expected-error {{first argument to write_pipe must be a pipe type}} - write_pipe(p); // expected-error {{invalid number of arguments to function: write_pipe}} - write_pipe(p, tmp, tmp, ptr); // expected-error {{invalid argument type to function write_pipe (expecting 'reserve_id_t')}} - write_pipe(p, rid, rid, ptr); // expected-error {{invalid argument type to function write_pipe (expecting 'unsigned int')}} - write_pipe(p, tmp); // expected-error {{invalid argument type to function write_pipe (expecting 'int *')}} + write_pipe(tmp, p); // expected-error {{first argument to 'write_pipe' must be a pipe type}} + write_pipe(p); // expected-error {{invalid number of arguments to function: 'write_pipe'}} + write_pipe(p, tmp, tmp, ptr); // expected-error {{invalid argument type to function 'write_pipe' (expecting 'reserve_id_t')}} + write_pipe(p, rid, rid, ptr); // expected-error {{invalid argument type to function 'write_pipe' (expecting 'unsigned int')}} + write_pipe(p, tmp); // expected-error {{invalid argument type to function 'write_pipe' (expecting 'int *')}} read_pipe(p, ptr); // expected-error {{invalid pipe access modifier (expecting read_only)}} read_pipe(p, rid, tmp, ptr); // expected-error {{invalid pipe access modifier (expecting read_only)}} // reserve_read/write_pipe - reserve_write_pipe(p, ptr); // expected-error{{invalid argument type to function reserve_write_pipe (expecting 'unsigned int')}} - work_group_reserve_write_pipe(tmp, tmp); // expected-error{{first argument to work_group_reserve_write_pipe must be a pipe type}} + reserve_write_pipe(p, ptr); // expected-error{{invalid argument type to function 'reserve_write_pipe' (expecting 'unsigned int')}} + work_group_reserve_write_pipe(tmp, tmp); // expected-error{{first argument to 'work_group_reserve_write_pipe' must be a pipe type}} sub_group_reserve_read_pipe(p, tmp); // expected-error{{invalid pipe access modifier (expecting read_only)}} // commit_read/write_pipe - commit_write_pipe(tmp, rid); // expected-error{{first argument to commit_write_pipe must be a pipe type}} - work_group_commit_write_pipe(p, tmp); // expected-error{{invalid argument type to function work_group_commit_write_pipe (expecting 'reserve_id_t')}} + commit_write_pipe(tmp, rid); // expected-error{{first argument to 'commit_write_pipe' must be a pipe type}} + work_group_commit_write_pipe(p, tmp); // expected-error{{invalid argument type to function 'work_group_commit_write_pipe' (expecting 'reserve_id_t')}} sub_group_commit_read_pipe(p, tmp); // expected-error{{invalid pipe access modifier (expecting read_only)}} } void test3(){ int tmp; - get_pipe_num_packets(tmp); // expected-error {{first argument to get_pipe_num_packets must be a pipe type}} - get_pipe_max_packets(tmp); // expected-error {{first argument to get_pipe_max_packets must be a pipe type}} + get_pipe_num_packets(tmp); // expected-error {{first argument to 'get_pipe_num_packets' must be a pipe type}} + get_pipe_max_packets(tmp); // expected-error {{first argument to 'get_pipe_max_packets' must be a pipe type}} } |