]> granicus.if.org Git - clang/commitdiff
[OpenCL] Add test for constant sampler argument
authorSven van Haastregt <sven.vanhaastregt@arm.com>
Tue, 14 Aug 2018 13:56:52 +0000 (13:56 +0000)
committerSven van Haastregt <sven.vanhaastregt@arm.com>
Tue, 14 Aug 2018 13:56:52 +0000 (13:56 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339678 91177308-0d34-0410-b5e6-96231b3b80d8

test/SemaOpenCL/sampler_t.cl

index 5a1850b02cbd26308d30e1cda354915dec0a32b9..8473fa33631a1c2f568b7e92262e3c172bd31c95 100644 (file)
@@ -33,6 +33,8 @@ constant sampler_t glb_smp9 = 0x100000000LL; // expected-error{{sampler_t initia
 
 void foo(sampler_t); // expected-note{{passing argument to parameter here}}
 
+void constant_sampler(constant sampler_t s); // expected-error{{parameter may not be qualified with an address space}}
+
 constant struct sampler_s {
   sampler_t smp; // expected-error{{the 'sampler_t' type cannot be used to declare a structure or union field}}
 } sampler_str = {0};