From: Daniel Dunbar Date: Tue, 29 Jun 2010 16:52:24 +0000 (+0000) Subject: tests: Use %clangxx when using driver for C++, in case C++ support is disabled. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9fde9c424f734e1ef45177999e3a04faad127414;p=clang tests: Use %clangxx when using driver for C++, in case C++ support is disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@107153 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp index 1aa163a8d8..27b41a755e 100644 --- a/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp +++ b/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p10.cpp @@ -1,4 +1,4 @@ -// RUN: %clang -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s namespace test0 { namespace ns0 { diff --git a/test/CodeGenCXX/constructor-convert.cpp b/test/CodeGenCXX/constructor-convert.cpp index 7de07724bf..338febbe97 100644 --- a/test/CodeGenCXX/constructor-convert.cpp +++ b/test/CodeGenCXX/constructor-convert.cpp @@ -1,4 +1,4 @@ -// RUN: %clang -emit-llvm -S -o - %s +// RUN: %clang_cc1 -emit-llvm -o - %s // PR5775 class Twine { diff --git a/test/CodeGenCXX/cxx-apple-kext.cpp b/test/CodeGenCXX/cxx-apple-kext.cpp index 4ba69069be..e9a17277b0 100644 --- a/test/CodeGenCXX/cxx-apple-kext.cpp +++ b/test/CodeGenCXX/cxx-apple-kext.cpp @@ -1,6 +1,6 @@ -// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 %s -flto -S -o - |\ +// RUN: %clangxx -ccc-host-triple x86_64-apple-darwin10 %s -flto -S -o - |\ // RUN: FileCheck --check-prefix=CHECK-NO-KEXT %s -// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 %s -fapple-kext -flto -S -o - |\ +// RUN: %clangxx -ccc-host-triple x86_64-apple-darwin10 %s -fapple-kext -flto -S -o - |\ // RUN: FileCheck --check-prefix=CHECK-KEXT %s // CHECK-NO-KEXT-NOT: _GLOBAL__D_a diff --git a/test/Driver/cxx-pth.cpp b/test/Driver/cxx-pth.cpp index e349691d42..97afb5ebe8 100644 --- a/test/Driver/cxx-pth.cpp +++ b/test/Driver/cxx-pth.cpp @@ -1,12 +1,12 @@ // Test forced PTH for CXX support. -// RUN: %clang -x c++-header %s -### 2> %t.log +// RUN: %clangxx -x c++-header %s -### 2> %t.log // RUN: FileCheck -check-prefix EMIT -input-file %t.log %s // EMIT: "{{.*}}/clang{{.*}}" {{.*}} "-emit-pth" "{{.*}}.cpp.gch" "-x" "c++-header" "{{.*}}.cpp" // RUN: touch %t.h.gch -// RUN: %clang -E -include %t.h %s -### 2> %t.log +// RUN: %clangxx -E -include %t.h %s -### 2> %t.log // RUN: FileCheck -check-prefix USE -input-file %t.log %s // USE: "{{.*}}/clang{{.*}}" {{.*}}"-include-pth" "{{.*}}.h.gch" {{.*}}"-x" "c++" "{{.*}}.cpp" diff --git a/test/Headers/x86-intrinsics-headers.c b/test/Headers/x86-intrinsics-headers.c index 24c2d925e0..08abcefed7 100644 --- a/test/Headers/x86-intrinsics-headers.c +++ b/test/Headers/x86-intrinsics-headers.c @@ -1,6 +1,6 @@ // RUN: %clang -fsyntax-only %s // RUN: %clang -fsyntax-only -fno-lax-vector-conversions %s -// RUN: %clang -fsyntax-only -x c++ %s +// RUN: %clangxx -fsyntax-only -x c++ %s #if defined(i386) || defined(__x86_64__) diff --git a/test/Lexer/has_feature_cxx0x.cpp b/test/Lexer/has_feature_cxx0x.cpp index 7ea4c2c1cd..650e577ca7 100644 --- a/test/Lexer/has_feature_cxx0x.cpp +++ b/test/Lexer/has_feature_cxx0x.cpp @@ -1,5 +1,5 @@ -// RUN: %clang -E -std=c++0x %s -o - | FileCheck --check-prefix=CHECK-0X %s -// RUN: %clang -E %s -o - | FileCheck --check-prefix=CHECK-NO-0X %s +// RUN: %clang_cc1 -E -std=c++0x %s -o - | FileCheck --check-prefix=CHECK-0X %s +// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-0X %s #if __has_feature(cxx_lambdas) int lambdas(); diff --git a/test/Lexer/has_feature_exceptions.cpp b/test/Lexer/has_feature_exceptions.cpp index cfd1efbf84..bb5dc0c133 100644 --- a/test/Lexer/has_feature_exceptions.cpp +++ b/test/Lexer/has_feature_exceptions.cpp @@ -1,5 +1,5 @@ -// RUN: %clang -E -fexceptions %s -o - | FileCheck --check-prefix=CHECK-EXCEPTIONS %s -// RUN: %clang -E -fno-exceptions %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s +// RUN: %clang_cc1 -E -fexceptions %s -o - | FileCheck --check-prefix=CHECK-EXCEPTIONS %s +// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-NO-EXCEPTIONS %s #if __has_feature(cxx_exceptions) int foo(); diff --git a/test/Lexer/has_feature_rtti.cpp b/test/Lexer/has_feature_rtti.cpp index 690906c292..4bfeead329 100644 --- a/test/Lexer/has_feature_rtti.cpp +++ b/test/Lexer/has_feature_rtti.cpp @@ -1,5 +1,5 @@ -// RUN: %clang -E -frtti %s -o - | FileCheck --check-prefix=CHECK-RTTI %s -// RUN: %clang -E -fno-rtti %s -o - | FileCheck --check-prefix=CHECK-NO-RTTI %s +// RUN: %clang_cc1 -E %s -o - | FileCheck --check-prefix=CHECK-RTTI %s +// RUN: %clang_cc1 -E -fno-rtti %s -o - | FileCheck --check-prefix=CHECK-NO-RTTI %s #if __has_feature(cxx_rtti) int foo(); diff --git a/test/Misc/macro-backtrace-limit.c b/test/Misc/macro-backtrace-limit.c index bc7a4da93a..1e512febef 100644 --- a/test/Misc/macro-backtrace-limit.c +++ b/test/Misc/macro-backtrace-limit.c @@ -1,4 +1,4 @@ -// RUN: %clang-cc1 -fsyntax-only -fmacro-backtrace-limit 5 %s > %t 2>&1 +// RUN: %clang_cc1 -fsyntax-only -fmacro-backtrace-limit 5 %s > %t 2>&1 // RUN: FileCheck %s < %t #define M1(A, B) ((A) < (B)) diff --git a/test/SemaCXX/warn-unreachable.cpp b/test/SemaCXX/warn-unreachable.cpp index 01b36de571..f5601cd2df 100644 --- a/test/SemaCXX/warn-unreachable.cpp +++ b/test/SemaCXX/warn-unreachable.cpp @@ -1,4 +1,4 @@ -// RUN: %clang %s -fsyntax-only -Xclang -verify -fblocks -Wunreachable-code -Wno-unused-value +// RUN: %clang_cc1 %s -fsyntax-only -verify -fblocks -Wunreachable-code -Wno-unused-value int &halt() __attribute__((noreturn)); int &live(); diff --git a/test/SemaObjCXX/instantiate-message.mm b/test/SemaObjCXX/instantiate-message.mm index 46c8ede26a..e09b1829e3 100644 --- a/test/SemaObjCXX/instantiate-message.mm +++ b/test/SemaObjCXX/instantiate-message.mm @@ -1,4 +1,4 @@ -// RUN: %clang -cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify %s // Test template instantiation of Objective-C message sends. diff --git a/test/SemaTemplate/example-dynarray.cpp b/test/SemaTemplate/example-dynarray.cpp index 1f6ede67a5..999521e91e 100644 --- a/test/SemaTemplate/example-dynarray.cpp +++ b/test/SemaTemplate/example-dynarray.cpp @@ -1,4 +1,4 @@ -// RUN: %clang -emit-llvm -S -o %t %s +// RUN: %clangxx -emit-llvm -c -o - %s #include #include #include diff --git a/test/lit.cfg b/test/lit.cfg index b306331703..42de5cbc5f 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -128,7 +128,8 @@ config.clang = inferClang(config.environment['PATH']) if not lit.quiet: lit.note('using clang: %r' % config.clang) config.substitutions.append( ('%clang_cc1', config.clang + ' -cc1') ) -config.substitutions.append( ('%clangxx', ' ' + config.clang + ' -ccc-cxx')) +config.substitutions.append( ('%clangxx', ' ' + config.clang + + ' -ccc-clang-cxx -ccc-cxx ')) config.substitutions.append( ('%clang', ' ' + config.clang + ' ') ) # FIXME: Find nicer way to prohibit this. @@ -142,3 +143,6 @@ config.substitutions.append( config.substitutions.append( (' clang -cc1 ', """*** Do not use 'clang -cc1' in tests, use '%clang_cc1'. ***""") ) +config.substitutions.append( + (' %clang-cc1 ', + """*** invalid substitution, use '%clang_cc1'. ***""") )