This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb510e0127da3: [OpenCL][NFC] Refactors lang version check in 
test. (authored by Anastasia).

Changed prior to commit:
  https://reviews.llvm.org/D106254?vs=359700&id=360843#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106254

Files:
  clang/test/SemaOpenCL/null_literal.cl


Index: clang/test/SemaOpenCL/null_literal.cl
===================================================================
--- clang/test/SemaOpenCL/null_literal.cl
+++ clang/test/SemaOpenCL/null_literal.cl
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -verify %s
-// RUN: %clang_cc1 -cl-std=CL2.0 -DCL20 -verify %s
+// RUN: %clang_cc1 -cl-std=CL2.0 -verify %s
 
 #define NULL ((void*)0)
 
@@ -13,7 +13,7 @@
 
 constant int* ptr4 = (global void*)0; // expected-error{{initializing 
'__constant int *__private' with an expression of type '__global void *' 
changes address space of pointer}}
 
-#ifdef CL20
+#if __OPENCL_C_VERSION__ == CL_VERSION_2_0
 // Accept explicitly pointer to generic address space in OpenCL v2.0.
 global int* ptr5 = (generic void*)0;
 #endif


Index: clang/test/SemaOpenCL/null_literal.cl
===================================================================
--- clang/test/SemaOpenCL/null_literal.cl
+++ clang/test/SemaOpenCL/null_literal.cl
@@ -1,5 +1,5 @@
 // RUN: %clang_cc1 -verify %s
-// RUN: %clang_cc1 -cl-std=CL2.0 -DCL20 -verify %s
+// RUN: %clang_cc1 -cl-std=CL2.0 -verify %s
 
 #define NULL ((void*)0)
 
@@ -13,7 +13,7 @@
 
 constant int* ptr4 = (global void*)0; // expected-error{{initializing '__constant int *__private' with an expression of type '__global void *' changes address space of pointer}}
 
-#ifdef CL20
+#if __OPENCL_C_VERSION__ == CL_VERSION_2_0
 // Accept explicitly pointer to generic address space in OpenCL v2.0.
 global int* ptr5 = (generic void*)0;
 #endif
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to