1 | // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=c++ |
---|---|
2 | // expected-no-diagnostics |
3 | |
4 | struct RetGlob { |
5 | int dummy; |
6 | }; |
7 | |
8 | struct RetGen { |
9 | char dummy; |
10 | }; |
11 | |
12 | RetGlob foo(const __global int *); |
13 | RetGen foo(const __generic int *); |
14 | |
15 | void kernel k() { |
16 | __global int *ArgGlob; |
17 | __generic int *ArgGen; |
18 | __local int *ArgLoc; |
19 | RetGlob TestGlob = foo(ArgGlob); |
20 | RetGen TestGen = foo(ArgGen); |
21 | TestGen = foo(ArgLoc); |
22 | } |
23 |