summaryrefslogtreecommitdiff
path: root/lib/Sema/SemaExpr.cpp
diff options
context:
space:
mode:
authorSven van Haastregt <sven.vanhaastregt@arm.com>2018-11-01 12:43:00 +0000
committerSven van Haastregt <sven.vanhaastregt@arm.com>2018-11-01 12:43:00 +0000
commit380b0bc33d296e60b32c98bb3571b05ffeeb78d2 (patch)
tree32dca617ad83ac65a5e2d001ad7bc27b18995e10 /lib/Sema/SemaExpr.cpp
parente95e45bab780580be6313a80702b6a42596cad9e (diff)
downloadclang-380b0bc33d296e60b32c98bb3571b05ffeeb78d2.tar.gz
Allow clk_event_t comparisons
Also rename `invalid-clk-events-cl2.0.cl` to `clk_event_t.cl` and repurpose it to include both positive and negative clk_event_t tests. Differential Revision: https://reviews.llvm.org/D53871 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345825 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaExpr.cpp')
-rw-r--r--lib/Sema/SemaExpr.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Sema/SemaExpr.cpp b/lib/Sema/SemaExpr.cpp
index 8e04ae888b..ecda5be877 100644
--- a/lib/Sema/SemaExpr.cpp
+++ b/lib/Sema/SemaExpr.cpp
@@ -10497,6 +10497,10 @@ QualType Sema::CheckCompareOperands(ExprResult &LHS, ExprResult &RHS,
}
if (getLangOpts().OpenCLVersion >= 200) {
+ if (LHSType->isClkEventT() && RHSType->isClkEventT()) {
+ return computeResultTy();
+ }
+
if (LHSType->isQueueT() && RHSType->isQueueT()) {
return computeResultTy();
}