[PATCH] D62208: [OpenCL] Enable queue_t and clk_event_t comparisons in C++ mode

Sven van Haastregt via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 23 02:17:37 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL361467: Enable queue_t and clk_event_t comparisons in C++ mode (authored by svenvh, committed by ).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D62208?vs=200534&id=200895#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D62208/new/

https://reviews.llvm.org/D62208

Files:
  cfe/trunk/lib/Sema/SemaExpr.cpp
  cfe/trunk/test/SemaOpenCL/clk_event_t.cl


Index: cfe/trunk/test/SemaOpenCL/clk_event_t.cl
===================================================================
--- cfe/trunk/test/SemaOpenCL/clk_event_t.cl
+++ cfe/trunk/test/SemaOpenCL/clk_event_t.cl
@@ -1,4 +1,5 @@
 // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL2.0
+// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=c++
 
 // Taken from opencl-c.h
 #define CLK_NULL_EVENT (__builtin_astype(((void*)(__SIZE_MAX__)), clk_event_t))
Index: cfe/trunk/lib/Sema/SemaExpr.cpp
===================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp
+++ cfe/trunk/lib/Sema/SemaExpr.cpp
@@ -10808,7 +10808,7 @@
     return computeResultTy();
   }
 
-  if (getLangOpts().OpenCLVersion >= 200) {
+  if (getLangOpts().OpenCLVersion >= 200 || getLangOpts().OpenCLCPlusPlus) {
     if (LHSType->isClkEventT() && RHSType->isClkEventT()) {
       return computeResultTy();
     }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62208.200895.patch
Type: text/x-patch
Size: 932 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190523/a432ed98/attachment.bin>


More information about the cfe-commits mailing list