[PATCH] D31594: [OpenCL] Enables passing sampler initializer to function argument

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 3 09:52:26 PDT 2017


Anastasia added inline comments.


================
Comment at: test/SemaOpenCL/sampler_t.cl:68
   foo(argsmp);
-  foo(5); // expected-error{{sampler_t variable required - got 'int'}}
+  foo(CLK_ADDRESS_CLAMP_TO_EDGE | CLK_NORMALIZED_COORDS_TRUE | CLK_FILTER_LINEAR);
   sampler_t sa[] = {argsmp, const_smp}; // expected-error {{array of 'sampler_t' type is invalid in OpenCL}}
----------------
I think we could keep just an int value (i.e. 5) as well.

Could we add a case with an error though. To make sure we are testing the diagnostic too.


https://reviews.llvm.org/D31594





More information about the cfe-commits mailing list