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

Xiuli PAN via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 11 20:47:05 PST 2016


pxli168 added inline comments.

================
Comment at: lib/Sema/SemaDecl.cpp:5733
@@ +5732,3 @@
+
+#if 0
+
----------------
pekka.jaaskelainen wrote:
> Is this intentionally included in the patch? 
My mistake, just want to check if this works. But find it is handled by something else.

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

================
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 (?:).
----------------
pekka.jaaskelainen wrote:
> -28
Fixed

================
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();
----------------
pekka.jaaskelainen wrote:
> ||
Intend to do this in order to get both err diag for both LHS and RHS.


http://reviews.llvm.org/D16047





More information about the cfe-commits mailing list