diff options
author | Guy Benyei <guy.benyei@intel.com> | 2013-02-07 16:05:33 +0000 |
---|---|---|
committer | Guy Benyei <guy.benyei@intel.com> | 2013-02-07 16:05:33 +0000 |
commit | 6959acd4bb0979361365e675968173ede7183489 (patch) | |
tree | c71de84904ff096b8b5834f63d3acca49e759c1f /test/SemaOpenCL | |
parent | 51dbecf89c8cc453964a3d831ceea3bca1a25cb5 (diff) |
Enable overloading of OpenCL events - this is needed for the overloaded OpenCL builtin functions.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174630 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaOpenCL')
-rw-r--r-- | test/SemaOpenCL/event_t_overload.cl | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/SemaOpenCL/event_t_overload.cl b/test/SemaOpenCL/event_t_overload.cl new file mode 100644 index 0000000000..bc3ec44bd2 --- /dev/null +++ b/test/SemaOpenCL/event_t_overload.cl @@ -0,0 +1,11 @@ +// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only + +void __attribute__((overloadable)) foo(event_t, __local char *); // expected-note {{candidate function not viable: no known conversion from '__global int *' to '__local char *' for 2nd argument}} +void __attribute__((overloadable)) foo(event_t, __local float *); // expected-note {{candidate function not viable: no known conversion from '__global int *' to '__local float *' for 2nd argument}} + +void kernel ker(__local char *src1, __local float *src2, __global int *src3) { + event_t evt; + foo(evt, src1); + foo(0, src2); + foo(evt, src3); // expected-error {{no matching function for call to 'foo'}} +} |