[PATCH] D16047: [OpenCL] Add Sema checks for OpenCL 2.0

Pekka Jääskeläinen via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 11 10:05:24 PST 2016


pekka.jaaskelainen added inline comments.

================
Comment at: lib/Sema/SemaDecl.cpp:5733
@@ +5732,3 @@
+
+#if 0
+
----------------
Is this intentionally included in the patch? 

================
Comment at: lib/Sema/SemaDecl.cpp:6759
@@ +6758,3 @@
+
+#if 0
+  // OpenCL v2.0 s6.9.b
----------------
Ditto. Better not commit disabled code in the repository.

================
Comment at: lib/Sema/SemaDecl.cpp:7305
@@ -7211,3 +7304,3 @@
       return PtrPtrKernelParam;
-    return PointeeType.getAddressSpace() == 0 ? PrivatePtrKernelParam
-                                              : PtrKernelParam;
+    //TODO?
+    //return PointeeType.getAddressSpace() == 0 ? PrivatePtrKernelParam
----------------
Ditto.

================
Comment at: lib/Sema/SemaExpr.cpp:6295
@@ +6294,3 @@
+  // OpenCL v2.0 s6.12.5 -- To support these behaviors, additional
+  // restrictions28 in addition to the above feature restrictions are: Blocks
+  // cannot be used as expressions of the ternary selection operator (?:).
----------------
-28

================
Comment at: lib/Sema/SemaExpr.cpp:6298
@@ +6297,3 @@
+  if (getLangOpts().OpenCL && getLangOpts().OpenCLVersion >= 200) {
+    if (checkBlockType(*this, LHS.get()) | checkBlockType(*this, RHS.get()))
+      return QualType();
----------------
||


http://reviews.llvm.org/D16047





More information about the cfe-commits mailing list