minix/external/bsd/llvm/dist/clang/test/SemaOpenCL/sampler_t.cl
Lionel Sambuc f4a2713ac8 Importing netbsd clang -- pristine
Change-Id: Ia40e9ffdf29b5dab2f122f673ff6802a58bc690f
2014-07-28 17:05:57 +02:00

13 lines
416 B
Common Lisp

// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only
constant sampler_t glb_smp = 5;
void foo(sampler_t);
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 = 7;
foo(glb_smp);
foo(const_smp);
foo(5); // expected-error {{sampler_t variable required - got 'int'}}
}