[PATCH] D21567: [OpenCL] Generate struct type for sampler_t and function call for the initializer

Anastasia Stulova via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 28 10:05:38 PDT 2016


Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.

LGTM! Thanks! Could you please address these small comments before committing!


================
Comment at: lib/Sema/SemaInit.cpp:6959
@@ +6958,3 @@
+        // this has already been done when parsing the variable declaration.
+        // Do not diagnose this since it has already been diagnosed when parsing
+        // the initializer.
----------------
Can you remove this sentence as it duplicates the previous one.

================
Comment at: lib/Sema/SemaInit.cpp:6961
@@ +6960,3 @@
+        // the initializer.
+        if (!Init->isConstantInitializer(S.Context, false))
+          break;
----------------
I think you don't need this check any more because this code is inside the else part. Could you please double check before committing?

================
Comment at: test/CodeGenOpenCL/sampler.cl:3
@@ +2,3 @@
+//
+// This test covers 6 cases of sampler initialzation:
+//   1. function argument passing
----------------
5 cases


https://reviews.llvm.org/D21567





More information about the cfe-commits mailing list