forked from OSchip/llvm-project
Enable queue_t and clk_event_t comparisons in C++ mode
Support queue_t and clk_event_t comparisons in C++ for OpenCL mode, to preserve backwards compatibility with OpenCL C. Differential Revision: https://reviews.llvm.org/D62208 llvm-svn: 361467
This commit is contained in:
parent
e98a8f7b2a
commit
50434e8df0
|
@ -10808,7 +10808,7 @@ QualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS,
|
|||
return computeResultTy();
|
||||
}
|
||||
|
||||
if (getLangOpts().OpenCLVersion >= 200) {
|
||||
if (getLangOpts().OpenCLVersion >= 200 || getLangOpts().OpenCLCPlusPlus) {
|
||||
if (LHSType->isClkEventT() && RHSType->isClkEventT()) {
|
||||
return computeResultTy();
|
||||
}
|
||||
|
|
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue