Anastasia created this revision. Anastasia added a reviewer: bader. Herald added subscribers: ebevhan, yaxunl.
Moved testing of the default header into the Driver test and also added a test line for C++ mode in printf test. Follow up from https://reviews.llvm.org/D59219 https://reviews.llvm.org/D59486 Files: test/Driver/include-default-header.cl test/SemaOpenCL/builtin.cl test/SemaOpenCL/extensions.cl Index: test/SemaOpenCL/extensions.cl =================================================================== --- test/SemaOpenCL/extensions.cl +++ test/SemaOpenCL/extensions.cl @@ -28,7 +28,7 @@ // enabled by default with -cl-std=CL2.0). // // RUN: %clang_cc1 %s -triple amdgcn-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=CL2.0 -finclude-default-header -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=c++ -finclude-default-header +// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=c++ #ifdef _OPENCL_H_ // expected-no-diagnostics Index: test/SemaOpenCL/builtin.cl =================================================================== --- test/SemaOpenCL/builtin.cl +++ test/SemaOpenCL/builtin.cl @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL1.2 +// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=c++ // expected-no-diagnostics Index: test/Driver/include-default-header.cl =================================================================== --- test/Driver/include-default-header.cl +++ test/Driver/include-default-header.cl @@ -1,5 +1,7 @@ -// RUN: %clang -save-temps -x cl -Xclang -cl-std=CL2.0 -Xclang -finclude-default-header -emit-llvm -S -### %s -// CHECK-NOT: finclude-default-header +// RUN: %clang -save-temps -x cl -Xclang -cl-std=CL2.0 -Xclang -finclude-default-header -emit-llvm -S -### %s 2>&1 | FileCheck %s +// RUN: %clang -save-temps -x cl -Xclang -cl-std=c++ -Xclang -finclude-default-header -emit-llvm -S -### %s 2>&1 | FileCheck %s + +// CHECK-LABEL: finclude-default-header // Make sure we don't pass -finclude-default-header to any commands other than the driver. void test() {}
Index: test/SemaOpenCL/extensions.cl =================================================================== --- test/SemaOpenCL/extensions.cl +++ test/SemaOpenCL/extensions.cl @@ -28,7 +28,7 @@ // enabled by default with -cl-std=CL2.0). // // RUN: %clang_cc1 %s -triple amdgcn-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=CL2.0 -finclude-default-header -// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=c++ -finclude-default-header +// RUN: %clang_cc1 %s -triple spir-unknown-unknown -verify -pedantic -fsyntax-only -cl-std=c++ #ifdef _OPENCL_H_ // expected-no-diagnostics Index: test/SemaOpenCL/builtin.cl =================================================================== --- test/SemaOpenCL/builtin.cl +++ test/SemaOpenCL/builtin.cl @@ -1,4 +1,5 @@ // RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=CL1.2 +// RUN: %clang_cc1 %s -verify -pedantic -fsyntax-only -cl-std=c++ // expected-no-diagnostics Index: test/Driver/include-default-header.cl =================================================================== --- test/Driver/include-default-header.cl +++ test/Driver/include-default-header.cl @@ -1,5 +1,7 @@ -// RUN: %clang -save-temps -x cl -Xclang -cl-std=CL2.0 -Xclang -finclude-default-header -emit-llvm -S -### %s -// CHECK-NOT: finclude-default-header +// RUN: %clang -save-temps -x cl -Xclang -cl-std=CL2.0 -Xclang -finclude-default-header -emit-llvm -S -### %s 2>&1 | FileCheck %s +// RUN: %clang -save-temps -x cl -Xclang -cl-std=c++ -Xclang -finclude-default-header -emit-llvm -S -### %s 2>&1 | FileCheck %s + +// CHECK-LABEL: finclude-default-header // Make sure we don't pass -finclude-default-header to any commands other than the driver. void test() {}
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits