From 25ede4e0de367031e367f8e330d20d107dcc138c Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Tue, 14 Aug 2018 13:56:52 +0000 Subject: [PATCH] [OpenCL] Add test for constant sampler argument git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339678 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/SemaOpenCL/sampler_t.cl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/SemaOpenCL/sampler_t.cl b/test/SemaOpenCL/sampler_t.cl index 5a1850b02c..8473fa3363 100644 --- a/test/SemaOpenCL/sampler_t.cl +++ b/test/SemaOpenCL/sampler_t.cl @@ -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}; -- 2.40.0