Topotuna created this revision. Topotuna added a reviewer: Anastasia. Herald added subscribers: ldrumm, yaxunl. Topotuna requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Removes run line declaration -DCL20 and substitutes it with condition on macro CL_VERSION_2_0. Repository: rG LLVM Github Monorepo 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 @@ -2,7 +2,7 @@ // RUN: %clang_cc1 -cl-std=CL1.0 -fdeclare-opencl-builtins -finclude-default-header -verify %s // RUN: %clang_cc1 -cl-std=CL1.1 -fdeclare-opencl-builtins -finclude-default-header -verify %s // RUN: %clang_cc1 -cl-std=CL1.2 -fdeclare-opencl-builtins -finclude-default-header -verify %s -// RUN: %clang_cc1 -cl-std=CL2.0 -DCL20 -fdeclare-opencl-builtins -finclude-default-header -verify %s +// RUN: %clang_cc1 -cl-std=CL2.0 -fdeclare-opencl-builtins -finclude-default-header -verify %s void foo(){ @@ -14,7 +14,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 @@ -2,7 +2,7 @@ // RUN: %clang_cc1 -cl-std=CL1.0 -fdeclare-opencl-builtins -finclude-default-header -verify %s // RUN: %clang_cc1 -cl-std=CL1.1 -fdeclare-opencl-builtins -finclude-default-header -verify %s // RUN: %clang_cc1 -cl-std=CL1.2 -fdeclare-opencl-builtins -finclude-default-header -verify %s -// RUN: %clang_cc1 -cl-std=CL2.0 -DCL20 -fdeclare-opencl-builtins -finclude-default-header -verify %s +// RUN: %clang_cc1 -cl-std=CL2.0 -fdeclare-opencl-builtins -finclude-default-header -verify %s void foo(){ @@ -14,7 +14,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