diff options
Diffstat (limited to 'clang/test/SemaOpenCL/sampler_t.cl')
-rw-r--r-- | clang/test/SemaOpenCL/sampler_t.cl | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/clang/test/SemaOpenCL/sampler_t.cl b/clang/test/SemaOpenCL/sampler_t.cl index 4d68dd20a17..5a1850b02cb 100644 --- a/clang/test/SemaOpenCL/sampler_t.cl +++ b/clang/test/SemaOpenCL/sampler_t.cl @@ -46,36 +46,11 @@ const constant sampler_t glb_smp11 = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_ void kernel ker(sampler_t argsmp) { local sampler_t smp; // expected-error{{sampler type cannot be used with the __local and __global address space qualifiers}} - const sampler_t const_smp = CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR; - const sampler_t const_smp2; - const sampler_t const_smp3 = const_smp; - const sampler_t const_smp4 = f(); const sampler_t const_smp5 = 1.0f; // expected-error{{initializing 'const sampler_t' with an expression of incompatible type 'float'}} const sampler_t const_smp6 = 0x100000000LL; // expected-error{{sampler_t initialization requires 32-bit integer, not 'long long'}} - foo(glb_smp); - foo(glb_smp2); - foo(glb_smp3); - foo(glb_smp4); - foo(glb_smp5); - foo(glb_smp6); - foo(glb_smp7); - foo(glb_smp8); - foo(glb_smp9); - foo(smp); - foo(sampler_str.smp); - foo(const_smp); - foo(const_smp2); - foo(const_smp3); - foo(const_smp4); - foo(const_smp5); - foo(const_smp6); - foo(argsmp); - foo(5); foo(5.0f); // expected-error {{passing 'float' to parameter of incompatible type 'sampler_t'}} - sampler_t sa[] = {argsmp, const_smp}; // expected-error {{array of 'sampler_t' type is invalid in OpenCL}} - foo(sa[0]); - foo(bad()); + sampler_t sa[] = {argsmp, glb_smp}; // expected-error {{array of 'sampler_t' type is invalid in OpenCL}} } void bad(sampler_t*); // expected-error{{pointer to type 'sampler_t' is invalid in OpenCL}} |