diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp --- a/clang/lib/Driver/Driver.cpp +++ b/clang/lib/Driver/Driver.cpp @@ -1889,7 +1889,7 @@ // Just print if -### was present. if (C.getArgs().hasArg(options::OPT__HASH_HASH_HASH)) { C.getJobs().Print(llvm::errs(), "\n", true); - return 0; + return Diags.hasErrorOccurred() ? 1 : 0; } // If there were errors building the compilation, quit now. diff --git a/clang/test/Driver/XRay/xray-instrument.c b/clang/test/Driver/XRay/xray-instrument.c --- a/clang/test/Driver/XRay/xray-instrument.c +++ b/clang/test/Driver/XRay/xray-instrument.c @@ -1,7 +1,7 @@ // RUN: %clang -### --target=aarch64-pc-freebsd -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s // RUN: %clang -### --target=arm64-apple-macos -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s // RUN: %clang -### --target=x86_64-apple-darwin -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s -// RUN: %clang -### --target=x86_64-pc-windows -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR +// RUN: not %clang -### --target=x86_64-pc-windows -fxray-instrument -c %s -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR // CHECK: "-cc1" {{.*}}"-fxray-instrument" // ERR: error: unsupported option '-fxray-instrument' for target diff --git a/clang/test/Driver/aarch64-ite.c b/clang/test/Driver/aarch64-ite.c --- a/clang/test/Driver/aarch64-ite.c +++ b/clang/test/Driver/aarch64-ite.c @@ -9,7 +9,7 @@ // RUN: %clang -### --target=aarch64-none-elf -march=armv9.3-a+noite %s 2>&1 | FileCheck %s --check-prefix=DISABLED // FEAT_ITE is invalid before v8 -// RUN: %clang -### --target=arm-none-none-eabi -march=armv7-a+ite %s 2>&1 | FileCheck %s --check-prefix=INVALID +// RUN: not %clang -### --target=arm-none-none-eabi -march=armv7-a+ite %s 2>&1 | FileCheck %s --check-prefix=INVALID // INVALID: error: unsupported argument 'armv7-a+ite' to option '-march=' // ENABLED: "-target-feature" "+ite" diff --git a/clang/test/Driver/aarch64-lrcpc3.c b/clang/test/Driver/aarch64-lrcpc3.c --- a/clang/test/Driver/aarch64-lrcpc3.c +++ b/clang/test/Driver/aarch64-lrcpc3.c @@ -17,7 +17,7 @@ // RUN: %clang -### --target=aarch64-none-elf -march=armv9-a+norcpc3 %s 2>&1 | FileCheck %s --check-prefix=DISABLED // FEAT_RCPC3 is invalid before v8 -// RUN: %clang -### --target=arm-none-none-eabi -march=armv7-a+rcpc3 %s 2>&1 | FileCheck %s --check-prefix=INVALID +// RUN: not %clang -### --target=arm-none-none-eabi -march=armv7-a+rcpc3 %s 2>&1 | FileCheck %s --check-prefix=INVALID // INVALID: error: unsupported argument 'armv7-a+rcpc3' to option '-march=' // ENABLED: "-target-feature" "+rcpc3" diff --git a/clang/test/Driver/aarch64-security-options.c b/clang/test/Driver/aarch64-security-options.c --- a/clang/test/Driver/aarch64-security-options.c +++ b/clang/test/Driver/aarch64-security-options.c @@ -21,10 +21,10 @@ // RUN: %clang --target=aarch64 -c %s -### -mbranch-protection=pac-ret -msign-return-address=none 2>&1 | \ // RUN: FileCheck %s --check-prefix=CONFLICT --check-prefix=WARN -// RUN: %clang --target=aarch64 -c %s -### -msign-return-address=foo 2>&1 | \ +// RUN: not %clang --target=aarch64 -c %s -### -msign-return-address=foo 2>&1 | \ // RUN: FileCheck %s --check-prefix=BAD-RA-PROTECTION --check-prefix=WARN -// RUN: %clang --target=aarch64 -c %s -### -mbranch-protection=bar 2>&1 | \ +// RUN: not %clang --target=aarch64 -c %s -### -mbranch-protection=bar 2>&1 | \ // RUN: FileCheck %s --check-prefix=BAD-BP-PROTECTION --check-prefix=WARN // RUN: %clang --target=aarch64 -### -o /dev/null -mbranch-protection=standard /dev/null 2>&1 | \ diff --git a/clang/test/Driver/aarch64-sve-vector-bits.c b/clang/test/Driver/aarch64-sve-vector-bits.c --- a/clang/test/Driver/aarch64-sve-vector-bits.c +++ b/clang/test/Driver/aarch64-sve-vector-bits.c @@ -46,9 +46,9 @@ // Error out if an unsupported value is passed to -msve-vector-bits. // ----------------------------------------------------------------------------- -// RUN: %clang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \ +// RUN: not %clang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \ // RUN: -msve-vector-bits=64 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s -// RUN: %clang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \ +// RUN: not %clang -c %s -### --target=aarch64-none-linux-gnu -march=armv8-a+sve \ // RUN: -msve-vector-bits=A 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s // CHECK-BAD-VALUE-ERROR: error: unsupported argument '{{.*}}' to option '-msve-vector-bits=' diff --git a/clang/test/Driver/aarch64-target-as-march.s b/clang/test/Driver/aarch64-target-as-march.s --- a/clang/test/Driver/aarch64-target-as-march.s +++ b/clang/test/Driver/aarch64-target-as-march.s @@ -35,7 +35,7 @@ // MULTIPLE-VALUES-NOT: "-target-feature" "+v8.2a /// march to compiler and assembler, we choose the one suited to the input file type -// RUN: %clang --target=aarch64-linux-gnueabi -### -c -Wa,-march=armv8.3-a -march=armv8.4-a %s 2>&1 | \ +// RUN: not %clang --target=aarch64-linux-gnueabi -### -c -Wa,-march=armv8.3-a -march=armv8.4-a %s 2>&1 | \ // RUN: FileCheck --check-prefix=TARGET-FEATURE-3 %s // RUN: %clang --target=aarch64-linux-gnueabi -### -c -Wa,-march=armv8.3-a -march=armv8.4-a \ // RUN: %S/Inputs/wildcard1.c 2>&1 | FileCheck --check-prefix=TARGET-FEATURE-4 %s @@ -46,9 +46,9 @@ // TARGET-FEATURE-4-NOT: "-target-feature" "+v8.3a" // Invalid -march settings -// RUN: %clang --target=aarch64-linux-gnueabi -### -c -Wa,-march=all %s 2>&1 | \ +// RUN: not %clang --target=aarch64-linux-gnueabi -### -c -Wa,-march=all %s 2>&1 | \ // RUN: FileCheck --check-prefix=INVALID-ARCH-1 %s -// RUN: %clang --target=aarch64-linux-gnueabi -### -c -Wa,-march=foobar %s 2>&1 | \ +// RUN: not %clang --target=aarch64-linux-gnueabi -### -c -Wa,-march=foobar %s 2>&1 | \ // RUN: FileCheck --check-prefix=INVALID-ARCH-2 %s // INVALID-ARCH-1: error: unsupported argument 'all' to option '-march=' diff --git a/clang/test/Driver/aarch64-the.c b/clang/test/Driver/aarch64-the.c --- a/clang/test/Driver/aarch64-the.c +++ b/clang/test/Driver/aarch64-the.c @@ -17,7 +17,7 @@ // RUN: %clang -### --target=aarch64-none-elf -march=armv9.3-a+nothe %s 2>&1 | FileCheck %s --check-prefix=DISABLED // FEAT_THE is invalid before v8 -// RUN: %clang -### --target=arm-none-none-eabi -march=armv7-a+the %s 2>&1 | FileCheck %s --check-prefix=INVALID +// RUN: not %clang -### --target=arm-none-none-eabi -march=armv7-a+the %s 2>&1 | FileCheck %s --check-prefix=INVALID // INVALID: error: unsupported argument 'armv7-a+the' to option '-march=' // ENABLED: "-target-feature" "+the" diff --git a/clang/test/Driver/aix-err-options.c b/clang/test/Driver/aix-err-options.c --- a/clang/test/Driver/aix-err-options.c +++ b/clang/test/Driver/aix-err-options.c @@ -1,21 +1,21 @@ -// RUN: %clang --target=powerpc-ibm-aix-xcoff -### -E -G 0 2>&1 %s | \ +// RUN: not %clang --target=powerpc-ibm-aix-xcoff -### -E -G 0 2>&1 %s | \ // RUN: FileCheck --check-prefix=CHECK32 %s -// RUN: %clang --target=powerpc-ibm-aix-xcoff -### -S -emit-llvm -G 0 2>&1 %s | \ +// RUN: not %clang --target=powerpc-ibm-aix-xcoff -### -S -emit-llvm -G 0 2>&1 %s | \ // RUN: FileCheck --check-prefix=CHECK32 %s -// RUN: %clang --target=powerpc-ibm-aix-xcoff -### -c -G 0 2>&1 %s | \ +// RUN: not %clang --target=powerpc-ibm-aix-xcoff -### -c -G 0 2>&1 %s | \ // RUN: FileCheck --check-prefix=CHECK32 %s // RUN: touch %t.s %t.o -// RUN: %clang --target=powerpc-ibm-aix-xcoff -### -c %t.s -G 0 2>&1 | FileCheck --check-prefix=CHECK32 %s -// RUN: %clang --target=powerpc-ibm-aix-xcoff -### -o dummy.so %t.o -G 0 2>&1 | FileCheck --check-prefix=CHECK32 %s +// RUN: not %clang --target=powerpc-ibm-aix-xcoff -### -c %t.s -G 0 2>&1 | FileCheck --check-prefix=CHECK32 %s +// RUN: not %clang --target=powerpc-ibm-aix-xcoff -### -o dummy.so %t.o -G 0 2>&1 | FileCheck --check-prefix=CHECK32 %s -// RUN: %clang --target=powerpc64-ibm-aix-xcoff -### -E -G 0 2>&1 %s | \ +// RUN: not %clang --target=powerpc64-ibm-aix-xcoff -### -E -G 0 2>&1 %s | \ // RUN: FileCheck --check-prefix=CHECK64 %s -// RUN: %clang --target=powerpc64-ibm-aix-xcoff -### -S -emit-llvm -G 0 2>&1 %s | \ +// RUN: not %clang --target=powerpc64-ibm-aix-xcoff -### -S -emit-llvm -G 0 2>&1 %s | \ // RUN: FileCheck --check-prefix=CHECK64 %s -// RUN: %clang --target=powerpc64-ibm-aix-xcoff -### -c -G 0 2>&1 %s | \ +// RUN: not %clang --target=powerpc64-ibm-aix-xcoff -### -c -G 0 2>&1 %s | \ // RUN: FileCheck --check-prefix=CHECK64 %s -// RUN: %clang --target=powerpc64-ibm-aix-xcoff -### -c %t.s -G 0 2>&1 | FileCheck --check-prefix=CHECK64 %s -// RUN: %clang --target=powerpc64-ibm-aix-xcoff -### -o dummy.so %t.o -G 0 2>&1 | FileCheck --check-prefix=CHECK64 %s +// RUN: not %clang --target=powerpc64-ibm-aix-xcoff -### -c %t.s -G 0 2>&1 | FileCheck --check-prefix=CHECK64 %s +// RUN: not %clang --target=powerpc64-ibm-aix-xcoff -### -o dummy.so %t.o -G 0 2>&1 | FileCheck --check-prefix=CHECK64 %s // CHECK32: error: unsupported option '-G' for target 'powerpc-ibm-aix-xcoff' // CHECK64: error: unsupported option '-G' for target 'powerpc64-ibm-aix-xcoff' diff --git a/clang/test/Driver/aix-ld.c b/clang/test/Driver/aix-ld.c --- a/clang/test/Driver/aix-ld.c +++ b/clang/test/Driver/aix-ld.c @@ -1071,7 +1071,7 @@ // CHECK-FOPENMP: "-lc" // Check powerpc-ibm-aix7.1.0.0, 32-bit. -fopenmp=libfoo results an error. -// RUN: %clang %s 2>&1 -### \ +// RUN: not %clang %s 2>&1 -### \ // RUN: --target=powerpc-ibm-aix7.1.0.0 \ // RUN: --sysroot %S/Inputs/aix_ppc_tree \ // RUN: -fopenmp=libfoo \ diff --git a/clang/test/Driver/aix-link-options-on-non-aix.c b/clang/test/Driver/aix-link-options-on-non-aix.c --- a/clang/test/Driver/aix-link-options-on-non-aix.c +++ b/clang/test/Driver/aix-link-options-on-non-aix.c @@ -1,8 +1,8 @@ /// AIX-specific link options are rejected for other targets. -// RUN: %clang -### --target=powerpc64-unknown-linux-gnu \ +// RUN: not %clang -### --target=powerpc64-unknown-linux-gnu \ // RUN: --sysroot %S/Inputs/aix_ppc_tree --unwindlib=libunwind --rtlib=compiler-rt \ // RUN: -b one -K -mxcoff-build-id=a %s 2>&1 | FileCheck %s --implicit-check-not=error: -// RUN: %clang -### --target=powerpc64-unknown-linux-gnu -c \ +// RUN: not %clang -### --target=powerpc64-unknown-linux-gnu -c \ // RUN: --sysroot %S/Inputs/aix_ppc_tree --unwindlib=libunwind --rtlib=compiler-rt \ // RUN: -b one -K -mxcoff-build-id=a %s 2>&1 | FileCheck %s --implicit-check-not=error: // CHECK: error: unsupported option '-b' for target '{{.*}}' diff --git a/clang/test/Driver/amdgpu-hip-system-arch.c b/clang/test/Driver/amdgpu-hip-system-arch.c --- a/clang/test/Driver/amdgpu-hip-system-arch.c +++ b/clang/test/Driver/amdgpu-hip-system-arch.c @@ -12,22 +12,22 @@ // RUN: chmod +x %t/amdgpu_arch_empty // case when amdgpu-arch returns nothing or fails -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_fail -x hip %s 2>&1 \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_fail -x hip %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=NO-OUTPUT-ERROR -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_fail -x hip %s 2>&1 \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_fail -x hip %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=NO-OUTPUT-ERROR // NO-OUTPUT-ERROR: error: cannot determine amdgcn architecture{{.*}}; consider passing it via '--offload-arch' // case when amdgpu-arch does not return anything with successful execution -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_empty -x hip %s 2>&1 \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_empty -x hip %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=EMPTY-OUTPUT -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_empty -x hip %s 2>&1 \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_empty -x hip %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=EMPTY-OUTPUT // EMPTY-OUTPUT: error: cannot determine amdgcn architecture: No AMD GPU detected in the system; consider passing it via '--offload-arch' // case when amdgpu-arch returns a gfx906 GPU. -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_gfx906 -x hip %s 2>&1 \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_gfx906 -x hip %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=ARCH-GFX906 -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_gfx906 -x hip %s 2>&1 \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --amdgpu-arch-tool=%t/amdgpu_arch_gfx906 -x hip %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=ARCH-GFX906 // ARCH-GFX906: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}}"-target-cpu" "gfx906" diff --git a/clang/test/Driver/amdgpu-openmp-system-arch-fail.c b/clang/test/Driver/amdgpu-openmp-system-arch-fail.c --- a/clang/test/Driver/amdgpu-openmp-system-arch-fail.c +++ b/clang/test/Driver/amdgpu-openmp-system-arch-fail.c @@ -13,11 +13,11 @@ // RUN: chmod +x %t/amdgpu_arch_empty // case when amdgpu_arch returns nothing or fails -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -nogpulib --amdgpu-arch-tool=%t/amdgpu_arch_fail %s 2>&1 \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -nogpulib --amdgpu-arch-tool=%t/amdgpu_arch_fail %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=NO-OUTPUT-ERROR // NO-OUTPUT-ERROR: error: cannot determine amdgcn architecture{{.*}}; consider passing it via '-march' // case when amdgpu_arch does not return anything with successful execution -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -nogpulib --amdgpu-arch-tool=%t/amdgpu_arch_empty %s 2>&1 \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -nogpulib --amdgpu-arch-tool=%t/amdgpu_arch_empty %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=EMPTY-OUTPUT // EMPTY-OUTPUT: error: cannot determine amdgcn architecture: No AMD GPU detected in the system; consider passing it via '-march' diff --git a/clang/test/Driver/apple-kext-mkernel.c b/clang/test/Driver/apple-kext-mkernel.c --- a/clang/test/Driver/apple-kext-mkernel.c +++ b/clang/test/Driver/apple-kext-mkernel.c @@ -13,8 +13,8 @@ // CHECK-X86-2: "-fno-rtti" // CHECK-X86-2-NOT: "-fno-common" -// RUN: %clang -target x86_64-apple-darwin11 -arch armv7 -mkernel -mstrict-align -### -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK-ARM %s -// RUN: %clang -target x86_64-apple-darwin11 -arch armv7 -mkernel -mstrict-align -### -fsyntax-only -fbuiltin -fno-builtin -fcommon -fno-common %s 2>&1 | FileCheck --check-prefix=CHECK-ARM %s +// RUN: not %clang -target x86_64-apple-darwin11 -arch armv7 -mkernel -mstrict-align -### -fsyntax-only %s 2>&1 | FileCheck --check-prefix=CHECK-ARM %s +// RUN: not %clang -target x86_64-apple-darwin11 -arch armv7 -mkernel -mstrict-align -### -fsyntax-only -fbuiltin -fno-builtin -fcommon -fno-common %s 2>&1 | FileCheck --check-prefix=CHECK-ARM %s // CHECK-ARM: "-target-feature" "+long-calls" // CHECK-ARM: "-target-feature" "+strict-align" diff --git a/clang/test/Driver/arclite-link-external-toolchain.c b/clang/test/Driver/arclite-link-external-toolchain.c --- a/clang/test/Driver/arclite-link-external-toolchain.c +++ b/clang/test/Driver/arclite-link-external-toolchain.c @@ -1,6 +1,6 @@ // RUN: rm -rf %t.tmpdir // RUN: mkdir -p %t.tmpdir/Xcode.app/Contents/Developers/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -// RUN: %clang -### -target x86_64-apple-macos10.10 -fobjc-link-runtime -lfoo \ +// RUN: not %clang -### -target x86_64-apple-macos10.10 -fobjc-link-runtime -lfoo \ // RUN: -isysroot %t.tmpdir/Xcode.app/Contents/Developers/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk \ // RUN: %s 2>&1 | FileCheck %s diff --git a/clang/test/Driver/arclite-link.c b/clang/test/Driver/arclite-link.c --- a/clang/test/Driver/arclite-link.c +++ b/clang/test/Driver/arclite-link.c @@ -1,6 +1,6 @@ // RUN: touch %t.o // RUN: mkdir -p %t.tmpdir/Xcode.app/Contents/Developers/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -lfoo -mmacosx-version-min=10.10 %t.o \ +// RUN: not %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -lfoo -mmacosx-version-min=10.10 %t.o \ // RUN: -isysroot %t.tmpdir/Xcode.app/Contents/Developers/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk 2>&1 | FileCheck -check-prefix=CHECK-ARCLITE-OSX %s // RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.11 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s // RUN: %clang -### -target i386-apple-darwin10 -fobjc-link-runtime -mmacosx-version-min=10.7 %t.o 2>&1 | FileCheck -check-prefix=CHECK-NOARCLITE %s @@ -16,7 +16,7 @@ // CHECK-NOARCLITE-NOT: libarclite // CHECK-NOSTDLIB-NOT: -lobjc -// RUN: %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -fobjc-arc -mmacosx-version-min=10.10 %s 2>&1 | FileCheck -check-prefix=CHECK-UNUSED %s +// RUN: not %clang -### -target x86_64-apple-darwin10 -fobjc-link-runtime -fobjc-arc -mmacosx-version-min=10.10 %s 2>&1 | FileCheck -check-prefix=CHECK-UNUSED %s // CHECK-UNUSED-NOT: warning: argument unused during compilation: '-fobjc-link-runtime' diff --git a/clang/test/Driver/arm-aarch64-bitfield-flags.c b/clang/test/Driver/arm-aarch64-bitfield-flags.c --- a/clang/test/Driver/arm-aarch64-bitfield-flags.c +++ b/clang/test/Driver/arm-aarch64-bitfield-flags.c @@ -1,18 +1,18 @@ /// check -faapcs-bitfield-width/-fno-aapcs-bitfield-width // RUN: %clang -target arm-arm-none-eabi -march=armv8-m.main -faapcs-bitfield-width -### %s 2>&1 | FileCheck --check-prefixes=WIDTH,INVERSE-WIDTH %s -// RUN: %clang --target=aarch64 -march=armv8-m.main -faapcs-bitfield-width -### %s 2>&1 | FileCheck --check-prefixes=WIDTH,INVERSE-WIDTH %s +// RUN: not %clang --target=aarch64 -march=armv8-m.main -faapcs-bitfield-width -### %s 2>&1 | FileCheck --check-prefixes=WIDTH,INVERSE-WIDTH %s // RUN: %clang -target arm-arm-none-eabi -march=armv8-m.main -fno-aapcs-bitfield-width -### %s 2>&1 | FileCheck --check-prefixes=NO-WIDTH,WIDTH %s -// RUN: %clang --target=aarch64 -march=armv8-m.main -fno-aapcs-bitfield-width -### %s 2>&1 | FileCheck --check-prefixes=NO-WIDTH,WIDTH %s +// RUN: not %clang --target=aarch64 -march=armv8-m.main -fno-aapcs-bitfield-width -### %s 2>&1 | FileCheck --check-prefixes=NO-WIDTH,WIDTH %s // WIDTH-NOT: -faapcs-bitfield-width // NO-WIDTH: -fno-aapcs-bitfield-width /// check -faapcs-bitfield-load // RUN: %clang -target arm-arm-none-eabi -march=armv8-m.main -faapcs-bitfield-load -### %s 2>&1 | FileCheck --check-prefix=LOAD %s -// RUN: %clang --target=aarch64 -march=armv8-m.main -faapcs-bitfield-load -### %s 2>&1 | FileCheck --check-prefix=LOAD %s +// RUN: not %clang --target=aarch64 -march=armv8-m.main -faapcs-bitfield-load -### %s 2>&1 | FileCheck --check-prefix=LOAD %s // LOAD: -faapcs-bitfield-load /// check absence of the above argument when not given // RUN: %clang -target arm-arm-none-eabi -march=armv8-m.main -### %s 2>&1 | FileCheck --check-prefixes=INVERSE-WIDTH,INVERSE-LOAD %s -// RUN: %clang --target=aarch64 -march=armv8-m.main -### %s 2>&1 | FileCheck --check-prefixes=INVERSE-WIDTH,INVERSE-LOAD %s +// RUN: not %clang --target=aarch64 -march=armv8-m.main -### %s 2>&1 | FileCheck --check-prefixes=INVERSE-WIDTH,INVERSE-LOAD %s // INVERSE-WIDTH-NOT: -fno-aapcs-bitfield-width // INVERSE-LOAD-NOT: -fno-aapcs-bitfield-load diff --git a/clang/test/Driver/arm-cmse-cve-2021-35465.c b/clang/test/Driver/arm-cmse-cve-2021-35465.c --- a/clang/test/Driver/arm-cmse-cve-2021-35465.c +++ b/clang/test/Driver/arm-cmse-cve-2021-35465.c @@ -34,11 +34,11 @@ // Diagnose the option when used without -mcmse // -// RUN: %clang --target=arm-arm-none-eabi -march=armv8-m.main %s -### \ +// RUN: not %clang --target=arm-arm-none-eabi -march=armv8-m.main %s -### \ // RUN: -mfix-cmse-cve-2021-35465 2>&1 |\ // RUN: FileCheck %s --check-prefix=CHECK-DIAG // -// RUN: %clang --target=arm-arm-none-eabi -march=armv8.1-m.main %s -### \ +// RUN: not %clang --target=arm-arm-none-eabi -march=armv8.1-m.main %s -### \ // RUN: -mno-fix-cmse-cve-2021-35465 2>&1 |\ // RUN: FileCheck %s --check-prefix=CHECK-DIAG // diff --git a/clang/test/Driver/arm-cortex-cpus-2.c b/clang/test/Driver/arm-cortex-cpus-2.c --- a/clang/test/Driver/arm-cortex-cpus-2.c +++ b/clang/test/Driver/arm-cortex-cpus-2.c @@ -152,10 +152,10 @@ // CHECK-BOGUS3: error: unsupported argument 'bogus' to option '-march=' // ================== Check that a bogus CPU gives an error -// RUN: %clang -target arm -mcpu=bogus -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS-CPU %s -// RUN: %clang -target armv8-apple-darwin -arch arm64 -mcpu=bogus -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS-CPU %s +// RUN: not %clang -target arm -mcpu=bogus -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS-CPU %s +// RUN: not %clang -target armv8-apple-darwin -arch arm64 -mcpu=bogus -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS-CPU %s // CHECK-BOGUS-CPU: error: unsupported argument 'bogus' to option '-mcpu=' -// RUN: %clang -target armv8-apple-darwin -arch arm64 -mtune=bogus -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS-TUNE %s +// RUN: not %clang -target armv8-apple-darwin -arch arm64 -mtune=bogus -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-BOGUS-TUNE %s // CHECK-BOGUS-TUNE: error: unsupported argument 'bogus' to option '-mtune=' // ================== Check default Architecture on each ARM11 CPU diff --git a/clang/test/Driver/arm-target-as-mimplicit-it.s b/clang/test/Driver/arm-target-as-mimplicit-it.s --- a/clang/test/Driver/arm-target-as-mimplicit-it.s +++ b/clang/test/Driver/arm-target-as-mimplicit-it.s @@ -29,10 +29,10 @@ // RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=never -mimplicit-it=always %S/Inputs/wildcard1.c 2>&1 | FileCheck %s --check-prefix=ALWAYS /// Test invalid input. -// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=INVALID -// RUN: %clang -target arm-linux-gnueabi -### -Xassembler -mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=XINVALID -// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always -Wa,-mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=INVALID -// RUN: %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always,-mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=INVALID +// RUN: not %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=INVALID +// RUN: not %clang -target arm-linux-gnueabi -### -Xassembler -mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=XINVALID +// RUN: not %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always -Wa,-mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=INVALID +// RUN: not %clang -target arm-linux-gnueabi -### -Wa,-mimplicit-it=always,-mimplicit-it=foo %s 2>&1 | FileCheck %s --check-prefix=INVALID /// Check that the argument we ignore is still marked as used. diff --git a/clang/test/Driver/arm-thread-pointer.c b/clang/test/Driver/arm-thread-pointer.c --- a/clang/test/Driver/arm-thread-pointer.c +++ b/clang/test/Driver/arm-thread-pointer.c @@ -30,9 +30,9 @@ // RUN: FileCheck -check-prefix=ARMv5_THREAD_POINTER_ASSEMBLER %s // ARMv5_THREAD_POINTER_ASSEMBLER-NOT: hardware TLS register is not supported for the armv5 sub-architecture -// RUN: %clang --target=armv6-linux -mthumb -mtp=cp15 -### -S %s 2>&1 | \ +// RUN: not %clang --target=armv6-linux -mthumb -mtp=cp15 -### -S %s 2>&1 | \ // RUN: FileCheck -check-prefix=THUMBv6_THREAD_POINTER_UNSUPP %s -// RUN: %clang --target=thumbv6-linux -mthumb -mtp=cp15 -### -S %s 2>&1 | \ +// RUN: not %clang --target=thumbv6-linux -mthumb -mtp=cp15 -### -S %s 2>&1 | \ // RUN: FileCheck -check-prefix=THUMBv6_THREAD_POINTER_UNSUPP %s // THUMBv6_THREAD_POINTER_UNSUPP: hardware TLS register is not supported for the thumbv6 sub-architecture diff --git a/clang/test/Driver/avr-toolchain.c b/clang/test/Driver/avr-toolchain.c --- a/clang/test/Driver/avr-toolchain.c +++ b/clang/test/Driver/avr-toolchain.c @@ -58,7 +58,7 @@ // NOGCC-NOT: warning: {{.*}} avr-libc // NOGCC-NOT: warning: {{.*}} data section address -// RUN: %clang -### --target=avr --sysroot=%S/Inputs/basic_avr_tree -mmcu=atmega328 %s -fuse-ld=avrld 2>&1 | FileCheck --check-prefix=NOLD %s +// RUN: not %clang -### --target=avr --sysroot=%S/Inputs/basic_avr_tree -mmcu=atmega328 %s -fuse-ld=avrld 2>&1 | FileCheck --check-prefix=NOLD %s // NOLD: error: invalid linker // RUN: %clang -### --target=avr --sysroot=%S/Inputs/basic_avr_tree -mmcu=atmega328 %s -fuse-ld=%S/Inputs/basic_avr_tree/usr/bin/ld.lld 2>&1 | FileCheck --check-prefix=LLD %s diff --git a/clang/test/Driver/cf-runtime-abi.c b/clang/test/Driver/cf-runtime-abi.c --- a/clang/test/Driver/cf-runtime-abi.c +++ b/clang/test/Driver/cf-runtime-abi.c @@ -8,7 +8,7 @@ // RUN: %clang -### -target s390x-unknown-linux-gnu -fcf-runtime-abi=swift-4.1 -c %s 2>&1 | FileCheck -check-prefix CHECK-SWIFT-4_1 %s // RUN: %clang -### -target x86_64-apple-macosx -fcf-runtime-abi=swift -c %s 2>&1 | FileCheck -check-prefix CHECK-SWIFT %s -// RUN: %clang -### -target arm7k-apple-watchos -fcf-runtime-abi=invalid -c %s 2>&1 | FileCheck -check-prefix CHECK-INVALID %s +// RUN: not %clang -### -target arm7k-apple-watchos -fcf-runtime-abi=invalid -c %s 2>&1 | FileCheck -check-prefix CHECK-INVALID %s // CHECK-UNSPECIFIED-NOT: "-fcf-runtime-abi= diff --git a/clang/test/Driver/cl-eh.cpp b/clang/test/Driver/cl-eh.cpp --- a/clang/test/Driver/cl-eh.cpp +++ b/clang/test/Driver/cl-eh.cpp @@ -26,6 +26,6 @@ // EHa_EHc: "-fexceptions" // EHa_EHc-NOT: "-fexternc-nounwind" -// RUN: %clang_cl /c /EHinvalid -### -- %s 2>&1 | FileCheck -check-prefix=EHinvalid %s +// RUN: not %clang_cl /c /EHinvalid -### -- %s 2>&1 | FileCheck -check-prefix=EHinvalid %s // EHinvalid: error: invalid value 'invalid' in '/EH' // EHinvalid-NOT: error: diff --git a/clang/test/Driver/cl-inputs.c b/clang/test/Driver/cl-inputs.c --- a/clang/test/Driver/cl-inputs.c +++ b/clang/test/Driver/cl-inputs.c @@ -59,7 +59,7 @@ // LIBINPUT2: link.exe" // LIBINPUT2: "cl-test2.lib" -// RUN: %clang_cl -fuse-ld=link -### -- %s /nonexisting.lib 2>&1 | FileCheck -check-prefix=LIBINPUT3 %s +// RUN: not %clang_cl -fuse-ld=link -### -- %s /nonexisting.lib 2>&1 | FileCheck -check-prefix=LIBINPUT3 %s // LIBINPUT3: error: no such file or directory: '/nonexisting.lib' // LIBINPUT3: link.exe" // LIBINPUT3-NOT: "/nonexisting.lib" diff --git a/clang/test/Driver/cl-link.c b/clang/test/Driver/cl-link.c --- a/clang/test/Driver/cl-link.c +++ b/clang/test/Driver/cl-link.c @@ -35,7 +35,7 @@ // "-dll" // RUN: %clang_cl -m32 -arch:IA32 --target=i386-pc-win32 /LD /Tc%s -fuse-ld=link -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s -// RUN: %clang_cl -m32 -arch:IA32 --target=i386-pc-win32 /LDd /Tc%s -fuse-ld=link -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s +// RUN: not %clang_cl -m32 -arch:IA32 --target=i386-pc-win32 /LDd /Tc%s -fuse-ld=link -### -fsanitize=address 2>&1 | FileCheck --check-prefix=ASAN-DLL %s // ASAN-DLL: link.exe // ASAN-DLL: "-dll" // ASAN-DLL: "-debug" @@ -48,7 +48,7 @@ // DEBUG: "-debug" // Don't pass through /libpath: if it's not after a /link flag: -// RUN: %clang_cl /Tc%s /libpath:foo -fuse-ld=link -### /link /libpath:bar 2>&1 | FileCheck --check-prefix=LIBPATH %s +// RUN: not %clang_cl /Tc%s /libpath:foo -fuse-ld=link -### /link /libpath:bar 2>&1 | FileCheck --check-prefix=LIBPATH %s // LIBPATH: error: no such file or directory: '/libpath:foo' // LIBPATH: libpath:bar diff --git a/clang/test/Driver/cl-options.c b/clang/test/Driver/cl-options.c --- a/clang/test/Driver/cl-options.c +++ b/clang/test/Driver/cl-options.c @@ -7,7 +7,7 @@ // RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=c %s // c: -c -// RUN: %clang_cl /C -### -- %s 2>&1 | FileCheck -check-prefix=C %s +// RUN: not %clang_cl /C -### -- %s 2>&1 | FileCheck -check-prefix=C %s // C: error: invalid argument '/C' only allowed with '/E, /P or /EP' // RUN: %clang_cl /C /P -### -- %s 2>&1 | FileCheck -check-prefix=C_P %s @@ -80,10 +80,10 @@ // RUN: %clang_cl -### /FAcsu -fprofile-generate -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE %s // CHECK-PROFILE-GENERATE: "-fprofile-instrument=llvm" "--dependent-lib=clang_rt.profile{{[^"]*}}.lib" -// RUN: %clang_cl -### /FA -fprofile-instr-generate -fprofile-instr-use -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang_cl -### /FA -fprofile-instr-generate -fprofile-instr-use=file -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang_cl -### /FAcsu -fprofile-instr-generate -fprofile-instr-use -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang_cl -### /FAcsu -fprofile-instr-generate -fprofile-instr-use=file -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang_cl -### /FA -fprofile-instr-generate -fprofile-instr-use -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang_cl -### /FA -fprofile-instr-generate -fprofile-instr-use=file -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang_cl -### /FAcsu -fprofile-instr-generate -fprofile-instr-use -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang_cl -### /FAcsu -fprofile-instr-generate -fprofile-instr-use=file -- %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s // CHECK-NO-MIX-GEN-USE: '{{[a-z=-]*}}' not allowed with '{{[a-z=-]*}}' // RUN: %clang_cl -### /FA -fprofile-instr-use -- %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-USE %s @@ -234,11 +234,11 @@ // showIncludes_E-NOT: warning: argument unused during compilation: '--show-includes' // /source-charset: should warn on everything except UTF-8. -// RUN: %clang_cl /source-charset:utf-16 -### -- %s 2>&1 | FileCheck -check-prefix=source-charset-utf-16 %s +// RUN: not %clang_cl /source-charset:utf-16 -### -- %s 2>&1 | FileCheck -check-prefix=source-charset-utf-16 %s // source-charset-utf-16: invalid value 'utf-16' in '/source-charset:utf-16' // /execution-charset: should warn on everything except UTF-8. -// RUN: %clang_cl /execution-charset:utf-16 -### -- %s 2>&1 | FileCheck -check-prefix=execution-charset-utf-16 %s +// RUN: not %clang_cl /execution-charset:utf-16 -### -- %s 2>&1 | FileCheck -check-prefix=execution-charset-utf-16 %s // execution-charset-utf-16: invalid value 'utf-16' in '/execution-charset:utf-16' // // RUN: %clang_cl /Umymacro -### -- %s 2>&1 | FileCheck -check-prefix=U %s @@ -266,10 +266,10 @@ // RUN: %clang_cl /vmg /vmv -### -- %s 2>&1 | FileCheck -check-prefix=VMV %s // VMV: "-fms-memptr-rep=virtual" -// RUN: %clang_cl /vmg /vmb -### -- %s 2>&1 | FileCheck -check-prefix=VMB %s +// RUN: not %clang_cl /vmg /vmb -### -- %s 2>&1 | FileCheck -check-prefix=VMB %s // VMB: '/vmg' not allowed with '/vmb' -// RUN: %clang_cl /vmg /vmm /vms -### -- %s 2>&1 | FileCheck -check-prefix=VMX %s +// RUN: not %clang_cl /vmg /vmm /vms -### -- %s 2>&1 | FileCheck -check-prefix=VMX %s // VMX: '/vms' not allowed with '/vmm' // RUN: %clang_cl /volatile:iso -### -- %s 2>&1 | FileCheck -check-prefix=VOLATILE-ISO %s @@ -412,7 +412,7 @@ // LINKUNUSED-NOT: argument unused during compilation // Support ignoring warnings about unused arguments. -// RUN: %clang_cl /Abracadabra -Qunused-arguments -### -- %s 2>&1 | FileCheck -check-prefix=UNUSED %s +// RUN: not %clang_cl /Abracadabra -Qunused-arguments -### -- %s 2>&1 | FileCheck -check-prefix=UNUSED %s // UNUSED-NOT: argument unused during compilation // Unsupported but parsed options. Check that we don't error on them. @@ -623,7 +623,7 @@ // RUN: %clang_cl -### /c -flto=thin -- %s 2>&1 | FileCheck -check-prefix=LTO-THIN %s // LTO-THIN: -flto=thin -// RUN: %clang_cl -### -Fe%t.exe -entry:main -flto -- %s 2>&1 | FileCheck -check-prefix=LTO-WITHOUT-LLD %s +// RUN: not %clang_cl -### -Fe%t.exe -entry:main -flto -- %s 2>&1 | FileCheck -check-prefix=LTO-WITHOUT-LLD %s // LTO-WITHOUT-LLD: LTO requires -fuse-ld=lld // RUN: %clang_cl -### -- %s 2>&1 | FileCheck -check-prefix=NOCFGUARD %s @@ -637,7 +637,7 @@ // RUN: %clang_cl /guard:cf,nochecks -### -- %s 2>&1 | FileCheck -check-prefix=CFGUARDNOCHECKS %s // CFGUARDNOCHECKS: -cfguard-no-checks -// RUN: %clang_cl /guard:nochecks -### -- %s 2>&1 | FileCheck -check-prefix=CFGUARDNOCHECKSINVALID %s +// RUN: not %clang_cl /guard:nochecks -### -- %s 2>&1 | FileCheck -check-prefix=CFGUARDNOCHECKSINVALID %s // CFGUARDNOCHECKSINVALID: invalid value 'nochecks' in '/guard:' // RUN: %clang_cl -### -- %s 2>&1 | FileCheck -check-prefix=NOEHCONTGUARD %s @@ -654,7 +654,7 @@ // BOTHGUARD: -guard:cf // BOTHGUARD-SAME: -guard:ehcont -// RUN: %clang_cl /guard:foo -### -- %s 2>&1 | FileCheck -check-prefix=CFGUARDINVALID %s +// RUN: not %clang_cl /guard:foo -### -- %s 2>&1 | FileCheck -check-prefix=CFGUARDINVALID %s // CFGUARDINVALID: invalid value 'foo' in '/guard:' // Accept "core" clang options. diff --git a/clang/test/Driver/cl-options.cu b/clang/test/Driver/cl-options.cu --- a/clang/test/Driver/cl-options.cu +++ b/clang/test/Driver/cl-options.cu @@ -7,14 +7,14 @@ // REQUIRES: nvptx-registered-target // -stack-protector should not be passed to device-side CUDA compilation -// RUN: %clang_cl -### -nocudalib -nocudainc -- %s 2>&1 | FileCheck -check-prefix=GS-default %s +// RUN: not %clang_cl -### -nocudalib -nocudainc -- %s 2>&1 | FileCheck -check-prefix=GS-default %s // GS-default: "-cc1" "-triple" "nvptx{{(64)?}}-nvidia-cuda" // GS-default-NOT: "-stack-protector" // GS-default: "-cc1" "-triple" // GS-default: "-stack-protector" "2" // -exceptions should be passed to device-side compilation. -// RUN: %clang_cl /c /GX -### -nocudalib -nocudainc -- %s 2>&1 | FileCheck -check-prefix=GX %s +// RUN: not %clang_cl /c /GX -### -nocudalib -nocudainc -- %s 2>&1 | FileCheck -check-prefix=GX %s // GX: "-cc1" "-triple" "nvptx{{(64)?}}-nvidia-cuda" // GX-NOT: "-fcxx-exceptions" // GX-NOT: "-fexceptions" @@ -22,7 +22,7 @@ // GX: "-fcxx-exceptions" "-fexceptions" // /Gd should not override default calling convention on device side. -// RUN: %clang_cl /c /Gd -### -nocudalib -nocudainc -- %s 2>&1 | FileCheck -check-prefix=Gd %s +// RUN: not %clang_cl /c /Gd -### -nocudalib -nocudainc -- %s 2>&1 | FileCheck -check-prefix=Gd %s // Gd: "-cc1" "-triple" "nvptx{{(64)?}}-nvidia-cuda" // Gd-NOT: "-fcxx-exceptions" // Gd-NOT: "-fdefault-calling-conv=cdecl" diff --git a/clang/test/Driver/cl-outputs.c b/clang/test/Driver/cl-outputs.c --- a/clang/test/Driver/cl-outputs.c +++ b/clang/test/Driver/cl-outputs.c @@ -9,7 +9,7 @@ // FoEMPTY: "-o" "cl-outputs.obj" // RUN: %clang_cl /Foa -### -- %s 2>&1 | FileCheck -check-prefix=FoNAME %s -// RUN: %clang_cl /Foa -flto -### -- %s 2>&1 | FileCheck -check-prefix=FoNAME %s +// RUN: not %clang_cl /Foa -flto -### -- %s 2>&1 | FileCheck -check-prefix=FoNAME %s // FoNAME: "-o" "a.obj" // RUN: %clang_cl /Foa.ext /Fob.ext -### -- %s 2>&1 | FileCheck -check-prefix=FoNAMEEXT %s @@ -27,7 +27,7 @@ // RUN: %clang_cl /Fo.. -### -- %s 2>&1 | FileCheck -check-prefix=FoCRAZY %s // FoCRAZY: "-o" "..obj" -// RUN: %clang_cl /Foa.obj -### -- %s %s 2>&1 | FileCheck -check-prefix=CHECK-MULTIPLESOURCEERROR %s +// RUN: not %clang_cl /Foa.obj -### -- %s %s 2>&1 | FileCheck -check-prefix=CHECK-MULTIPLESOURCEERROR %s // CHECK-MULTIPLESOURCEERROR: error: cannot specify '/Foa.obj' when compiling multiple source files // RUN: %clang_cl /Fomydir/ -### -- %s %s 2>&1 | FileCheck -check-prefix=CHECK-MULTIPLESOURCEOK %s @@ -237,7 +237,7 @@ // FaDIRNAME: "-o" "foo.dir{{[/\\]+}}a.asm" // RUN: %clang_cl /FA /Fafoo.dir/a.ext -### -- %s 2>&1 | FileCheck -check-prefix=FaDIRNAMEEXT %s // FaDIRNAMEEXT: "-o" "foo.dir{{[/\\]+}}a.ext" -// RUN: %clang_cl /Faa.asm -### -- %s %s 2>&1 | FileCheck -check-prefix=FaMULTIPLESOURCE %s +// RUN: not %clang_cl /Faa.asm -### -- %s %s 2>&1 | FileCheck -check-prefix=FaMULTIPLESOURCE %s // FaMULTIPLESOURCE: error: cannot specify '/Faa.asm' when compiling multiple source files // RUN: %clang_cl /Fa -### -- %s %s 2>&1 | FileCheck -check-prefix=FaMULTIPLESOURCEOK %s // FaMULTIPLESOURCEOK: "-o" "cl-outputs.asm" @@ -259,7 +259,7 @@ // FA_CSU_FaDIRNAME: "-o" "foo.dir{{[/\\]+}}a.asm" // RUN: %clang_cl /FAcsu /Fafoo.dir/a.ext -### -- %s 2>&1 | FileCheck -check-prefix=FA_CSU_FaDIRNAMEEXT %s // FA_CSU_FaDIRNAMEEXT: "-o" "foo.dir{{[/\\]+}}a.ext" -// RUN: %clang_cl /Faa.asm -### -- %s %s 2>&1 | FileCheck -check-prefix=FA_CSU_FaMULTIPLESOURCE %s +// RUN: not %clang_cl /Faa.asm -### -- %s %s 2>&1 | FileCheck -check-prefix=FA_CSU_FaMULTIPLESOURCE %s // FA_CSU_FaMULTIPLESOURCE: error: cannot specify '/Faa.asm' when compiling multiple source files // RUN: %clang_cl /Fa -### -- %s %s 2>&1 | FileCheck -check-prefix=FA_CSU_FaMULTIPLESOURCEOK %s // FA_CSU_FaMULTIPLESOURCEOK: "-o" "cl-outputs.asm" diff --git a/clang/test/Driver/cl-pch.cpp b/clang/test/Driver/cl-pch.cpp --- a/clang/test/Driver/cl-pch.cpp +++ b/clang/test/Driver/cl-pch.cpp @@ -79,12 +79,12 @@ // If /Yc /Yu refer to different files, semantics are pretty wonky. Since this // doesn't seem like something that's important in practice, just punt for now. -// RUN: %clang_cl -Werror /Ycfoo1.h /Yufoo2.h /FIfoo1.h /FIfoo2.h /c -### -- %s 2>&1 \ +// RUN: not %clang_cl -Werror /Ycfoo1.h /Yufoo2.h /FIfoo1.h /FIfoo2.h /c -### -- %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-YC-YU-MISMATCH %s // CHECK-YC-YU-MISMATCH: error: support for '/Yc' and '/Yu' with different filenames not implemented yet; flags ignored // Similarly, punt on /Yc with more than one input file. -// RUN: %clang_cl -Werror /Ycfoo1.h /FIfoo1.h /c -### -- %s %s 2>&1 \ +// RUN: not %clang_cl -Werror /Ycfoo1.h /FIfoo1.h /c -### -- %s %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-YC-MULTIINPUT %s // CHECK-YC-MULTIINPUT: error: support for '/Yc' with more than one source file not implemented yet; flag ignored @@ -336,7 +336,7 @@ // /FI without /Yu => pch file not used, even if it exists (different from // -include, which picks up .gch files if they exist). // RUN: touch %t.pch -// RUN: %clang_cl -Werror /FI%t.pch /Fp%t.pch /c -### -- %s 2>&1 \ +// RUN: not %clang_cl -Werror /FI%t.pch /Fp%t.pch /c -### -- %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-FI %s // CHECK-FI-NOT: -include-pch // CHECK-FI: -include @@ -364,7 +364,7 @@ // CHECK-YCTc: "c" // Don't crash when a non-source file is passed. -// RUN: %clang_cl -Werror /Ycpchfile.h /FIpchfile.h /c -### -- %S/Inputs/file.prof 2>&1 \ +// RUN: not %clang_cl -Werror /Ycpchfile.h /FIpchfile.h /c -### -- %S/Inputs/file.prof 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-NoSource %s // CHECK-NoSource: file.prof:{{.*}}input unused diff --git a/clang/test/Driver/cl-zc.cpp b/clang/test/Driver/cl-zc.cpp --- a/clang/test/Driver/cl-zc.cpp +++ b/clang/test/Driver/cl-zc.cpp @@ -28,11 +28,11 @@ // KERNEL-NO-RTTI: "-fno-rtti" // KERNEL-NO-EXCEPTIONS-NOT: "-fcxx-exceptions" "-fexceptions" -// RUN: %clang_cl /c -### --target=i686-pc-windows-msvc /kernel /arch:SSE -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-SSE %s -// RUN: %clang_cl /c -### --target=i686-pc-windows-msvc /kernel /arch:SSE2 -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-SSE2 %s -// RUN: %clang_cl /c -### --target=i686-pc-windows-msvc /kernel /arch:AVX -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-AVX %s -// RUN: %clang_cl /c -### --target=i686-pc-windows-msvc /kernel /arch:AVX2 -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-AVX2 %s -// RUN: %clang_cl /c -### --target=i686-pc-windows-msvc /kernel /arch:AVX512 -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-AVX512 %s +// RUN: not %clang_cl /c -### --target=i686-pc-windows-msvc /kernel /arch:SSE -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-SSE %s +// RUN: not %clang_cl /c -### --target=i686-pc-windows-msvc /kernel /arch:SSE2 -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-SSE2 %s +// RUN: not %clang_cl /c -### --target=i686-pc-windows-msvc /kernel /arch:AVX -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-AVX %s +// RUN: not %clang_cl /c -### --target=i686-pc-windows-msvc /kernel /arch:AVX2 -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-AVX2 %s +// RUN: not %clang_cl /c -### --target=i686-pc-windows-msvc /kernel /arch:AVX512 -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-AVX512 %s // KERNEL-SSE: error: invalid argument '/arch:SSE' not allowed with '/kernel' // KERNEL-SSE2: error: invalid argument '/arch:SSE2' not allowed with '/kernel' // KERNEL-AVX: error: invalid argument '/arch:AVX' not allowed with '/kernel' @@ -40,13 +40,13 @@ // KERNEL-AVX512: error: invalid argument '/arch:AVX512' not allowed with '/kernel' // RUN: %clang_cl /c -### /kernel /EHsc -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-EHSC %s -// RUN: %clang_cl /c -### /kernel /GR -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-GR %s +// RUN: not %clang_cl /c -### /kernel /GR -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-GR %s // KERNEL-EHSC-NOT: "-fcxx-exceptions" "-fexceptions" // KERNEL-GR: error: invalid argument '/GR' not allowed with '/kernel' -// RUN: %clang_cl /c -### --target=x86_64-pc-windows-msvc /kernel /arch:AVX -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-X64-AVX %s -// RUN: %clang_cl /c -### --target=x86_64-pc-windows-msvc /kernel /arch:AVX2 -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-X64-AVX2 %s -// RUN: %clang_cl /c -### --target=x86_64-pc-windows-msvc /kernel /arch:AVX512 -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-X64-AVX512 %s +// RUN: not %clang_cl /c -### --target=x86_64-pc-windows-msvc /kernel /arch:AVX -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-X64-AVX %s +// RUN: not %clang_cl /c -### --target=x86_64-pc-windows-msvc /kernel /arch:AVX2 -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-X64-AVX2 %s +// RUN: not %clang_cl /c -### --target=x86_64-pc-windows-msvc /kernel /arch:AVX512 -- %s 2>&1 | FileCheck -check-prefixes=KERNEL-X64-AVX512 %s // KERNEL-X64-AVX: error: invalid argument '/arch:AVX' not allowed with '/kernel' // KERNEL-X64-AVX2: error: invalid argument '/arch:AVX2' not allowed with '/kernel' // KERNEL-X64-AVX512: error: invalid argument '/arch:AVX512' not allowed with '/kernel' diff --git a/clang/test/Driver/clang-translation.c b/clang/test/Driver/clang-translation.c --- a/clang/test/Driver/clang-translation.c +++ b/clang/test/Driver/clang-translation.c @@ -66,7 +66,7 @@ // ARMV7_SOFTFLOAT: "-mfloat-abi" "soft" // ARMV7_SOFTFLOAT: "-x" "c" -// RUN: %clang -target x86_64-apple-darwin10 -### -S %s -arch armv7 \ +// RUN: not %clang -target x86_64-apple-darwin10 -### -S %s -arch armv7 \ // RUN: -mhard-float 2>&1 | FileCheck -check-prefix=ARMV7_HARDFLOAT %s // ARMV7_HARDFLOAT: clang // ARMV7_HARDFLOAT: "-cc1" diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c --- a/clang/test/Driver/clang_f_opts.c +++ b/clang/test/Driver/clang_f_opts.c @@ -85,31 +85,31 @@ // RUN: %clang -### -S -fprofile-instr-generate %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE %s // RUN: %clang -### -S -fprofile-generate=/some/dir %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-DIR %s // RUN: %clang -### -S -fprofile-instr-generate=/tmp/somefile.profraw %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-GENERATE-FILE %s -// RUN: %clang -### -S -fprofile-generate -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-generate -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-generate -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-generate -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-instr-generate -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-instr-generate -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-instr-generate -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-instr-generate -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-instr-generate=file -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-instr-generate=file -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-instr-generate=file -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-instr-generate=file -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-generate=dir -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-generate=dir -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-generate=dir -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s -// RUN: %clang -### -S -fprofile-generate=dir -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-generate -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-generate -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-generate -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-generate -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-instr-generate -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-instr-generate -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-instr-generate -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-instr-generate -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-instr-generate=file -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-instr-generate=file -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-instr-generate=file -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-instr-generate=file -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-generate=dir -fprofile-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-generate=dir -fprofile-use=dir %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-generate=dir -fprofile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s +// RUN: not %clang -### -S -fprofile-generate=dir -fprofile-instr-use=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GEN-USE %s // RUN: %clang -### -S -fprofile-instr-generate=file -fno-profile-instr-generate %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-GEN %s -// RUN: %clang -### -S -fprofile-instr-generate -fprofile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GENERATE %s -// RUN: %clang -### -S -fprofile-instr-generate -fprofile-generate=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GENERATE %s +// RUN: not %clang -### -S -fprofile-instr-generate -fprofile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GENERATE %s +// RUN: not %clang -### -S -fprofile-instr-generate -fprofile-generate=file %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-GENERATE %s // RUN: %clang -### -S -fprofile-generate=dir -fno-profile-generate %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-GEN %s // RUN: %clang -### -S -fprofile-instr-use=file -fno-profile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s // RUN: %clang -### -S -fprofile-instr-use=file -fno-profile-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s // RUN: %clang -### -S -fprofile-use=file -fno-profile-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s // RUN: %clang -### -S -fprofile-use=file -fno-profile-instr-use %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-USE %s -// RUN: %clang -### -S -fcoverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-COVERAGE-AND-GEN %s +// RUN: not %clang -### -S -fcoverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-COVERAGE-AND-GEN %s // RUN: %clang -### -S -fcoverage-mapping -fno-coverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-COVERAGE %s // RUN: %clang -### -S -fprofile-instr-generate -fcoverage-mapping -fno-coverage-mapping %s 2>&1 | FileCheck -check-prefix=CHECK-DISABLE-COVERAGE %s // RUN: %clang -### -S -fprofile-remapping-file=foo/bar.txt %s 2>&1 | FileCheck -check-prefix=CHECK-PROFILE-REMAP %s @@ -199,12 +199,12 @@ // CHECK-ROUNDING-MATH: "-frounding-math" // CHECK-ROUNDING-MATH-NOT: "-fno-rounding-math" // RUN: %clang -### -S %s 2>&1 | FileCheck -check-prefix=CHECK-ROUNDING-MATH-NOT %s -// RUN: %clang -### -S -ffp-model=imprecise %s 2>&1 | FileCheck -check-prefix=CHECK-FPMODEL %s +// RUN: not %clang -### -S -ffp-model=imprecise %s 2>&1 | FileCheck -check-prefix=CHECK-FPMODEL %s // CHECK-FPMODEL: unsupported argument 'imprecise' to option '-ffp-model=' // RUN: %clang -### -S -ffp-model=precise %s 2>&1 | FileCheck -check-prefix=IGNORE %s // RUN: %clang -### -S -ffp-model=strict %s 2>&1 | FileCheck -check-prefix=IGNORE %s // RUN: %clang -### -S -ffp-model=fast %s 2>&1 | FileCheck -check-prefix=IGNORE %s -// RUN: %clang -### -S -ffp-exception-behavior=trap %s 2>&1 | FileCheck -check-prefix=CHECK-FPEB %s +// RUN: not %clang -### -S -ffp-exception-behavior=trap %s 2>&1 | FileCheck -check-prefix=CHECK-FPEB %s // CHECK-FPEB: unsupported argument 'trap' to option '-ffp-exception-behavior=' // RUN: %clang -### -S -ffp-exception-behavior=maytrap %s 2>&1 | FileCheck -check-prefix=IGNORE %s // RUN: %clang -### -S -ffp-exception-behavior=ignore %s 2>&1 | FileCheck -check-prefix=IGNORE %s @@ -223,14 +223,14 @@ // RUN: %clang -S -O20 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-O %s // CHECK-INVALID-O: warning: optimization level '-O20' is not supported; using '-O3' instead -// RUN: %clang -### -S -finput-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-CHARSET %s +// RUN: not %clang -### -S -finput-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-CHARSET %s // CHECK-INVALID-CHARSET: error: invalid value 'iso-8859-1' in '-finput-charset=iso-8859-1' -// RUN: %clang -### -S -fexec-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-INPUT-CHARSET %s +// RUN: not %clang -### -S -fexec-charset=iso-8859-1 -o /dev/null %s 2>&1 | FileCheck -check-prefix=CHECK-INVALID-INPUT-CHARSET %s // CHECK-INVALID-INPUT-CHARSET: error: invalid value 'iso-8859-1' in '-fexec-charset=iso-8859-1' // Test that we don't error on these. -// RUN: %clang -### -S -Werror \ +// RUN: not %clang -### -S -Werror \ // RUN: -falign-functions -falign-functions=2 -fno-align-functions \ // RUN: -fasynchronous-unwind-tables -fno-asynchronous-unwind-tables \ // RUN: -fbuiltin -fno-builtin \ @@ -313,7 +313,7 @@ // IGNORE-NOT: error: unknown argument // Test that the warning is displayed on these. -// RUN: %clang -### \ +// RUN: not %clang -### \ // RUN: -finline-limit=1000 \ // RUN: -finline-limit \ // RUN: -fexpensive-optimizations \ @@ -572,9 +572,9 @@ // RUN: %clang -### -S -ftrivial-auto-var-init=pattern -ftrivial-auto-var-init-stop-after=1 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN-STOP-AFTER %s // RUN: %clang -### -S -ftrivial-auto-var-init=zero -ftrivial-auto-var-init-stop-after=1 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-STOP-AFTER %s -// RUN: %clang -### -S -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-STOP-AFTER-MISSING-DEPENDENCY %s -// RUN: %clang -### -S -ftrivial-auto-var-init=pattern -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN-STOP-AFTER-INVALID-VALUE %s -// RUN: %clang -### -S -ftrivial-auto-var-init=zero -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-STOP-AFTER-INVALID-VALUE %s +// RUN: not %clang -### -S -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-STOP-AFTER-MISSING-DEPENDENCY %s +// RUN: not %clang -### -S -ftrivial-auto-var-init=pattern -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-PATTERN-STOP-AFTER-INVALID-VALUE %s +// RUN: not %clang -### -S -ftrivial-auto-var-init=zero -ftrivial-auto-var-init-stop-after=0 %s 2>&1 | FileCheck -check-prefix=CHECK-TRIVIAL-ZERO-STOP-AFTER-INVALID-VALUE %s // CHECK-TRIVIAL-PATTERN-STOP-AFTER-NOT: is used without '-ftrivial-auto-var-init' // CHECK-TRIVIAL-PATTERN-STOP-AFTER-NOT: only accepts positive integers // CHECK-TRIVIAL-ZERO-STOP-AFTER-NOT: is used without '-ftrivial-auto-var-init' diff --git a/clang/test/Driver/color-diagnostics.c b/clang/test/Driver/color-diagnostics.c --- a/clang/test/Driver/color-diagnostics.c +++ b/clang/test/Driver/color-diagnostics.c @@ -27,7 +27,7 @@ // RUN: | FileCheck --check-prefix=CHECK-DCE_AUTO %s // CHECK-DCE_AUTO-NOT: "-cc1"{{.*}} "-fcolor-diagnostics" -// RUN: %clang -fdiagnostics-color=foo -### -c %s 2>&1 \ +// RUN: not %clang -fdiagnostics-color=foo -### -c %s 2>&1 \ // RUN: | FileCheck --check-prefix=CHECK-DCE_FOO %s // CHECK-DCE_FOO: error: invalid argument 'foo' to -fdiagnostics-color= diff --git a/clang/test/Driver/compiler-rt-unwind.c b/clang/test/Driver/compiler-rt-unwind.c --- a/clang/test/Driver/compiler-rt-unwind.c +++ b/clang/test/Driver/compiler-rt-unwind.c @@ -19,11 +19,11 @@ // RTLIB-GXX-SAME: "-lgcc_s" // RTLIB-GXX-NOT: "--no-as-needed" // -// RUN: %clang -### %s 2>&1 \ +// RUN: not %clang -### %s 2>&1 \ // RUN: --target=x86_64-unknown-linux -rtlib=libgcc --unwindlib=libunwind \ // RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \ // RUN: | FileCheck --check-prefix=RTLIB-GCC-UNWINDLIB-COMPILER-RT %s -// RUN: %clangxx -### %s 2>&1 \ +// RUN: not %clangxx -### %s 2>&1 \ // RUN: --target=x86_64-unknown-linux -rtlib=libgcc --unwindlib=libunwind \ // RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \ // RUN: | FileCheck --check-prefix=RTLIB-GCC-UNWINDLIB-COMPILER-RT %s @@ -32,7 +32,7 @@ // RTLIB-GCC-UNWINDLIB-COMPILER-RT-SAME: "-lunwind" // RTLIB-GCC-UNWINDLIB-COMPILER-RT-SAME: "--no-as-needed" // -// RUN: %clang -### %s 2>&1 \ +// RUN: not %clang -### %s 2>&1 \ // RUN: --target=x86_64-unknown-linux -rtlib=libgcc --unwindlib=libunwind \ // RUN: -shared-libgcc \ // RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \ @@ -40,7 +40,7 @@ // RTLIB-GCC-SHARED-UNWINDLIB-COMPILER-RT: "-l:libunwind.so" // RTLIB-GCC-SHARED-UNWINDLIB-COMPILER-RT-SAME: "-lgcc" // -// RUN: %clang -### %s 2>&1 \ +// RUN: not %clang -### %s 2>&1 \ // RUN: --target=x86_64-unknown-linux -rtlib=libgcc --unwindlib=libunwind \ // RUN: -static-libgcc \ // RUN: --gcc-toolchain="" -resource-dir=%S/Inputs/resource_dir \ diff --git a/clang/test/Driver/compress-noias.c b/clang/test/Driver/compress-noias.c --- a/clang/test/Driver/compress-noias.c +++ b/clang/test/Driver/compress-noias.c @@ -27,7 +27,7 @@ // RUN: %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz=zlib -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_ZLIB %s // CHECK-OPT_GZ_EQ_ZLIB: "--compress-debug-sections=zlib" -// RUN: %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz=invalid -x assembler -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_INVALID %s -// RUN: %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz=invalid -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_INVALID %s +// RUN: not %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz=invalid -x assembler -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_INVALID %s +// RUN: not %clang -### -target i686-unknown-linux-gnu -fno-integrated-as -gz=invalid -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_INVALID %s // CHECK-OPT_GZ_EQ_INVALID: error: unsupported argument 'invalid' to option '-gz=' diff --git a/clang/test/Driver/compress.c b/clang/test/Driver/compress.c --- a/clang/test/Driver/compress.c +++ b/clang/test/Driver/compress.c @@ -30,6 +30,6 @@ // CHECK-OPT_GZ_EQ_ZLIB: {{.* "-cc1(as)?".* "--compress-debug-sections=zlib"}} // CHECK-OPT_GZ_EQ_ZLIB: "--compress-debug-sections=zlib" -// RUN: %clang -### -fintegrated-as -gz=invalid -x assembler -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_INVALID %s -// RUN: %clang -### -fintegrated-as -gz=invalid -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_INVALID %s +// RUN: not %clang -### -fintegrated-as -gz=invalid -x assembler -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_INVALID %s +// RUN: not %clang -### -fintegrated-as -gz=invalid -c %s 2>&1 | FileCheck -check-prefix CHECK-OPT_GZ_EQ_INVALID %s // CHECK-OPT_GZ_EQ_INVALID: error: unsupported argument 'invalid' to option '-gz=' diff --git a/clang/test/Driver/cuda-bad-arch.cu b/clang/test/Driver/cuda-bad-arch.cu --- a/clang/test/Driver/cuda-bad-arch.cu +++ b/clang/test/Driver/cuda-bad-arch.cu @@ -3,7 +3,7 @@ // REQUIRES: nvptx-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### --target=x86_64-linux-gnu --cuda-gpu-arch=compute_20 -c --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \ +// RUN: not %clang -### --target=x86_64-linux-gnu --cuda-gpu-arch=compute_20 -c --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda %s 2>&1 \ // RUN: | FileCheck -check-prefix BAD %s // RUN: %clang -### --target=x86_64-linux-gnu --cuda-gpu-arch=sm20 -c %s 2>&1 \ // RUN: | FileCheck -check-prefix BAD %s @@ -14,7 +14,7 @@ // BAD: error: unsupported CUDA gpu architecture -// RUN: %clang -### -v --target=x86_64-linux-gnu --cuda-gpu-arch=sm_21 \ +// RUN: not %clang -### -v --target=x86_64-linux-gnu --cuda-gpu-arch=sm_21 \ // RUN: --cuda-path=%S/Inputs/CUDA_90/usr/local/cuda %s 2>&1 \ // RUN: | FileCheck -check-prefix BAD_CUDA9 %s diff --git a/clang/test/Driver/cuda-detect.cu b/clang/test/Driver/cuda-detect.cu --- a/clang/test/Driver/cuda-detect.cu +++ b/clang/test/Driver/cuda-detect.cu @@ -110,19 +110,19 @@ // RUN: -check-prefixes PTX42,LIBDEVICE,LIBDEVICE35 // We should not add any CUDA include paths if there's no valid CUDA installation -// RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_35 \ +// RUN: not %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_35 \ // RUN: --cuda-path=%S/no-cuda-there %s 2>&1 \ // RUN: | FileCheck %s -check-prefix COMMON -check-prefix NOCUDAINC -// RUN: %clang -### -v --target=i386-apple-macosx --cuda-gpu-arch=sm_35 \ +// RUN: not %clang -### -v --target=i386-apple-macosx --cuda-gpu-arch=sm_35 \ // RUN: --cuda-path=%S/no-cuda-there %s 2>&1 \ // RUN: | FileCheck %s -check-prefix COMMON -check-prefix NOCUDAINC // Verify that we get an error if there's no libdevice library to link with. // NOTE: Inputs/CUDA deliberately does *not* have libdevice.compute_20 for this purpose. -// RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_20 \ +// RUN: not %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_20 \ // RUN: --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \ // RUN: | FileCheck %s -check-prefix COMMON -check-prefix MISSINGLIBDEVICE -// RUN: %clang -### -v --target=i386-apple-macosx --cuda-gpu-arch=sm_20 \ +// RUN: not %clang -### -v --target=i386-apple-macosx --cuda-gpu-arch=sm_20 \ // RUN: --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s 2>&1 \ // RUN: | FileCheck %s -check-prefix COMMON -check-prefix MISSINGLIBDEVICE @@ -136,17 +136,17 @@ // Verify that we don't add include paths, link with libdevice or // -include __clang_cuda_runtime_wrapper.h without valid CUDA installation. -// RUN: %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_35 \ +// RUN: not %clang -### -v --target=i386-unknown-linux --cuda-gpu-arch=sm_35 \ // RUN: --cuda-path=%S/no-cuda-there %s 2>&1 \ // RUN: | FileCheck %s -check-prefix COMMON \ // RUN: -check-prefix NOCUDAINC -// RUN: %clang -### -v --target=i386-apple-macosx --cuda-gpu-arch=sm_35 \ +// RUN: not %clang -### -v --target=i386-apple-macosx --cuda-gpu-arch=sm_35 \ // RUN: --cuda-path=%S/no-cuda-there %s 2>&1 \ // RUN: | FileCheck %s -check-prefix COMMON \ // RUN: -check-prefix NOCUDAINC // Verify that C++ include paths are passed for both host and device frontends. -// RUN: %clang -### --target=x86_64-linux-gnu %s \ +// RUN: not %clang -### --target=x86_64-linux-gnu %s \ // RUN: --stdlib=libstdc++ --sysroot=%S/Inputs/ubuntu_14.04_multiarch_tree2 \ // RUN: --gcc-toolchain="" 2>&1 \ // RUN: | FileCheck %s --check-prefix CHECK-CXXINCLUDE diff --git a/clang/test/Driver/cuda-march.cu b/clang/test/Driver/cuda-march.cu --- a/clang/test/Driver/cuda-march.cu +++ b/clang/test/Driver/cuda-march.cu @@ -5,9 +5,9 @@ // REQUIRES: x86-registered-target // REQUIRES: nvptx-registered-target -// RUN: %clang -### --target=x86_64-linux-gnu -c \ +// RUN: not %clang -### --target=x86_64-linux-gnu -c \ // RUN: -march=haswell %s 2>&1 | FileCheck %s -// RUN: %clang -### --target=x86_64-linux-gnu -c \ +// RUN: not %clang -### --target=x86_64-linux-gnu -c \ // RUN: -march=haswell --cuda-gpu-arch=sm_35 %s 2>&1 | FileCheck %s // CHECK: "-cc1"{{.*}} "-triple" "nvptx diff --git a/clang/test/Driver/cuda-no-pgo-or-coverage.cu b/clang/test/Driver/cuda-no-pgo-or-coverage.cu --- a/clang/test/Driver/cuda-no-pgo-or-coverage.cu +++ b/clang/test/Driver/cuda-no-pgo-or-coverage.cu @@ -2,23 +2,23 @@ // compilation. // // -// XRUN: %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \ +// XRUN: not %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \ // XRUN: -fprofile-generate %s 2>&1 | \ // XRUN: FileCheck --check-prefixes=CHECK,PROF %s // -// RUN: %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \ +// RUN: not %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \ // RUN: -fprofile-instr-generate %s 2>&1 | \ // RUN: FileCheck --check-prefixes=CHECK,PROF %s // -// RUN: %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \ +// RUN: not %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \ // RUN: -coverage %s 2>&1 | \ // RUN: FileCheck --check-prefixes=CHECK,GCOV %s // -// RUN: %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \ +// RUN: not %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \ // RUN: -ftest-coverage %s 2>&1 | \ // RUN: FileCheck --check-prefixes=CHECK,GCOV %s // -// RUN: %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \ +// RUN: not %clang -### --target=x86_64-linux-gnu -c --cuda-gpu-arch=sm_20 \ // RUN: -fprofile-instr-generate -fcoverage-mapping %s 2>&1 | \ // RUN: FileCheck --check-prefixes=CHECK,PROF %s // diff --git a/clang/test/Driver/cuda-not-found.cu b/clang/test/Driver/cuda-not-found.cu --- a/clang/test/Driver/cuda-not-found.cu +++ b/clang/test/Driver/cuda-not-found.cu @@ -2,10 +2,10 @@ // Check that we raise an error if we're trying to compile CUDA code but can't // find a CUDA install, unless -nocudainc was passed. -// RUN: %clang -### --sysroot=%s/no-cuda-there --cuda-path-ignore-env %s 2>&1 | FileCheck %s --check-prefix ERR -// RUN: %clang -### --cuda-path=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix ERR +// RUN: not %clang -### --sysroot=%s/no-cuda-there --cuda-path-ignore-env %s 2>&1 | FileCheck %s --check-prefix ERR +// RUN: not %clang -### --cuda-path=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix ERR // ERR: cannot find CUDA installation -// RUN: %clang -### -nocudainc --sysroot=%s/no-cuda-there --cuda-path-ignore-env %s 2>&1 | FileCheck %s --check-prefix OK -// RUN: %clang -### -nocudainc --cuda-path=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix OK +// RUN: not %clang -### -nocudainc --sysroot=%s/no-cuda-there --cuda-path-ignore-env %s 2>&1 | FileCheck %s --check-prefix OK +// RUN: not %clang -### -nocudainc --cuda-path=%s/no-cuda-there %s 2>&1 | FileCheck %s --check-prefix OK // OK-NOT: cannot find CUDA installation diff --git a/clang/test/Driver/cuda-version-check.cu b/clang/test/Driver/cuda-version-check.cu --- a/clang/test/Driver/cuda-version-check.cu +++ b/clang/test/Driver/cuda-version-check.cu @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: nvptx-registered-target -// RUN: %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_20 --cuda-path=%S/Inputs/CUDA/usr/local/cuda 2>&1 %s | \ +// RUN: not %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_20 --cuda-path=%S/Inputs/CUDA/usr/local/cuda 2>&1 %s | \ // RUN: FileCheck %s --check-prefix=OK // RUN: %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_20 --cuda-path=%S/Inputs/CUDA_80/usr/local/cuda 2>&1 %s | \ // RUN: FileCheck %s --check-prefix=OK @@ -19,22 +19,22 @@ // RUN: FileCheck %s --check-prefix=UNKNOWN_VERSION_CXX // The installation at Inputs/CUDA is CUDA 7.0, which doesn't support sm_60. -// RUN: %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_60 --cuda-path=%S/Inputs/CUDA/usr/local/cuda 2>&1 %s | \ +// RUN: not %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_60 --cuda-path=%S/Inputs/CUDA/usr/local/cuda 2>&1 %s | \ // RUN: FileCheck %s --check-prefix=ERR_SM60 // This should only complain about sm_60, not sm_35. -// RUN: %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_60 --cuda-gpu-arch=sm_35 \ +// RUN: not %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_60 --cuda-gpu-arch=sm_35 \ // RUN: --cuda-path=%S/Inputs/CUDA/usr/local/cuda 2>&1 %s | \ // RUN: FileCheck %s --check-prefix=ERR_SM60 --check-prefix=OK_SM35 // We should get two errors here, one for sm_60 and one for sm_61. -// RUN: %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_60 --cuda-gpu-arch=sm_61 \ +// RUN: not %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_60 --cuda-gpu-arch=sm_61 \ // RUN: --cuda-path=%S/Inputs/CUDA/usr/local/cuda 2>&1 %s | \ // RUN: FileCheck %s --check-prefix=ERR_SM60 --check-prefix=ERR_SM61 // We should still get an error if we pass -nocudainc, because this compilation // would invoke ptxas, and we do a version check on that, too. -// RUN: %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_60 -nocudainc --cuda-path=%S/Inputs/CUDA/usr/local/cuda 2>&1 %s | \ +// RUN: not %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_60 -nocudainc --cuda-path=%S/Inputs/CUDA/usr/local/cuda 2>&1 %s | \ // RUN: FileCheck %s --check-prefix=ERR_SM60 // If with -nocudainc and -E, we don't touch the CUDA install, so we @@ -54,7 +54,7 @@ // the same check. // RUN: %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_60 --cuda-host-only --cuda-path=%S/Inputs/CUDA/usr/local/cuda -S 2>&1 %s | \ // RUN: FileCheck %s --check-prefix=OK -// RUN: %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_60 --cuda-device-only --cuda-path=%S/Inputs/CUDA/usr/local/cuda -S 2>&1 %s | \ +// RUN: not %clang --target=x86_64-linux -v -### --cuda-gpu-arch=sm_60 --cuda-device-only --cuda-path=%S/Inputs/CUDA/usr/local/cuda -S 2>&1 %s | \ // RUN: FileCheck %s --check-prefix=ERR_SM60 // OK-NOT: error: GPU arch diff --git a/clang/test/Driver/darwin-debug-prefix-map.c b/clang/test/Driver/darwin-debug-prefix-map.c --- a/clang/test/Driver/darwin-debug-prefix-map.c +++ b/clang/test/Driver/darwin-debug-prefix-map.c @@ -1,6 +1,6 @@ // RUN: env RC_DEBUG_PREFIX_MAP=old=new \ // RUN: %clang -target arm64-apple-darwin -### -c -g %s 2>&1 | FileCheck %s // RUN: env RC_DEBUG_PREFIX_MAP=illegal \ -// RUN: %clang -target arm64-apple-darwin -### -c -g %s 2>&1 | FileCheck %s --check-prefix=ERR +// RUN: not %clang -target arm64-apple-darwin -### -c -g %s 2>&1 | FileCheck %s --check-prefix=ERR // CHECK: "-fdebug-prefix-map=old=new" // ERR: invalid argument 'illegal' diff --git a/clang/test/Driver/darwin-debug-prefix-map.s b/clang/test/Driver/darwin-debug-prefix-map.s --- a/clang/test/Driver/darwin-debug-prefix-map.s +++ b/clang/test/Driver/darwin-debug-prefix-map.s @@ -1,6 +1,6 @@ // RUN: env RC_DEBUG_PREFIX_MAP=old=new \ // RUN: %clang -target arm64-apple-darwin -### -c -g %s 2>&1 | FileCheck %s // RUN: env RC_DEBUG_PREFIX_MAP=illegal \ -// RUN: %clang -target arm64-apple-darwin -### -c -g %s 2>&1 | FileCheck %s --check-prefix=ERR +// RUN: not %clang -target arm64-apple-darwin -### -c -g %s 2>&1 | FileCheck %s --check-prefix=ERR // CHECK: "-fdebug-prefix-map=old=new" // ERR: invalid argument 'illegal' diff --git a/clang/test/Driver/darwin-ld-platform-version-driverkit.c b/clang/test/Driver/darwin-ld-platform-version-driverkit.c --- a/clang/test/Driver/darwin-ld-platform-version-driverkit.c +++ b/clang/test/Driver/darwin-ld-platform-version-driverkit.c @@ -1,6 +1,6 @@ // RUN: touch %t.o -// RUN: %clang -target x86_64-apple-driverkit10.15 -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=520 -### %t.o 2>&1 \ +// RUN: not %clang -target x86_64-apple-driverkit10.15 -isysroot %S/Inputs/MacOSX10.14.sdk -mlinker-version=520 -### %t.o 2>&1 \ // RUN: | FileCheck %s // RUN: mkdir -p %t.sdk // RUN: %clang -target x86_64-apple-driverkit19 -isysroot %t.sdk -mlinker-version=520 -### %t.o 2>&1 \ diff --git a/clang/test/Driver/darwin-ld.c b/clang/test/Driver/darwin-ld.c --- a/clang/test/Driver/darwin-ld.c +++ b/clang/test/Driver/darwin-ld.c @@ -223,11 +223,11 @@ // LINK_PG: -lgcrt1.o // LINK_PG: -no_new_main -// RUN: %clang -target i386-apple-darwin13 -pg -### %t.o 2> %t.log +// RUN: not %clang -target i386-apple-darwin13 -pg -### %t.o 2> %t.log // RUN: FileCheck -check-prefix=LINK_PG_NO_SUPPORT_OSX %s < %t.log // LINK_PG_NO_SUPPORT_OSX: error: the clang compiler does not support -pg option on versions of OS X -// RUN: %clang -target x86_64-apple-ios5.0 -pg -### %t.o 2> %t.log +// RUN: not %clang -target x86_64-apple-ios5.0 -pg -### %t.o 2> %t.log // RUN: FileCheck -check-prefix=LINK_PG_NO_SUPPORT %s < %t.log // LINK_PG_NO_SUPPORT: error: the clang compiler does not support -pg option on Darwin @@ -315,13 +315,13 @@ // RUN: -fuse-ld= -mlinker-version=133.3.0 2>> %t.log // RUN: %clang -target x86_64-apple-darwin12 %s -### -o %t \ // RUN: -fuse-ld= -mlinker-version=133.3.0.1 2>> %t.log -// RUN: %clang -target x86_64-apple-darwin12 %s -### -o %t \ +// RUN: not %clang -target x86_64-apple-darwin12 %s -### -o %t \ // RUN: -fuse-ld= -mlinker-version=133.3.0.1.2 2>> %t.log -// RUN: %clang -target x86_64-apple-darwin12 %s -### -o %t \ +// RUN: not %clang -target x86_64-apple-darwin12 %s -### -o %t \ // RUN: -fuse-ld= -mlinker-version=133.3.0.1.2.6 2>> %t.log -// RUN: %clang -target x86_64-apple-darwin12 %s -### -o %t \ +// RUN: not %clang -target x86_64-apple-darwin12 %s -### -o %t \ // RUN: -fuse-ld= -mlinker-version=133.3.0.1.a 2>> %t.log -// RUN: %clang -target x86_64-apple-darwin12 %s -### -o %t \ +// RUN: not %clang -target x86_64-apple-darwin12 %s -### -o %t \ // RUN: -fuse-ld= -mlinker-version=133.3.0.1a 2>> %t.log // RUN: FileCheck -check-prefix=LINK_VERSION_DIGITS %s < %t.log // LINK_VERSION_DIGITS-NOT: invalid version number in '-mlinker-version=133.3' diff --git a/clang/test/Driver/darwin-mac-catalyst-32bit-not-supported.c b/clang/test/Driver/darwin-mac-catalyst-32bit-not-supported.c --- a/clang/test/Driver/darwin-mac-catalyst-32bit-not-supported.c +++ b/clang/test/Driver/darwin-mac-catalyst-32bit-not-supported.c @@ -1,4 +1,4 @@ -// RUN: %clang --target=i386-apple-ios13.1-macabi -c -### %s 2>&1 \ +// RUN: not %clang --target=i386-apple-ios13.1-macabi -c -### %s 2>&1 \ // RUN: | FileCheck %s // CHECK: error: 32-bit targets are not supported when building for Mac Catalyst diff --git a/clang/test/Driver/darwin-maccatalyst.c b/clang/test/Driver/darwin-maccatalyst.c --- a/clang/test/Driver/darwin-maccatalyst.c +++ b/clang/test/Driver/darwin-maccatalyst.c @@ -2,9 +2,9 @@ // RUN: FileCheck --check-prefix=CHECK-VERSION1 %s // RUN: %clang -target x86_64-apple-ios-macabi -c %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-VERSION1 %s -// RUN: %clang -target x86_64-apple-ios13.0-macabi -c %s -### 2>&1 | \ +// RUN: not %clang -target x86_64-apple-ios13.0-macabi -c %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-ERROR %s -// RUN: %clang -target x86_64-apple-ios12.0-macabi -c %s -### 2>&1 | \ +// RUN: not %clang -target x86_64-apple-ios12.0-macabi -c %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-ERROR %s // CHECK-VERSION1-NOT: error: diff --git a/clang/test/Driver/darwin-objc-runtime-maccatalyst.m b/clang/test/Driver/darwin-objc-runtime-maccatalyst.m --- a/clang/test/Driver/darwin-objc-runtime-maccatalyst.m +++ b/clang/test/Driver/darwin-objc-runtime-maccatalyst.m @@ -4,7 +4,7 @@ // RUN: | FileCheck %s // RUN: %clang -target x86_64-apple-ios13.2-macabi -isysroot %S/Inputs/MacOSX10.14.sdk -c %s -### 2>&1 \ // RUN: | FileCheck --check-prefix=FALLBACK-DEFAULT %s -// RUN: %clang -target x86_64-apple-ios12.99.99-macabi -isysroot %S/Inputs/MacOSX10.15.versioned.sdk -c %s -### 2>&1 \ +// RUN: not %clang -target x86_64-apple-ios12.99.99-macabi -isysroot %S/Inputs/MacOSX10.15.versioned.sdk -c %s -### 2>&1 \ // RUN: | FileCheck --check-prefix=FALLBACK-DEFAULT %s // RUN: %clang -target x86_64-apple-ios-macabi -isysroot %S/Inputs/MacOSX10.15.versioned.sdk -c %s -### 2>&1 \ // RUN: | FileCheck --check-prefix=FALLBACK-DEFAULT %s diff --git a/clang/test/Driver/darwin-opt-record-ld.c b/clang/test/Driver/darwin-opt-record-ld.c --- a/clang/test/Driver/darwin-opt-record-ld.c +++ b/clang/test/Driver/darwin-opt-record-ld.c @@ -39,6 +39,6 @@ // PASS_REMARKS_WITH_FAT: "-arch" "x86_64"{{.*}}"-mllvm" "-lto-pass-remarks-output" // PASS_REMARKS_WITH_FAT-NEXT: "-arch" "x86_64h"{{.*}}"-mllvm" "-lto-pass-remarks-output" // -// RUN: %clang -target x86_64-apple-darwin12 -arch x86_64 -arch x86_64h %t.o -foptimization-record-file=custom.opt.yaml -### -o foo/bar.out 2> %t.log +// RUN: not %clang -target x86_64-apple-darwin12 -arch x86_64 -arch x86_64h %t.o -foptimization-record-file=custom.opt.yaml -### -o foo/bar.out 2> %t.log // RUN: FileCheck -check-prefix=PASS_REMARKS_WITH_FILE_FAT %s < %t.log // PASS_REMARKS_WITH_FILE_FAT: error: cannot use '-foptimization-record-file' output with multiple -arch options diff --git a/clang/test/Driver/darwin-opt-record.c b/clang/test/Driver/darwin-opt-record.c --- a/clang/test/Driver/darwin-opt-record.c +++ b/clang/test/Driver/darwin-opt-record.c @@ -1,5 +1,5 @@ // RUN: %clang -target x86_64-apple-darwin10 -### -c -o FOO -fsave-optimization-record -arch x86_64 -arch x86_64h %s 2>&1 | FileCheck %s --check-prefix=CHECK-MULTIPLE-ARCH -// RUN: %clang -target x86_64-apple-darwin10 -### -c -o FOO -foptimization-record-file=tmp -arch x86_64 -arch x86_64h %s 2>&1 | FileCheck %s --check-prefix=CHECK-MULTIPLE-ARCH-ERROR +// RUN: not %clang -target x86_64-apple-darwin10 -### -c -o FOO -foptimization-record-file=tmp -arch x86_64 -arch x86_64h %s 2>&1 | FileCheck %s --check-prefix=CHECK-MULTIPLE-ARCH-ERROR // RUN: %clang -target x86_64-apple-darwin10 -### -o FOO -fsave-optimization-record %s 2>&1 | FileCheck %s --check-prefix=CHECK-DSYMUTIL-NO-G // RUN: %clang -target x86_64-apple-darwin10 -### -o FOO -g0 -fsave-optimization-record %s 2>&1 | FileCheck %s --check-prefix=CHECK-DSYMUTIL-G0 // RUN: %clang -target x86_64-apple-darwin10 -### -o FOO -fsave-optimization-record=bitstream %s 2>&1 | FileCheck %s --check-prefix=CHECK-NO-G-PATH-BITSTREAM diff --git a/clang/test/Driver/darwin-target-variant.c b/clang/test/Driver/darwin-target-variant.c --- a/clang/test/Driver/darwin-target-variant.c +++ b/clang/test/Driver/darwin-target-variant.c @@ -8,7 +8,7 @@ // RUN: %clang -target x86_64-apple-macos10.15 -darwin-target-variant x86_64-apple-ios13.1-macabi \ // RUN: -darwin-target-variant x86_64-apple-ios13.1-macabi -c %s -### 2>&1 | FileCheck --check-prefix=REDUNDANT-TV %s -// RUN: %clang -target x86_64-apple-macos10.15 -darwin-target-variant x86_64-apple-ios13.1 \ +// RUN: not %clang -target x86_64-apple-macos10.15 -darwin-target-variant x86_64-apple-ios13.1 \ // RUN: -c %s -### 2>&1 | FileCheck --check-prefix=INCORRECT-TV %s // RUN: %clang -target unknown-apple-ios13.1-macabi -arch x86_64 -arch x86_64h \ diff --git a/clang/test/Driver/darwin-version.c b/clang/test/Driver/darwin-version.c --- a/clang/test/Driver/darwin-version.c +++ b/clang/test/Driver/darwin-version.c @@ -12,23 +12,23 @@ // CHECK-VERSION-IOS3: "armv6k-apple-ios3.0.0" // RUN: env IPHONEOS_DEPLOYMENT_TARGET=11.0 \ -// RUN: %clang -target armv7-apple-darwin -c -### %s 2> %t.err +// RUN: not %clang -target armv7-apple-darwin -c -### %s 2> %t.err // RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-VERSION-IOS4 %s // CHECK-VERSION-IOS4: invalid iOS deployment version 'IPHONEOS_DEPLOYMENT_TARGET=11.0' -// RUN: %clang -target armv7-apple-ios11.0 -c -### %s 2> %t.err +// RUN: not %clang -target armv7-apple-ios11.0 -c -### %s 2> %t.err // RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-VERSION-IOS41 %s // CHECK-VERSION-IOS41: invalid iOS deployment version '-target armv7-apple-ios11.0' -// RUN: %clang -target armv7-apple-darwin -miphoneos-version-min=11.0 -c -### %s 2> %t.err +// RUN: not %clang -target armv7-apple-darwin -miphoneos-version-min=11.0 -c -### %s 2> %t.err // RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-VERSION-IOS5 %s // CHECK-VERSION-IOS5: invalid iOS deployment version '-miphoneos-version-min=11.0' -// RUN: %clang -target i386-apple-darwin -mios-simulator-version-min=11.0 -c -### %s 2> %t.err +// RUN: not %clang -target i386-apple-darwin -mios-simulator-version-min=11.0 -c -### %s 2> %t.err // RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-VERSION-IOS6 %s // CHECK-VERSION-IOS6: invalid iOS deployment version '-mios-simulator-version-min=11.0' -// RUN: %clang -target armv7-apple-ios11.1 -c -### %s 2>&1 | \ +// RUN: not %clang -target armv7-apple-ios11.1 -c -### %s 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-VERSION-IOS71 %s // CHECK-VERSION-IOS71: invalid iOS deployment version // RUN: %clang -target armv7-apple-darwin -Wno-missing-sysroot -isysroot SDKs/iPhoneOS11.0.sdk -c -### %s 2>&1 | \ @@ -82,9 +82,9 @@ // RUN: %clang -target x86_64-apple-darwin -mmacos-version-min=10.10 -c %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-VERSION-OSX10 %s // CHECK-VERSION-OSX10: "x86_64-apple-macosx10.10.0" -// RUN: %clang -target x86_64-apple-darwin -mmacosx-version-min= -c %s -### 2>&1 | \ +// RUN: not %clang -target x86_64-apple-darwin -mmacosx-version-min= -c %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-VERSION-MISSING %s -// RUN: %clang -target x86_64-apple-darwin -mmacos-version-min= -c %s -### 2>&1 | \ +// RUN: not %clang -target x86_64-apple-darwin -mmacos-version-min= -c %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-VERSION-MISSING %s // CHECK-VERSION-MISSING: invalid version number // RUN: %clang -target armv7k-apple-darwin -mwatchos-version-min=2.0 -c %s -### 2>&1 | \ @@ -160,10 +160,10 @@ // // Make sure stdlib is not mistaken // RUN: env DRIVERKIT_DEPLOYMENT_TARGET=2.0 \ -// RUN: %clang -target arm64-apple-darwin -c -x c++ %s -stdlib=libc++ -### 2>&1 +// RUN: not %clang -target arm64-apple-darwin -c -x c++ %s -stdlib=libc++ -### 2>&1 // RUN: env MACOSX_DEPLOYMENT_TARGET=1000.1000 \ -// RUN: %clang -target x86_64-apple-darwin -c %s -### 2>&1 | \ +// RUN: not %clang -target x86_64-apple-darwin -c %s -### 2>&1 | \ // RUN: FileCheck --check-prefix=CHECK-VERSION-INVALID-ENV %s // CHECK-VERSION-INVALID-ENV: invalid version number in 'MACOSX_DEPLOYMENT_TARGET=1000.1000' diff --git a/clang/test/Driver/debug-options-as.c b/clang/test/Driver/debug-options-as.c --- a/clang/test/Driver/debug-options-as.c +++ b/clang/test/Driver/debug-options-as.c @@ -56,7 +56,7 @@ // RUN: | FileCheck -check-prefix=GDWARF64_VER %s // RUN: %clang -### -c -gdwarf64 -gdwarf-4 --target=i386-linux-gnu %s 2>&1 \ // RUN: | FileCheck -check-prefix=GDWARF64_32ARCH %s -// RUN: %clang -### -c -gdwarf64 -gdwarf-4 -target x86_64-apple-darwin %s 2>&1 \ +// RUN: not %clang -### -c -gdwarf64 -gdwarf-4 -target x86_64-apple-darwin %s 2>&1 \ // RUN: | FileCheck -check-prefix=GDWARF64_ELF %s // // GDWARF64_VER: error: invalid argument '-gdwarf64' only allowed with 'DWARFv3 or greater' diff --git a/clang/test/Driver/debug-options.c b/clang/test/Driver/debug-options.c --- a/clang/test/Driver/debug-options.c +++ b/clang/test/Driver/debug-options.c @@ -262,7 +262,7 @@ // RUN: %clang -### -fdebug-types-section -target wasm32-unknown-unknown %s 2>&1 \ // RUN: | FileCheck -check-prefix=FDTS %s // -// RUN: %clang -### -fdebug-types-section -target x86_64-apple-darwin %s 2>&1 \ +// RUN: not %clang -### -fdebug-types-section -target x86_64-apple-darwin %s 2>&1 \ // RUN: | FileCheck -check-prefix=FDTSE %s // // RUN: %clang -### -fdebug-types-section -fno-debug-types-section -target x86_64-apple-darwin %s 2>&1 \ @@ -417,7 +417,7 @@ // NOMACRO-NOT: "-debug-info-macro" // // RUN: %clang -### -gdwarf-5 -gembed-source %s 2>&1 | FileCheck -check-prefix=GEMBED_5 %s -// RUN: %clang -### -gdwarf-2 -gembed-source %s 2>&1 | FileCheck -check-prefix=GEMBED_2 %s +// RUN: not %clang -### -gdwarf-2 -gembed-source %s 2>&1 | FileCheck -check-prefix=GEMBED_2 %s // RUN: %clang -### -gdwarf-5 -gno-embed-source %s 2>&1 | FileCheck -check-prefix=NOGEMBED_5 %s // RUN: %clang -### -gdwarf-2 -gno-embed-source %s 2>&1 | FileCheck -check-prefix=NOGEMBED_2 %s // @@ -445,7 +445,7 @@ // RUN: | FileCheck -check-prefix=GDWARF64_ON %s // RUN: %clang -### -c -gdwarf-4 -gdwarf64 --target=i386-linux-gnu %s 2>&1 \ // RUN: | FileCheck -check-prefix=GDWARF64_32ARCH %s -// RUN: %clang -### -c -gdwarf-4 -gdwarf64 -target x86_64-apple-darwin %s 2>&1 \ +// RUN: not %clang -### -c -gdwarf-4 -gdwarf64 -target x86_64-apple-darwin %s 2>&1 \ // RUN: | FileCheck -check-prefix=GDWARF64_ELF %s // // GDWARF64_ON: "-gdwarf64" diff --git a/clang/test/Driver/debug-prefix-map.c b/clang/test/Driver/debug-prefix-map.c --- a/clang/test/Driver/debug-prefix-map.c +++ b/clang/test/Driver/debug-prefix-map.c @@ -1,7 +1,7 @@ -// RUN: %clang -### -fdebug-prefix-map=old %s 2>&1 | FileCheck %s -check-prefix CHECK-DEBUG-INVALID -// RUN: %clang -### -fmacro-prefix-map=old %s 2>&1 | FileCheck %s -check-prefix CHECK-MACRO-INVALID -// RUN: %clang -### -fcoverage-prefix-map=old %s 2>&1 | FileCheck %s -check-prefix CHECK-COVERAGE-INVALID -// RUN: %clang -### -ffile-prefix-map=old %s 2>&1 | FileCheck %s -check-prefix CHECK-FILE-INVALID +// RUN: not %clang -### -fdebug-prefix-map=old %s 2>&1 | FileCheck %s -check-prefix CHECK-DEBUG-INVALID +// RUN: not %clang -### -fmacro-prefix-map=old %s 2>&1 | FileCheck %s -check-prefix CHECK-MACRO-INVALID +// RUN: not %clang -### -fcoverage-prefix-map=old %s 2>&1 | FileCheck %s -check-prefix CHECK-COVERAGE-INVALID +// RUN: not %clang -### -ffile-prefix-map=old %s 2>&1 | FileCheck %s -check-prefix CHECK-FILE-INVALID // RUN: %clang -### -fdebug-prefix-map=old=new %s 2>&1 | FileCheck %s -check-prefix CHECK-DEBUG-SIMPLE // RUN: %clang -### -fmacro-prefix-map=old=new %s 2>&1 | FileCheck %s -check-prefix CHECK-MACRO-SIMPLE diff --git a/clang/test/Driver/dxc_E.hlsl b/clang/test/Driver/dxc_E.hlsl --- a/clang/test/Driver/dxc_E.hlsl +++ b/clang/test/Driver/dxc_E.hlsl @@ -1,4 +1,4 @@ -// RUN: %clang_dxc -Efoo -Tlib_6_7 foo.hlsl -### %s 2>&1 | FileCheck %s +// RUN: not %clang_dxc -Efoo -Tlib_6_7 foo.hlsl -### %s 2>&1 | FileCheck %s // Make sure E option flag which translated into "-hlsl-entry". // CHECK:"-hlsl-entry" "foo" diff --git a/clang/test/Driver/dxc_Fo.hlsl b/clang/test/Driver/dxc_Fo.hlsl --- a/clang/test/Driver/dxc_Fo.hlsl +++ b/clang/test/Driver/dxc_Fo.hlsl @@ -1,6 +1,6 @@ -// RUN: %clang_dxc -T lib_6_7 foo.hlsl -### %s 2>&1 | FileCheck %s --check-prefix=DEFAULT -// RUN: %clang_dxc -fcgl -T lib_6_7 foo.hlsl -### %s 2>&1 | FileCheck %s --check-prefix=FCGL -// RUN: %clang_dxc -T lib_6_7 foo.hlsl -Fo foo.dxc -### %s 2>&1 | FileCheck %s --check-prefix=EMITOBJ +// RUN: not %clang_dxc -T lib_6_7 foo.hlsl -### %s 2>&1 | FileCheck %s --check-prefix=DEFAULT +// RUN: not %clang_dxc -fcgl -T lib_6_7 foo.hlsl -### %s 2>&1 | FileCheck %s --check-prefix=FCGL +// RUN: not %clang_dxc -T lib_6_7 foo.hlsl -Fo foo.dxc -### %s 2>&1 | FileCheck %s --check-prefix=EMITOBJ // Make sure default use "-" as output and not emit obj. diff --git a/clang/test/Driver/dxc_O.hlsl b/clang/test/Driver/dxc_O.hlsl --- a/clang/test/Driver/dxc_O.hlsl +++ b/clang/test/Driver/dxc_O.hlsl @@ -1,9 +1,9 @@ -// RUN: %clang_dxc -T lib_6_7 foo.hlsl -### %s 2>&1 | FileCheck %s -// RUN: %clang_dxc -T lib_6_7 -Od foo.hlsl -### %s 2>&1 | FileCheck %s --check-prefix=Od -// RUN: %clang_dxc -T lib_6_7 -O0 foo.hlsl -### %s 2>&1 | FileCheck %s --check-prefix=O0 -// RUN: %clang_dxc -T lib_6_7 -O1 foo.hlsl -### %s 2>&1 | FileCheck %s --check-prefix=O1 -// RUN: %clang_dxc -T lib_6_7 -O2 foo.hlsl -### %s 2>&1 | FileCheck %s --check-prefix=O2 -// RUN: %clang_dxc -T lib_6_7 -O3 foo.hlsl -### %s 2>&1 | FileCheck %s --check-prefix=O3 +// RUN: not %clang_dxc -T lib_6_7 foo.hlsl -### %s 2>&1 | FileCheck %s +// RUN: not %clang_dxc -T lib_6_7 -Od foo.hlsl -### %s 2>&1 | FileCheck %s --check-prefix=Od +// RUN: not %clang_dxc -T lib_6_7 -O0 foo.hlsl -### %s 2>&1 | FileCheck %s --check-prefix=O0 +// RUN: not %clang_dxc -T lib_6_7 -O1 foo.hlsl -### %s 2>&1 | FileCheck %s --check-prefix=O1 +// RUN: not %clang_dxc -T lib_6_7 -O2 foo.hlsl -### %s 2>&1 | FileCheck %s --check-prefix=O2 +// RUN: not %clang_dxc -T lib_6_7 -O3 foo.hlsl -### %s 2>&1 | FileCheck %s --check-prefix=O3 // Make sure default is O3. // CHECK: "-O3" diff --git a/clang/test/Driver/dxc_fcgl.hlsl b/clang/test/Driver/dxc_fcgl.hlsl --- a/clang/test/Driver/dxc_fcgl.hlsl +++ b/clang/test/Driver/dxc_fcgl.hlsl @@ -1,4 +1,4 @@ -// RUN: %clang_dxc -fcgl -T lib_6_7 foo.hlsl -### %s 2>&1 | FileCheck %s +// RUN: not %clang_dxc -fcgl -T lib_6_7 foo.hlsl -### %s 2>&1 | FileCheck %s // Make sure fcgl option flag which translated into "-S" "-emit-llvm" "-disable-llvm-passes". // CHECK:"-S" diff --git a/clang/test/Driver/embed-bitcode.c b/clang/test/Driver/embed-bitcode.c --- a/clang/test/Driver/embed-bitcode.c +++ b/clang/test/Driver/embed-bitcode.c @@ -57,6 +57,6 @@ // CHECK-LINKER: -bitcode_bundle // CHECK-NO-LINKER-NOT: -bitcode_bundle -// RUN: %clang -target armv7-apple-darwin -miphoneos-version-min=5.0 %s -fembed-bitcode -### 2>&1 | \ +// RUN: not %clang -target armv7-apple-darwin -miphoneos-version-min=5.0 %s -fembed-bitcode -### 2>&1 | \ // RUN: FileCheck %s -check-prefix=CHECK-PLATFORM-NOTSUPPORTED // CHECK-PLATFORM-NOTSUPPORTED: -fembed-bitcode is not supported on versions of iOS prior to 6.0 diff --git a/clang/test/Driver/endian.c b/clang/test/Driver/endian.c --- a/clang/test/Driver/endian.c +++ b/clang/test/Driver/endian.c @@ -1,5 +1,5 @@ // RUN: %clang -### -c --target=x86_64 -mbig-endian -mlittle-endian %s 2>&1 | FileCheck /dev/null --implicit-check-not=error: -// RUN: %clang -### -c --target=x86_64 -mlittle-endian -mbig-endian %s 2>&1 | FileCheck %s --implicit-check-not=error: +// RUN: not %clang -### -c --target=x86_64 -mlittle-endian -mbig-endian %s 2>&1 | FileCheck %s --implicit-check-not=error: // CHECK: error: unsupported option '-mlittle-endian' for target 'x86_64' // CHECK: error: unsupported option '-mbig-endian' for target 'x86_64' diff --git a/clang/test/Driver/falign-loops.c b/clang/test/Driver/falign-loops.c --- a/clang/test/Driver/falign-loops.c +++ b/clang/test/Driver/falign-loops.c @@ -3,10 +3,10 @@ // RUN: %clang -### -falign-loops=1 %s 2>&1 | FileCheck %s --check-prefix=CHECK_1 // RUN: %clang -### -falign-loops=4 %s 2>&1 | FileCheck %s --check-prefix=CHECK_4 /// Only powers of 2 are supported for now. -// RUN: %clang -### -falign-loops=5 %s 2>&1 | FileCheck %s --check-prefix=CHECK_5 +// RUN: not %clang -### -falign-loops=5 %s 2>&1 | FileCheck %s --check-prefix=CHECK_5 // RUN: %clang -### -falign-loops=65536 %s 2>&1 | FileCheck %s --check-prefix=CHECK_65536 -// RUN: %clang -### -falign-loops=65537 %s 2>&1 | FileCheck %s --check-prefix=CHECK_65537 -// RUN: %clang -### -falign-loops=a %s 2>&1 | FileCheck %s --check-prefix=CHECK_ERR_A +// RUN: not %clang -### -falign-loops=65537 %s 2>&1 | FileCheck %s --check-prefix=CHECK_65537 +// RUN: not %clang -### -falign-loops=a %s 2>&1 | FileCheck %s --check-prefix=CHECK_ERR_A // CHECK_NO-NOT: "-falign-loops= // CHECK_1: "-falign-loops=1" diff --git a/clang/test/Driver/fbasic-block-sections.c b/clang/test/Driver/fbasic-block-sections.c --- a/clang/test/Driver/fbasic-block-sections.c +++ b/clang/test/Driver/fbasic-block-sections.c @@ -6,8 +6,8 @@ // RUN: %clang -### -target arm-unknown-linux -fbasic-block-sections=all -fbasic-block-sections=none %s -S 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-NOOPT %s // RUN: not %clang -c -target x86_64-apple-darwin10 -fbasic-block-sections=all %s -S 2>&1 | FileCheck -check-prefix=CHECK-TRIPLE %s -// RUN: %clang -### -target x86_64 -fbasic-block-sections=alll %s -S 2>&1 | FileCheck -check-prefix=CHECK-INVALID-VALUE %s -// RUN: %clang -### -target x86_64 -fbasic-block-sections=list %s -S 2>&1 | FileCheck -check-prefix=CHECK-INVALID-VALUE %s +// RUN: not %clang -### -target x86_64 -fbasic-block-sections=alll %s -S 2>&1 | FileCheck -check-prefix=CHECK-INVALID-VALUE %s +// RUN: not %clang -### -target x86_64 -fbasic-block-sections=list %s -S 2>&1 | FileCheck -check-prefix=CHECK-INVALID-VALUE %s // RUN: %clang -### -target x86_64 -fbasic-block-sections=list= %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NULL-LIST %s // RUN: %clang -### -target x86_64 -fbasic-block-sections=none %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-NONE %s // RUN: %clang -### -x cuda -nocudainc -nocudalib --target=x86_64 -fbasic-block-sections=all --cuda-path=%S/Inputs/CUDA/usr/local/cuda %s -c 2>&1 \ diff --git a/clang/test/Driver/fcs-profile-generate.c b/clang/test/Driver/fcs-profile-generate.c --- a/clang/test/Driver/fcs-profile-generate.c +++ b/clang/test/Driver/fcs-profile-generate.c @@ -11,5 +11,5 @@ // NOUSE: "-fprofile-instrument=csllvm" // NOUSE-NOT: "-fprofile-instrument-path= -// RUN: %clang -### -c -fprofile-generate -fcs-profile-generate %s 2>&1 | FileCheck %s --check-prefix=CONFLICT +// RUN: not %clang -### -c -fprofile-generate -fcs-profile-generate %s 2>&1 | FileCheck %s --check-prefix=CONFLICT // CONFLICT: error: invalid argument '-fcs-profile-generate' not allowed with '-fprofile-generate' diff --git a/clang/test/Driver/flang/flang.f90 b/clang/test/Driver/flang/flang.f90 --- a/clang/test/Driver/flang/flang.f90 +++ b/clang/test/Driver/flang/flang.f90 @@ -34,7 +34,7 @@ ! CHECK-EMIT-LLVM-IR-DAG: "-emit-llvm" ! CHECK-EMIT-LLVM-IR-DAG: "-o" "{{[^"]*}}.ll" -! RUN: %clang --driver-mode=flang -### -emit-llvm %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-LLVM-BC %s +! RUN: not %clang --driver-mode=flang -### -emit-llvm %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-LLVM-BC %s ! CHECK-EMIT-LLVM-BC-DAG: "-emit-llvm-bc" ! CHECK-EMIT-LLVM-BC-DAG: "-o" "{{[^"]*}}.bc" diff --git a/clang/test/Driver/flang/flang_ucase.F90 b/clang/test/Driver/flang/flang_ucase.F90 --- a/clang/test/Driver/flang/flang_ucase.F90 +++ b/clang/test/Driver/flang/flang_ucase.F90 @@ -34,7 +34,7 @@ ! CHECK-EMIT-LLVM-IR-DAG: "-emit-llvm" ! CHECK-EMIT-LLVM-IR-DAG: "-o" "{{[^"]*}}.ll" -! RUN: %clang --driver-mode=flang -### -emit-llvm %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-LLVM-BC %s +! RUN: not %clang --driver-mode=flang -### -emit-llvm %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-LLVM-BC %s ! CHECK-EMIT-LLVM-BC-DAG: "-emit-llvm-bc" ! CHECK-EMIT-LLVM-BC-DAG: "-o" "{{[^"]*}}.bc" diff --git a/clang/test/Driver/fmessage-length.c b/clang/test/Driver/fmessage-length.c --- a/clang/test/Driver/fmessage-length.c +++ b/clang/test/Driver/fmessage-length.c @@ -5,5 +5,5 @@ // RUN: %clang -### -c %s -fmessage-length=0 2>&1 | FileCheck --check-prefix=ZERO %s // ZERO-NOT: "-fmessage-length=0" -// RUN: %clang -### -c %s -fmessage-length=nan 2>&1 | FileCheck --check-prefix=ERR %s +// RUN: not %clang -### -c %s -fmessage-length=nan 2>&1 | FileCheck --check-prefix=ERR %s // ERR: error: invalid argument 'nan' to -fmessage-length= diff --git a/clang/test/Driver/frame-pointer-elim.c b/clang/test/Driver/frame-pointer-elim.c --- a/clang/test/Driver/frame-pointer-elim.c +++ b/clang/test/Driver/frame-pointer-elim.c @@ -42,7 +42,7 @@ // RUN: FileCheck --check-prefix=KEEP-NONE %s // -pg -fomit-frame-pointer => error. -// RUN: %clang -### -S -fomit-frame-pointer -pg %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-OMIT-FP-PG %s +// RUN: not %clang -### -S -fomit-frame-pointer -pg %s 2>&1 | FileCheck -check-prefix=CHECK-NO-MIX-OMIT-FP-PG %s // RUN: %clang -### -S -fomit-frame-pointer -fno-omit-frame-pointer -pg %s 2>&1 | FileCheck -check-prefix=CHECK-MIX-NO-OMIT-FP-PG %s // CHECK-NO-MIX-OMIT-FP-PG: '-fomit-frame-pointer' not allowed with '-pg' // CHECK-MIX-NO-OMIT-FP-PG-NOT: '-fomit-frame-pointer' not allowed with '-pg' @@ -161,7 +161,7 @@ // RUN: FileCheck --check-prefix=KEEP-ALL %s // RUN: %clang -### --target=riscv64-linux-android -O1 -S %s 2>&1 | \ // RUN: FileCheck --check-prefix=KEEP-NON-LEAF %s -// RUN: %clang -### --target=riscv64-linux-android -mbig-endian -O1 -S %s 2>&1 | \ +// RUN: not %clang -### --target=riscv64-linux-android -mbig-endian -O1 -S %s 2>&1 | \ // RUN: FileCheck --check-prefix=KEEP-NON-LEAF %s void f0() {} void f1() { f0(); } diff --git a/clang/test/Driver/frame-pointer-elim.cl b/clang/test/Driver/frame-pointer-elim.cl --- a/clang/test/Driver/frame-pointer-elim.cl +++ b/clang/test/Driver/frame-pointer-elim.cl @@ -1,8 +1,8 @@ -// RUN: %clang --target=amdgcn-amd-amdhsa -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECKNONE %s -// RUN: %clang --target=amdgcn-amd-amdhsa -### -S -O3 -fno-omit-frame-pointer %s 2>&1 | FileCheck -check-prefix=CHECKALL %s -// RUN: %clang --target=amdgcn-amd-amdhsa -### -S %s 2>&1 | FileCheck -check-prefix=CHECKALL %s -// RUN: %clang --target=amdgcn-amd-amdhsa -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECKALL %s -// RUN: %clang --target=amdgcn-amd-amdhsa -### -S -cl-opt-disable %s 2>&1 | FileCheck -check-prefix=CHECKALL %s +// RUN: not %clang --target=amdgcn-amd-amdhsa -### -S -O3 %s 2>&1 | FileCheck -check-prefix=CHECKNONE %s +// RUN: not %clang --target=amdgcn-amd-amdhsa -### -S -O3 -fno-omit-frame-pointer %s 2>&1 | FileCheck -check-prefix=CHECKALL %s +// RUN: not %clang --target=amdgcn-amd-amdhsa -### -S %s 2>&1 | FileCheck -check-prefix=CHECKALL %s +// RUN: not %clang --target=amdgcn-amd-amdhsa -### -S -O0 %s 2>&1 | FileCheck -check-prefix=CHECKALL %s +// RUN: not %clang --target=amdgcn-amd-amdhsa -### -S -cl-opt-disable %s 2>&1 | FileCheck -check-prefix=CHECKALL %s // CHECKNONE: -mframe-pointer=none // CHECKALL: -mframe-pointer=all diff --git a/clang/test/Driver/fsanitize-address-destructor.c b/clang/test/Driver/fsanitize-address-destructor.c --- a/clang/test/Driver/fsanitize-address-destructor.c +++ b/clang/test/Driver/fsanitize-address-destructor.c @@ -14,7 +14,7 @@ // RUN: FileCheck -check-prefix=CHECK-GLOBAL-ARG %s // CHECK-GLOBAL-ARG: "-fsanitize-address-destructor=global" -// RUN: %clang -target x86_64-apple-macosx10.15-gnu -fsanitize=address \ +// RUN: not %clang -target x86_64-apple-macosx10.15-gnu -fsanitize=address \ // RUN: -fsanitize-address-destructor=bad_arg %s -### 2>&1 | \ // RUN: FileCheck -check-prefix=CHECK-INVALID-ARG %s // CHECK-INVALID-ARG: error: unsupported argument 'bad_arg' to option '-fsanitize-address-destructor=' diff --git a/clang/test/Driver/fsanitize-metadata.c b/clang/test/Driver/fsanitize-metadata.c --- a/clang/test/Driver/fsanitize-metadata.c +++ b/clang/test/Driver/fsanitize-metadata.c @@ -1,7 +1,7 @@ // RUN: %clang --target=x86_64-linux-gnu -fexperimental-sanitize-metadata=all -fno-experimental-sanitize-metadata=all %s -### 2>&1 | FileCheck %s // CHECK-NOT: -fexperimental-sanitize-metadata -// RUN: %clang --target=x86_64-linux-gnu -fexperimental-sanitize-metadata=bad_arg %s -### 2>&1 | FileCheck -check-prefix=CHECK-INVALID %s +// RUN: not %clang --target=x86_64-linux-gnu -fexperimental-sanitize-metadata=bad_arg %s -### 2>&1 | FileCheck -check-prefix=CHECK-INVALID %s // CHECK-INVALID: error: unsupported argument 'bad_arg' to option '-fexperimental-sanitize-metadata=' // RUN: %clang --target=x86_64-linux-gnu -fexperimental-sanitize-metadata=covered %s -### 2>&1 | FileCheck -check-prefix=CHECK-COVERED %s diff --git a/clang/test/Driver/fsanitize-use-after-return.c b/clang/test/Driver/fsanitize-use-after-return.c --- a/clang/test/Driver/fsanitize-use-after-return.c +++ b/clang/test/Driver/fsanitize-use-after-return.c @@ -24,7 +24,7 @@ // RUN: FileCheck -check-prefix=CHECK-ALWAYS-ARG %s // CHECK-ALWAYS-ARG: "-fsanitize-address-use-after-return=always" -// RUN: %clang -target x86_64-apple-macosx10.15-gnu -fsanitize=address \ +// RUN: not %clang -target x86_64-apple-macosx10.15-gnu -fsanitize=address \ // RUN: -fsanitize-address-use-after-return=bad_arg %s -### 2>&1 | \ // RUN: FileCheck -check-prefix=CHECK-INVALID-ARG %s // CHECK-INVALID-ARG: error: unsupported argument 'bad_arg' to option '-fsanitize-address-use-after-return=' diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c --- a/clang/test/Driver/fsanitize.c +++ b/clang/test/Driver/fsanitize.c @@ -83,7 +83,7 @@ // RUN: %clang -fsanitize=bounds -### -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=CHECK-BOUNDS // CHECK-BOUNDS: "-fsanitize={{((array-bounds|local-bounds),?){2}"}} -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=all %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSANITIZE-ALL +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=all %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSANITIZE-ALL // CHECK-FSANITIZE-ALL: error: unsupported argument 'all' to option '-fsanitize=' // RUN: %clang --target=x86_64-linux-gnu -fsanitize=address,undefined -fno-sanitize=all -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FNO-SANITIZE-ALL @@ -95,112 +95,112 @@ // RUN: %clang -fsanitize=shift -fno-sanitize=shift-base %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FSANITIZE-SHIFT-PARTIAL // CHECK-FSANITIZE-SHIFT-PARTIAL: "-fsanitize=shift-exponent" -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=vptr -fsanitize-trap=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-TRAP-UNDEF -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=vptr -fsanitize-undefined-trap-on-error %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-TRAP-UNDEF +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=vptr -fsanitize-trap=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-TRAP-UNDEF +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=vptr -fsanitize-undefined-trap-on-error %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-TRAP-UNDEF // CHECK-VPTR-TRAP-UNDEF: error: invalid argument '-fsanitize=vptr' not allowed with '-fsanitize-trap=undefined' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=vptr -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-NO-RTTI +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=vptr -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-NO-RTTI // CHECK-VPTR-NO-RTTI: '-fsanitize=vptr' not allowed with '-fno-rtti' // RUN: %clang -fsanitize=undefined -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UNDEFINED-NO-RTTI // CHECK-UNDEFINED-NO-RTTI-NOT: vptr -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANT +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=address,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANT // CHECK-SANA-SANT: '-fsanitize=address' not allowed with '-fsanitize=thread' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANM +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=address,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANM // CHECK-SANA-SANM: '-fsanitize=address' not allowed with '-fsanitize=memory' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANT-SANM +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=thread,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANT-SANM // CHECK-SANT-SANM: '-fsanitize=thread' not allowed with '-fsanitize=memory' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory,thread -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANM-SANT +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=memory,thread -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANM-SANT // CHECK-SANM-SANT: '-fsanitize=thread' not allowed with '-fsanitize=memory' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=leak,thread -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-SANT +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=leak,thread -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-SANT // CHECK-SANL-SANT: '-fsanitize=leak' not allowed with '-fsanitize=thread' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=leak,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-SANM +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=leak,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-SANM // CHECK-SANL-SANM: '-fsanitize=leak' not allowed with '-fsanitize=memory' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,address -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-ASAN +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,address -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-ASAN // CHECK-KMSAN-ASAN: '-fsanitize=kernel-memory' not allowed with '-fsanitize=address' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,hwaddress -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-HWASAN +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,hwaddress -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-HWASAN // CHECK-KMSAN-HWASAN: '-fsanitize=kernel-memory' not allowed with '-fsanitize=hwaddress' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,leak -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-LSAN +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,leak -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-LSAN // CHECK-KMSAN-LSAN: '-fsanitize=kernel-memory' not allowed with '-fsanitize=leak' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,thread -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-TSAN +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,thread -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-TSAN // CHECK-KMSAN-TSAN: '-fsanitize=kernel-memory' not allowed with '-fsanitize=thread' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,kernel-address -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-KASAN +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,kernel-address -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-KASAN // CHECK-KMSAN-KASAN: '-fsanitize=kernel-memory' not allowed with '-fsanitize=kernel-address' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-MSAN +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-MSAN // CHECK-KMSAN-MSAN: '-fsanitize=kernel-memory' not allowed with '-fsanitize=memory' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,safe-stack -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-SAFESTACK +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-memory,safe-stack -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KMSAN-SAFESTACK // CHECK-KMSAN-SAFESTACK: '-fsanitize=kernel-memory' not allowed with '-fsanitize=safe-stack' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-address,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANT +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-address,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANT // CHECK-SANKA-SANT: '-fsanitize=kernel-address' not allowed with '-fsanitize=thread' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-address,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANM +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-address,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANM // CHECK-SANKA-SANM: '-fsanitize=kernel-address' not allowed with '-fsanitize=memory' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-address,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANA +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-address,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANA // CHECK-SANKA-SANA: '-fsanitize=kernel-address' not allowed with '-fsanitize=address' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-address,leak -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANL +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-address,leak -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKA-SANL // CHECK-SANKA-SANL: '-fsanitize=kernel-address' not allowed with '-fsanitize=leak' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANT +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANT // CHECK-SANKHA-SANT: '-fsanitize=kernel-hwaddress' not allowed with '-fsanitize=thread' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANM +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANM // CHECK-SANKHA-SANM: '-fsanitize=kernel-hwaddress' not allowed with '-fsanitize=memory' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANA +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANA // CHECK-SANKHA-SANA: '-fsanitize=kernel-hwaddress' not allowed with '-fsanitize=address' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,leak -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANL +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,leak -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANL // CHECK-SANKHA-SANL: '-fsanitize=kernel-hwaddress' not allowed with '-fsanitize=leak' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,hwaddress -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANHA +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,hwaddress -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANHA // CHECK-SANKHA-SANHA: '-fsanitize=kernel-hwaddress' not allowed with '-fsanitize=hwaddress' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,kernel-address -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANKA +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kernel-hwaddress,kernel-address -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANKHA-SANKA // CHECK-SANKHA-SANKA: '-fsanitize=kernel-hwaddress' not allowed with '-fsanitize=kernel-address' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANHA-SANT +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=hwaddress,thread -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANHA-SANT // CHECK-SANHA-SANT: '-fsanitize=hwaddress' not allowed with '-fsanitize=thread' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANHA-SANM +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=hwaddress,memory -pie -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANHA-SANM // CHECK-SANHA-SANM: '-fsanitize=hwaddress' not allowed with '-fsanitize=memory' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANHA-SANA +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=hwaddress,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANHA-SANA // CHECK-SANHA-SANA: '-fsanitize=hwaddress' not allowed with '-fsanitize=address' -// RUN: %clang --target=aarch64-linux-android -fsanitize=memtag,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-SANA +// RUN: not %clang --target=aarch64-linux-android -fsanitize=memtag,address -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-SANA // CHECK-SANMT-SANA: '-fsanitize=memtag' not allowed with '-fsanitize=address' -// RUN: %clang --target=aarch64-linux-android -fsanitize=memtag,hwaddress -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-SANHA +// RUN: not %clang --target=aarch64-linux-android -fsanitize=memtag,hwaddress -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-SANHA // CHECK-SANMT-SANHA: '-fsanitize=memtag' not allowed with '-fsanitize=hwaddress' -// RUN: %clang --target=i386-linux-android -fsanitize=memtag -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-BAD-ARCH -// RUN: %clang --target=x86_64-linux-android -fsanitize=memtag -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-BAD-ARCH +// RUN: not %clang --target=i386-linux-android -fsanitize=memtag -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-BAD-ARCH +// RUN: not %clang --target=x86_64-linux-android -fsanitize=memtag -fno-rtti %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-BAD-ARCH // CHECK-SANMT-BAD-ARCH: unsupported option '-fsanitize=memtag' for target // RUN: %clang --target=aarch64-linux-android31 -fsanitize=memtag -march=armv8-a+memtag %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-MT // CHECK-SANMT-MT: "-target-feature" "+mte" // CHECK-SANMT-MT-SAME: "-fsanitize=memtag-stack,memtag-heap,memtag-globals" -// RUN: %clang --target=aarch64-linux -fsanitize=memtag %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-NOMT-0 +// RUN: not %clang --target=aarch64-linux -fsanitize=memtag %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-NOMT-0 // CHECK-SANMT-NOMT-0: '-fsanitize=memtag-stack' requires hardware support (+memtag) -// RUN: %clang --target=aarch64-linux -fsanitize=memtag -I +mte %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-NOMT-1 +// RUN: not %clang --target=aarch64-linux -fsanitize=memtag -I +mte %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANMT-NOMT-1 // CHECK-SANMT-NOMT-1: '-fsanitize=memtag-stack' requires hardware support (+memtag) // RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-use-after-scope %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-SCOPE @@ -312,7 +312,7 @@ // RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=2 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-2 // CHECK-TRACK-ORIGINS-2: -fsanitize-memory-track-origins=2 -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=3 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-3 +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-track-origins=3 -pie %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TRACK-ORIGINS-3 // CHECK-TRACK-ORIGINS-3: error: invalid value '3' in '-fsanitize-memory-track-origins=3' // RUN: %clang --target=x86_64-linux-gnu -fsanitize=memory -fsanitize-memory-use-after-dtor %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-USE-AFTER-DTOR @@ -330,7 +330,7 @@ // CHECK-ASAN-FIELD-PADDING-1: -fsanitize-address-field-padding=1 // RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-field-padding=2 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-2 // CHECK-ASAN-FIELD-PADDING-2: -fsanitize-address-field-padding=2 -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-field-padding=3 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-3 +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-address-field-padding=3 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-3 // CHECK-ASAN-FIELD-PADDING-3: error: invalid value '3' in '-fsanitize-address-field-padding=3' // RUN: %clang --target=x86_64-linux-gnu -fsanitize-address-field-padding=2 %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-FIELD-PADDING-NO-ASAN // CHECK-ASAN-FIELD-PADDING-NO-ASAN: warning: argument unused during compilation: '-fsanitize-address-field-padding=2' @@ -361,15 +361,15 @@ // RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=address -fsanitize-recover -### 2>&1 | FileCheck %s --check-prefix=CHECK-RECOVER-ASAN // CHECK-RECOVER-ASAN: "-fsanitize-recover=address" -// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover=foobar,object-size,unreachable -### 2>&1 | FileCheck %s --check-prefix=CHECK-DIAG-RECOVER +// RUN: not %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover=foobar,object-size,unreachable -### 2>&1 | FileCheck %s --check-prefix=CHECK-DIAG-RECOVER // CHECK-DIAG-RECOVER: unsupported argument 'foobar' to option '-fsanitize-recover=' // CHECK-DIAG-RECOVER: unsupported argument 'unreachable' to option '-fsanitize-recover=' // RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=undefined -fsanitize-recover -fno-sanitize-recover -### 2>&1 | FileCheck %s --check-prefix=CHECK-DEPRECATED-RECOVER // CHECK-DEPRECATED-RECOVER-NOT: is deprecated -// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=kernel-address -fno-sanitize-recover=kernel-address -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-RECOVER-KASAN -// RUN: %clang --target=x86_64-linux-gnu %s -fsanitize=kernel-hwaddress -fno-sanitize-recover=kernel-hwaddress -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-RECOVER-KHWASAN +// RUN: not %clang --target=x86_64-linux-gnu %s -fsanitize=kernel-address -fno-sanitize-recover=kernel-address -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-RECOVER-KASAN +// RUN: not %clang --target=x86_64-linux-gnu %s -fsanitize=kernel-hwaddress -fno-sanitize-recover=kernel-hwaddress -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-RECOVER-KHWASAN // CHECK-NO-RECOVER-KASAN: unsupported argument 'kernel-address' to option '-fno-sanitize-recover=' // CHECK-NO-RECOVER-KHWASAN: unsupported argument 'kernel-hwaddress' to option '-fno-sanitize-recover=' @@ -409,10 +409,10 @@ // RUN: %clang --target=thumbeb-linux -fsanitize=address,leak -fno-sanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANA-SANL-NO-SANA-THUMBEB // CHECK-SANA-SANL-NO-SANA-THUMBEB: "-fsanitize=leak" -// RUN: %clang --target=mips-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-MIPS +// RUN: not %clang --target=mips-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-MIPS // CHECK-SANL-MIPS: unsupported option '-fsanitize=leak' for target 'mips-unknown-linux' -// RUN: %clang --target=mips-unknown-freebsd -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-MIPS-FREEBSD +// RUN: not %clang --target=mips-unknown-freebsd -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-MIPS-FREEBSD // CHECK-SANL-MIPS-FREEBSD: unsupported option '-fsanitize=leak' for target 'mips-unknown-freebsd' // RUN: %clang --target=mips64-unknown-freebsd -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-MIPS64-FREEBSD @@ -421,7 +421,7 @@ // RUN: %clang --target=powerpc64-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-PPC64 // RUN: %clang --target=powerpc64le-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-PPC64 // CHECK-SANL-PPC64: "-fsanitize=leak" -// RUN: %clang --target=powerpc-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-PPC +// RUN: not %clang --target=powerpc-unknown-linux -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-PPC // CHECK-SANL-PPC: unsupported option '-fsanitize=leak' for target 'powerpc-unknown-linux' // RUN: %clang --target=riscv64-linux-gnu -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SANL-RISCV64 @@ -441,21 +441,21 @@ // RUN: %clang --target=x86_64-linux-gnu -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN // CHECK-ASAN: "-fno-assume-sane-operator-new" -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=zzz %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-DIAG1 +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=zzz %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-DIAG1 // CHECK-DIAG1: unsupported argument 'zzz' to option '-fsanitize=' // CHECK-DIAG1-NOT: unsupported argument 'zzz' to option '-fsanitize=' -// RUN: %clang --target=x86_64-apple-darwin10 -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-DARWIN +// RUN: not %clang --target=x86_64-apple-darwin10 -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-DARWIN // CHECK-MSAN-DARWIN: unsupported option '-fsanitize=memory' for target 'x86_64-apple-darwin10' // RUN: %clang --target=x86_64-apple-darwin10 -fsanitize=memory -fno-sanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-NOMSAN-DARWIN // CHECK-MSAN-NOMSAN-DARWIN-NOT: unsupported option -// RUN: %clang --target=x86_64-apple-darwin10 -fsanitize=memory -fsanitize=thread,memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-TSAN-MSAN-DARWIN +// RUN: not %clang --target=x86_64-apple-darwin10 -fsanitize=memory -fsanitize=thread,memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-TSAN-MSAN-DARWIN // CHECK-MSAN-TSAN-MSAN-DARWIN: unsupported option '-fsanitize=memory' for target 'x86_64-apple-darwin10' // CHECK-MSAN-TSAN-MSAN-DARWIN-NOT: unsupported option -// RUN: %clang --target=x86_64-apple-darwin10 -fsanitize=thread,memory -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MSAN-MSAN-DARWIN +// RUN: not %clang --target=x86_64-apple-darwin10 -fsanitize=thread,memory -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MSAN-MSAN-DARWIN // CHECK-TSAN-MSAN-MSAN-DARWIN: unsupported option '-fsanitize=memory' for target 'x86_64-apple-darwin10' // CHECK-TSAN-MSAN-MSAN-DARWIN-NOT: unsupported option @@ -484,16 +484,16 @@ // RUN: %clang --target=x86_64-apple-tvos-simulator -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-X86-64-TVOSSIMULATOR // CHECK-TSAN-X86-64-TVOSSIMULATOR-NOT: unsupported option -// RUN: %clang --target=i386-apple-darwin -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-I386-DARWIN +// RUN: not %clang --target=i386-apple-darwin -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-I386-DARWIN // CHECK-TSAN-I386-DARWIN: unsupported option '-fsanitize=thread' for target 'i386-apple-darwin' -// RUN: %clang --target=arm-apple-ios -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-ARM-IOS +// RUN: not %clang --target=arm-apple-ios -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-ARM-IOS // CHECK-TSAN-ARM-IOS: unsupported option '-fsanitize=thread' for target 'arm-apple-ios' -// RUN: %clang --target=i386-apple-ios-simulator -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-I386-IOSSIMULATOR +// RUN: not %clang --target=i386-apple-ios-simulator -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-I386-IOSSIMULATOR // CHECK-TSAN-I386-IOSSIMULATOR: unsupported option '-fsanitize=thread' for target 'i386-apple-ios-simulator' -// RUN: %clang --target=i386-apple-tvos-simulator -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-I386-TVOSSIMULATOR +// RUN: not %clang --target=i386-apple-tvos-simulator -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-I386-TVOSSIMULATOR // CHECK-TSAN-I386-TVOSSIMULATOR: unsupported option '-fsanitize=thread' for target 'i386-apple-tvos-simulator' // RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fsanitize-thread-memory-access %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MEMORY-ACCESS @@ -530,10 +530,10 @@ // RUN: %clang --target=riscv64-pc-freebsd -fsanitize=function %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-FUNCTION // CHECK-FUNCTION: -cc1{{.*}}"-fsanitize=function" "-fsanitize-recover=function" -// RUN: %clang --target=x86_64-apple-darwin10 -mmacosx-version-min=10.8 -fsanitize=vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-DARWIN-OLD +// RUN: not %clang --target=x86_64-apple-darwin10 -mmacosx-version-min=10.8 -fsanitize=vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-DARWIN-OLD // CHECK-VPTR-DARWIN-OLD: unsupported option '-fsanitize=vptr' for target 'x86_64-apple-darwin10' -// RUN: %clang --target=arm-apple-ios4 -fsanitize=vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-IOS-OLD +// RUN: not %clang --target=arm-apple-ios4 -fsanitize=vptr %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-VPTR-IOS-OLD // CHECK-VPTR-IOS-OLD: unsupported option '-fsanitize=vptr' for target 'arm-apple-ios4' // RUN: %clang --target=aarch64-apple-darwin15.0.0 -fsanitize=vptr %s -### 2>&1 @@ -551,16 +551,16 @@ // RUN %clang --target=i386-pc-openbsd -fsanitize=undefined %s -### 2>&1 | FileCheck --check-prefix=CHECK-UBSAN-OPENBSD // CHECK-UBSAN-OPENBSD: -fsanitize=undefined -// RUN: %clang --target=i386-pc-openbsd -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-OPENBSD +// RUN: not %clang --target=i386-pc-openbsd -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-OPENBSD // CHECK-ASAN-OPENBSD: unsupported option '-fsanitize=address' for target 'i386-pc-openbsd' -// RUN: %clang --target=i386-pc-openbsd -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-OPENBSD +// RUN: not %clang --target=i386-pc-openbsd -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-OPENBSD // CHECK-LSAN-OPENBSD: unsupported option '-fsanitize=leak' for target 'i386-pc-openbsd' -// RUN: %clang --target=i386-pc-openbsd -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-OPENBSD +// RUN: not %clang --target=i386-pc-openbsd -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-OPENBSD // CHECK-TSAN-OPENBSD: unsupported option '-fsanitize=thread' for target 'i386-pc-openbsd' -// RUN: %clang --target=i386-pc-openbsd -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-OPENBSD +// RUN: not %clang --target=i386-pc-openbsd -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-OPENBSD // CHECK-MSAN-OPENBSD: unsupported option '-fsanitize=memory' for target 'i386-pc-openbsd' // RUN: %clang --target=x86_64-apple-darwin -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-X86-64-DARWIN @@ -607,10 +607,10 @@ // CHECK-CFI-NVCALL: -emit-llvm-bc{{.*}}-fsanitize=cfi-nvcall // CHECK-CFI-VCALL: -emit-llvm-bc{{.*}}-fsanitize=cfi-vcall -// RUN: %clang --target=x86_64-linux-gnu -fvisibility=hidden -flto -fsanitize=cfi-derived-cast -fno-lto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOLTO +// RUN: not %clang --target=x86_64-linux-gnu -fvisibility=hidden -flto -fsanitize=cfi-derived-cast -fno-lto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOLTO // CHECK-CFI-NOLTO: '-fsanitize=cfi-derived-cast' only allowed with '-flto' -// RUN: %clang --target=x86_64-linux-gnu -flto -fsanitize=cfi-derived-cast -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOVIS +// RUN: not %clang --target=x86_64-linux-gnu -flto -fsanitize=cfi-derived-cast -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOVIS // CHECK-CFI-NOVIS: error: invalid argument '-fsanitize=cfi-derived-cast' only allowed with '-fvisibility=' // RUN: %clang --target=x86_64-pc-win32 -flto -fsanitize=cfi-derived-cast -resource-dir=%S/Inputs/resource_dir -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOVIS-NOERROR @@ -618,16 +618,16 @@ // RUN: %clang --target=x86_64-linux-gnu -flto -fsanitize=cfi-derived-cast -resource-dir=%S/Inputs/resource_dir %t.o -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOVIS-NOERROR // CHECK-CFI-NOVIS-NOERROR-NOT: only allowed with -// RUN: %clang --target=mips-unknown-linux -fsanitize=cfi-icall %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-ICALL-MIPS +// RUN: not %clang --target=mips-unknown-linux -fsanitize=cfi-icall %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-ICALL-MIPS // CHECK-CFI-ICALL-MIPS: error: unsupported option '-fsanitize=cfi-icall' for target 'mips-unknown-linux' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize-trap=address -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-TRAP +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize-trap=address -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-TRAP // CHECK-ASAN-TRAP: error: unsupported argument 'address' to option '-fsanitize-trap=' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize-trap=hwaddress -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-TRAP +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize-trap=hwaddress -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-TRAP // CHECK-HWASAN-TRAP: error: unsupported argument 'hwaddress' to option '-fsanitize-trap=' -// RUN: %clang --target=x86_64-apple-darwin10 -mmacosx-version-min=10.7 -flto -fsanitize=cfi-vcall -fno-sanitize-trap=cfi -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-OLD-MACOS +// RUN: not %clang --target=x86_64-apple-darwin10 -mmacosx-version-min=10.7 -flto -fsanitize=cfi-vcall -fno-sanitize-trap=cfi -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-OLD-MACOS // CHECK-CFI-NOTRAP-OLD-MACOS: error: unsupported option '-fno-sanitize-trap=cfi-vcall' for target 'x86_64-apple-darwin10' // RUN: %clang --target=x86_64-pc-win32 -flto -fsanitize=cfi-vcall -fno-sanitize-trap=cfi -c -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-WIN @@ -643,7 +643,7 @@ // CHECK-CFI-NO-CROSS-DSO: -emit-llvm-bc // CHECK-CFI-NO-CROSS-DSO-NOT: -fsanitize-cfi-cross-dso -// RUN: %clang --target=x86_64-linux-gnu -fvisibility=hidden -fsanitize=cfi-mfcall -fsanitize-cfi-cross-dso -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-MFCALL-CROSS-DSO +// RUN: not %clang --target=x86_64-linux-gnu -fvisibility=hidden -fsanitize=cfi-mfcall -fsanitize-cfi-cross-dso -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-MFCALL-CROSS-DSO // CHECK-CFI-MFCALL-CROSS-DSO: '-fsanitize=cfi-mfcall' not allowed with '-fsanitize-cfi-cross-dso' // RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi-icall -fsanitize-cfi-icall-generalize-pointers -fvisibility=hidden -flto -c -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-GENERALIZE-POINTERS @@ -651,7 +651,7 @@ // CHECK-CFI-GENERALIZE-POINTERS: -fsanitize-cfi-icall-generalize-pointers // CHECK-NO-CFI-GENERALIZE-POINTERS-NOT: -fsanitize-cfi-icall-generalize-pointers -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi-icall -fsanitize-cfi-icall-generalize-pointers -fsanitize-cfi-cross-dso -fvisibility=hidden -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-GENERALIZE-AND-CROSS-DSO +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=cfi-icall -fsanitize-cfi-icall-generalize-pointers -fsanitize-cfi-cross-dso -fvisibility=hidden -flto -c %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-GENERALIZE-AND-CROSS-DSO // CHECK-CFI-GENERALIZE-AND-CROSS-DSO: error: invalid argument '-fsanitize-cfi-cross-dso' not allowed with '-fsanitize-cfi-icall-generalize-pointers' // RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi-icall -fsanitize-cfi-canonical-jump-tables -fvisibility=hidden -flto -c -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-CANONICAL-JUMP-TABLES @@ -663,27 +663,27 @@ // RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi -fsanitize-stats -flto -fvisibility=hidden -c -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-STATS // CHECK-CFI-STATS: -fsanitize-stats -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kcfi -fsanitize=cfi -flto -fvisibility=hidden %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI-NOCFI +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kcfi -fsanitize=cfi -flto -fvisibility=hidden %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI-NOCFI // CHECK-KCFI-NOCFI: error: invalid argument '-fsanitize=kcfi' not allowed with '-fsanitize=cfi' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kcfi -fsanitize-trap=kcfi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI-NOTRAP +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kcfi -fsanitize-trap=kcfi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI-NOTRAP // CHECK-KCFI-NOTRAP: error: unsupported argument 'kcfi' to option '-fsanitize-trap=' // RUN: %clang --target=x86_64-linux-gnu -fsanitize=kcfi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI // CHECK-KCFI: "-fsanitize=kcfi" -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kcfi -fno-sanitize-recover=kcfi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI-RECOVER +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kcfi -fno-sanitize-recover=kcfi %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI-RECOVER // CHECK-KCFI-RECOVER: error: unsupported argument 'kcfi' to option '-fno-sanitize-recover=' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=kcfi,function %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI-FUNCTION +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=kcfi,function %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-KCFI-FUNCTION // CHECK-KCFI-FUNCTION: error: invalid argument '-fsanitize=kcfi' not allowed with '-fsanitize=function' -// RUN: %clang_cl -fsanitize=address -c -MDd -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-DEBUGRTL -// RUN: %clang_cl -fsanitize=address -c -MTd -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-DEBUGRTL -// RUN: %clang_cl -fsanitize=address -c -LDd -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-DEBUGRTL -// RUN: %clang_cl -fsanitize=address -c -MD -MDd -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-DEBUGRTL -// RUN: %clang_cl -fsanitize=address -c -MT -MTd -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-DEBUGRTL -// RUN: %clang_cl -fsanitize=address -c -LD -LDd -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-DEBUGRTL +// RUN: not %clang_cl -fsanitize=address -c -MDd -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-DEBUGRTL +// RUN: not %clang_cl -fsanitize=address -c -MTd -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-DEBUGRTL +// RUN: not %clang_cl -fsanitize=address -c -LDd -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-DEBUGRTL +// RUN: not %clang_cl -fsanitize=address -c -MD -MDd -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-DEBUGRTL +// RUN: not %clang_cl -fsanitize=address -c -MT -MTd -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-DEBUGRTL +// RUN: not %clang_cl -fsanitize=address -c -LD -LDd -### -- %s 2>&1 | FileCheck %s -check-prefix=CHECK-ASAN-DEBUGRTL // CHECK-ASAN-DEBUGRTL: error: invalid argument // CHECK-ASAN-DEBUGRTL: not allowed with '-fsanitize=address' // CHECK-ASAN-DEBUGRTL: note: AddressSanitizer doesn't support linking with debug runtime libraries yet @@ -700,7 +700,7 @@ // NOSP-NOT: "-fsanitize=safe-stack" // RUN: %clang --target=x86_64-linux-gnu -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address,safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP-ASAN +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=address,safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP-ASAN // RUN: %clang --target=x86_64-linux-gnu -fstack-protector -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=SP // RUN: %clang --target=x86_64-linux-gnu -fsanitize=safe-stack -fstack-protector-all -### %s 2>&1 | FileCheck %s -check-prefix=SP // RUN: %clang --target=arm-linux-androideabi -fsanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NO-SP @@ -792,13 +792,13 @@ // FUNCTION-SOLARIS: "-fsanitize=function" -// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=dataflow %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-DFSAN-PS4 +// RUN: not %clang --target=x86_64-scei-ps4 -fsanitize=dataflow %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-DFSAN-PS4 // CHECK-DFSAN-PS4: unsupported option '-fsanitize=dataflow' for target 'x86_64-scei-ps4' -// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-PS4 +// RUN: not %clang --target=x86_64-scei-ps4 -fsanitize=leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-LSAN-PS4 // CHECK-LSAN-PS4: unsupported option '-fsanitize=leak' for target 'x86_64-scei-ps4' -// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-PS4 +// RUN: not %clang --target=x86_64-scei-ps4 -fsanitize=memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-MSAN-PS4 // CHECK-MSAN-PS4: unsupported option '-fsanitize=memory' for target 'x86_64-scei-ps4' -// RUN: %clang --target=x86_64-scei-ps4 -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-PS4 +// RUN: not %clang --target=x86_64-scei-ps4 -fsanitize=thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-PS4 // CHECK-TSAN-PS4: unsupported option '-fsanitize=thread' for target 'x86_64-scei-ps4' // RUN: %clang --target=x86_64-scei-ps4 -fsanitize=address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-PS4 // Make sure there are no *.{o,bc} or -l passed before the ASan library. @@ -834,10 +834,10 @@ // CHECK-TSAN-NOLIB-PS5-NOT: SceThreadSanitizer_nosubmission_stub_weak -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-MINIMAL +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-MINIMAL // CHECK-ASAN-MINIMAL: error: invalid argument '-fsanitize-minimal-runtime' not allowed with '-fsanitize=address' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=thread -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MINIMAL +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=thread -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-TSAN-MINIMAL // CHECK-TSAN-MINIMAL: error: invalid argument '-fsanitize-minimal-runtime' not allowed with '-fsanitize=thread' // RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-MINIMAL @@ -857,12 +857,12 @@ // RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined -fsanitize=function -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck /dev/null --implicit-check-not=error: -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined -fsanitize=vptr -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-VPTR-MINIMAL +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=undefined -fsanitize=vptr -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-VPTR-MINIMAL // CHECK-UBSAN-VPTR-MINIMAL: error: invalid argument '-fsanitize=vptr' not allowed with '-fsanitize-minimal-runtime' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-minimal-runtime -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-UBSAN-MINIMAL +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=address -fsanitize-minimal-runtime -fsanitize=undefined %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-ASAN-UBSAN-MINIMAL // CHECK-ASAN-UBSAN-MINIMAL: error: invalid argument '-fsanitize-minimal-runtime' not allowed with '-fsanitize=address' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-MINIMAL +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-MINIMAL // CHECK-HWASAN-MINIMAL: error: invalid argument '-fsanitize-minimal-runtime' not allowed with '-fsanitize=hwaddress' // RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi -flto -fvisibility=hidden -fsanitize-minimal-runtime -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-MINIMAL @@ -870,7 +870,7 @@ // CHECK-CFI-MINIMAL: "-fsanitize-trap=cfi-derived-cast,cfi-icall,cfi-mfcall,cfi-unrelated-cast,cfi-nvcall,cfi-vcall" // CHECK-CFI-MINIMAL: "-fsanitize-minimal-runtime" -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi -fno-sanitize-trap=cfi-icall -flto -fvisibility=hidden -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-MINIMAL +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=cfi -fno-sanitize-trap=cfi-icall -flto -fvisibility=hidden -fsanitize-minimal-runtime %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOTRAP-MINIMAL // CHECK-CFI-NOTRAP-MINIMAL: error: invalid argument 'fsanitize-minimal-runtime' only allowed with 'fsanitize-trap=cfi' // RUN: %clang --target=x86_64-linux-gnu -fsanitize=cfi -fno-sanitize-trap=cfi-icall -fno-sanitize=cfi-icall -flto -fvisibility=hidden -fsanitize-minimal-runtime -resource-dir=%S/Inputs/resource_dir %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-CFI-NOICALL-MINIMAL @@ -916,27 +916,27 @@ // CHECK-SCUDO-UBSAN-MINIMAL: "-fsanitize={{.*}}scudo" // CHECK-SCUDO-UBSAN-MINIMAL: "-fsanitize-minimal-runtime" -// RUN: %clang --target=powerpc-unknown-linux -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-SCUDO +// RUN: not %clang --target=powerpc-unknown-linux -fsanitize=scudo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-SCUDO // CHECK-NO-SCUDO: unsupported option -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo,address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-ASAN +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=scudo,address %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-ASAN // CHECK-SCUDO-ASAN: error: invalid argument '-fsanitize=scudo' not allowed with '-fsanitize=address' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo,leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-LSAN +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=scudo,leak %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-LSAN // CHECK-SCUDO-LSAN: error: invalid argument '-fsanitize=scudo' not allowed with '-fsanitize=leak' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo,memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-MSAN +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=scudo,memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-MSAN // CHECK-SCUDO-MSAN: error: invalid argument '-fsanitize=scudo' not allowed with '-fsanitize=memory' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo,thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-TSAN +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=scudo,thread %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-TSAN // CHECK-SCUDO-TSAN: error: invalid argument '-fsanitize=scudo' not allowed with '-fsanitize=thread' -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo,hwaddress %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-HWASAN +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=scudo,hwaddress %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-HWASAN // CHECK-SCUDO-HWASAN: error: invalid argument '-fsanitize=scudo' not allowed with '-fsanitize=hwaddress' // -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=scudo,kernel-memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-KMSAN +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=scudo,kernel-memory %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-SCUDO-KMSAN // CHECK-SCUDO-KMSAN: error: invalid argument '-fsanitize=kernel-memory' not allowed with '-fsanitize=scudo' // RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-INTERCEPTOR-ABI // RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-hwaddress-abi=interceptor %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-INTERCEPTOR-ABI // RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-hwaddress-abi=platform %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-PLATFORM-ABI -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-hwaddress-abi=foo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-FOO-ABI +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=hwaddress -fsanitize-hwaddress-abi=foo %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-HWASAN-FOO-ABI // CHECK-HWASAN-INTERCEPTOR-ABI: "-default-function-attr" "hwasan-abi=interceptor" // CHECK-HWASAN-PLATFORM-ABI: "-default-function-attr" "hwasan-abi=platform" // CHECK-HWASAN-FOO-ABI: error: invalid value 'foo' in '-fsanitize-hwaddress-abi=foo' @@ -945,8 +945,8 @@ // CHECK-HWASAN-ALIAS: "-mllvm" "-hwasan-experimental-use-page-aliases=1" // RUN: %clang --target=x86_64-linux-gnu -fsanitize=address,pointer-compare,pointer-subtract %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POINTER-ALL -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=pointer-compare %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POINTER-CMP-NEEDS-ADDRESS -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=pointer-subtract %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POINTER-SUB-NEEDS-ADDRESS +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=pointer-compare %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POINTER-CMP-NEEDS-ADDRESS +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=pointer-subtract %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-POINTER-SUB-NEEDS-ADDRESS // RUN: %clang --target=x86_64-linux-gnu -fsanitize=pointer-subtract -fno-sanitize=pointer-subtract %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-POINTER-SUB // RUN: %clang --target=x86_64-linux-gnu -fsanitize=pointer-compare -fno-sanitize=pointer-compare %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-POINTER-CMP // CHECK-POINTER-ALL: -cc1{{.*}}-fsanitize={{[^"]*}}pointer-compare,pointer-subtract{{.*}}" {{.*}} "-mllvm" "-asan-detect-invalid-pointer-cmp" {{.*}}"-mllvm" "-asan-detect-invalid-pointer-sub" @@ -969,5 +969,5 @@ // RUN: %clang -fsanitize=undefined,float-divide-by-zero %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-DIVBYZERO-UBSAN // CHECK-DIVBYZERO-UBSAN: "-fsanitize={{.*}},float-divide-by-zero,{{.*}}" -// RUN: %clang --target=x86_64-linux-gnu -fsanitize=undefined,function -mcmodel=large %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-FUNCTION-CODE-MODEL +// RUN: not %clang --target=x86_64-linux-gnu -fsanitize=undefined,function -mcmodel=large %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-UBSAN-FUNCTION-CODE-MODEL // CHECK-UBSAN-FUNCTION-CODE-MODEL: error: invalid argument '-fsanitize=function' only allowed with '-mcmodel=small' diff --git a/clang/test/Driver/fuchsia.c b/clang/test/Driver/fuchsia.c --- a/clang/test/Driver/fuchsia.c +++ b/clang/test/Driver/fuchsia.c @@ -71,7 +71,7 @@ // CHECK-FP-NONLEAF: "-mframe-pointer=non-leaf" // CHECK-FP-NONE: "-mframe-pointer=none" -// RUN: %clang -### %s --target=x86_64-unknown-fuchsia -rtlib=libgcc 2>&1 \ +// RUN: not %clang -### %s --target=x86_64-unknown-fuchsia -rtlib=libgcc 2>&1 \ // RUN: | FileCheck %s -check-prefix=CHECK-RTLIB // CHECK-RTLIB: error: invalid runtime library name in argument '-rtlib=libgcc' diff --git a/clang/test/Driver/fuchsia.cpp b/clang/test/Driver/fuchsia.cpp --- a/clang/test/Driver/fuchsia.cpp +++ b/clang/test/Driver/fuchsia.cpp @@ -61,7 +61,7 @@ // CHECK-NOT: crtend.o // CHECK-NOT: crtn.o -// RUN: %clangxx -### %s --target=x86_64-unknown-fuchsia -stdlib=libstdc++ 2>&1 \ +// RUN: not %clangxx -### %s --target=x86_64-unknown-fuchsia -stdlib=libstdc++ 2>&1 \ // RUN: | FileCheck %s -check-prefix=CHECK-STDLIB // CHECK-STDLIB: error: invalid library name in argument '-stdlib=libstdc++' diff --git a/clang/test/Driver/function-alignment.c b/clang/test/Driver/function-alignment.c --- a/clang/test/Driver/function-alignment.c +++ b/clang/test/Driver/function-alignment.c @@ -4,8 +4,8 @@ // RUN: %clang -### -falign-functions=2 %s 2>&1 | FileCheck %s -check-prefix CHECK-2 // RUN: %clang -### -falign-functions=3 %s 2>&1 | FileCheck %s -check-prefix CHECK-3 // RUN: %clang -### -falign-functions=4 %s 2>&1 | FileCheck %s -check-prefix CHECK-4 -// RUN: %clang -### -falign-functions=65537 %s 2>&1 | FileCheck %s -check-prefix CHECK-ERR-65537 -// RUN: %clang -### -falign-functions=a %s 2>&1 | FileCheck %s -check-prefix CHECK-ERR-A +// RUN: not %clang -### -falign-functions=65537 %s 2>&1 | FileCheck %s -check-prefix CHECK-ERR-65537 +// RUN: not %clang -### -falign-functions=a %s 2>&1 | FileCheck %s -check-prefix CHECK-ERR-A // CHECK-0-NOT: "-function-alignment" // CHECK-1-NOT: "-function-alignment" diff --git a/clang/test/Driver/fuse-ld.c b/clang/test/Driver/fuse-ld.c --- a/clang/test/Driver/fuse-ld.c +++ b/clang/test/Driver/fuse-ld.c @@ -33,7 +33,7 @@ // RUN: | FileCheck %s -check-prefix=CHECK-FREEBSD-GOLD // CHECK-FREEBSD-GOLD: Inputs/basic_freebsd_tree/usr/bin{{/|\\+}}ld.gold -// RUN: %clang %s -### -fuse-ld=plib \ +// RUN: not %clang %s -### -fuse-ld=plib \ // RUN: --sysroot=%S/Inputs/basic_freebsd_tree \ // RUN: -target x86_64-unknown-freebsd \ // RUN: -B%S/Inputs/basic_freebsd_tree/usr/bin 2>&1 \ diff --git a/clang/test/Driver/gcc-install-dir.cpp b/clang/test/Driver/gcc-install-dir.cpp --- a/clang/test/Driver/gcc-install-dir.cpp +++ b/clang/test/Driver/gcc-install-dir.cpp @@ -37,7 +37,7 @@ // DEBIAN_X86_64_M32-SAME: {{^}}[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/10/32" // DEBIAN_X86_64_M32-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/gcc/x86_64-linux-gnu/10/../../../../lib32" -// RUN: %clangxx %s -### --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/debian_multiarch_tree \ +// RUN: not %clangxx %s -### --target=x86_64-unknown-linux-gnu --sysroot=%S/Inputs/debian_multiarch_tree \ // RUN: -ccc-install-dir %S/Inputs/basic_linux_tree/usr/bin -resource-dir=%S/Inputs/resource_dir --stdlib=platform --rtlib=platform \ // RUN: --gcc-install-dir=%S/Inputs/debian_multiarch_tree/usr/lib/gcc/x86_64-linux-gnu 2>&1 | FileCheck %s --check-prefix=INVALID // INVALID: error: '{{.*}}/usr/lib/gcc/x86_64-linux-gnu' does not contain a GCC installation diff --git a/clang/test/Driver/hip-autolink.hip b/clang/test/Driver/hip-autolink.hip --- a/clang/test/Driver/hip-autolink.hip +++ b/clang/test/Driver/hip-autolink.hip @@ -1,9 +1,9 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target // -// RUN: %clang --target=i386-pc-windows-msvc --cuda-gpu-arch=gfx906 -nogpulib \ +// RUN: not %clang --target=i386-pc-windows-msvc --cuda-gpu-arch=gfx906 -nogpulib \ // RUN: --cuda-device-only %s -### 2>&1 | FileCheck --check-prefix=DEV %s -// RUN: %clang --target=i386-pc-windows-msvc --cuda-gpu-arch=gfx906 -nogpulib \ +// RUN: not %clang --target=i386-pc-windows-msvc --cuda-gpu-arch=gfx906 -nogpulib \ // RUN: --cuda-host-only %s -### 2>&1 | FileCheck --check-prefix=HOST %s // DEV: "-cc1" "-triple" "amdgcn-amd-amdhsa" diff --git a/clang/test/Driver/hip-binding.hip b/clang/test/Driver/hip-binding.hip --- a/clang/test/Driver/hip-binding.hip +++ b/clang/test/Driver/hip-binding.hip @@ -64,7 +64,7 @@ // MULTI-D-ONLY-NEXT: # "amdgcn-amd-amdhsa" - "clang", inputs: ["[[INPUT]]"], output: "[[GFX90a:.+]]" // MULTI-D-ONLY-NEXT: # "amdgcn-amd-amdhsa" - "AMDGCN::Linker", inputs: ["[[GFX90a]]"], output: "[[GFX90a_OUT:.+]]" // -// RUN: %clang -### --target=x86_64-linux-gnu --offload-new-driver -ccc-print-bindings \ +// RUN: not %clang -### --target=x86_64-linux-gnu --offload-new-driver -ccc-print-bindings \ // RUN: --offload-arch=gfx90a --offload-arch=gfx908 --offload-device-only -c -o %t %s 2>&1 \ // RUN: | FileCheck -check-prefix=MULTI-D-ONLY-O %s // MULTI-D-ONLY-O: error: cannot specify -o when generating multiple output files diff --git a/clang/test/Driver/hip-code-object-version.hip b/clang/test/Driver/hip-code-object-version.hip --- a/clang/test/Driver/hip-code-object-version.hip +++ b/clang/test/Driver/hip-code-object-version.hip @@ -2,7 +2,7 @@ // Check bundle ID for code object v2. -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=2 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefix=V2 %s @@ -12,12 +12,12 @@ // Check bundle ID for code object v3. -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=3 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefix=V3 %s -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=4 -mcode-object-version=3 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefix=V3 %s @@ -28,7 +28,7 @@ // Check bundle ID for code object version 4. -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=4 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefix=V4 %s @@ -39,7 +39,7 @@ // Check bundle ID for code object version 5. -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=5 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefix=V5 %s @@ -50,7 +50,7 @@ // Check bundle ID for code object version default -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefix=VD %s @@ -58,7 +58,7 @@ // Check invalid code object version option. -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=1 \ // RUN: --offload-arch=gfx906 -nogpulib \ // RUN: %s 2>&1 | FileCheck -check-prefix=INVALID %s @@ -69,7 +69,7 @@ // is passed to -cc1 and -cc1as, and -mcode-object-version is passed // to -cc1 but not -cc1as. -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=5 \ // RUN: --offload-arch=gfx906 -nogpulib -save-temps \ // RUN: %s 2>&1 | FileCheck -check-prefix=CC1 %s @@ -77,7 +77,7 @@ // CC1: "-cc1" {{.*}}"-mcode-object-version=5" {{.*}}"-mllvm" "--amdhsa-code-object-version=5" // CC1: "-cc1as" {{.*}}"-mllvm" "--amdhsa-code-object-version=5" -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -mcode-object-version=5 \ // RUN: --offload-arch=gfx906 -nogpulib -save-temps \ // RUN: %s 2>&1 | FileCheck -check-prefix=CC1NEG %s diff --git a/clang/test/Driver/hip-cuid-hash.hip b/clang/test/Driver/hip-cuid-hash.hip --- a/clang/test/Driver/hip-cuid-hash.hip +++ b/clang/test/Driver/hip-cuid-hash.hip @@ -4,11 +4,11 @@ // Check CUID generated by hash. // The same CUID is generated for the same file with the same options. -// RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu \ +// RUN: not %clang -### -x hip --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx906 -c -nogpulib -fuse-cuid=hash \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu >%t.out 2>&1 -// RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu \ +// RUN: not %clang -### -x hip --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx906 -c -nogpulib -fuse-cuid=hash \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu >>%t.out 2>&1 @@ -17,11 +17,11 @@ // Check CUID generated by hash. // Different CUID's are generated for the same file with different options. -// RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu -DX=1 \ +// RUN: not %clang -### -x hip --target=x86_64-unknown-linux-gnu -DX=1 \ // RUN: --offload-arch=gfx906 -c -nogpulib -fuse-cuid=hash \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu >%t.out 2>&1 -// RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu -DX=2 \ +// RUN: not %clang -### -x hip --target=x86_64-unknown-linux-gnu -DX=2 \ // RUN: --offload-arch=gfx906 -c -nogpulib -fuse-cuid=hash \ // RUN: %S/Inputs/../Inputs/hip_multiple_inputs/a.cu >>%t.out 2>&1 diff --git a/clang/test/Driver/hip-cuid.hip b/clang/test/Driver/hip-cuid.hip --- a/clang/test/Driver/hip-cuid.hip +++ b/clang/test/Driver/hip-cuid.hip @@ -14,7 +14,7 @@ // Check random CUID generator. -// RUN: %clang -### -x hip \ +// RUN: not %clang -### -x hip \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx900 \ // RUN: --offload-arch=gfx906 \ @@ -25,7 +25,7 @@ // Check fixed CUID. -// RUN: %clang -### -x hip \ +// RUN: not %clang -### -x hip \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx900 \ // RUN: --offload-arch=gfx906 \ @@ -36,7 +36,7 @@ // Check fixed CUID override -fuse-cuid. -// RUN: %clang -### -x hip \ +// RUN: not %clang -### -x hip \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx900 \ // RUN: --offload-arch=gfx906 \ @@ -47,7 +47,7 @@ // Check hash CUID generator. -// RUN: %clang -### -x hip \ +// RUN: not %clang -### -x hip \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --offload-arch=gfx900 \ // RUN: --offload-arch=gfx906 \ diff --git a/clang/test/Driver/hip-default-gpu-arch.hip b/clang/test/Driver/hip-default-gpu-arch.hip --- a/clang/test/Driver/hip-default-gpu-arch.hip +++ b/clang/test/Driver/hip-default-gpu-arch.hip @@ -1,6 +1,6 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -c %s 2>&1 | FileCheck %s +// RUN: not %clang -### -c %s 2>&1 | FileCheck %s // CHECK: {{.*}}clang{{.*}}"-target-cpu" "gfx906" diff --git a/clang/test/Driver/hip-dependent-options.hip b/clang/test/Driver/hip-dependent-options.hip --- a/clang/test/Driver/hip-dependent-options.hip +++ b/clang/test/Driver/hip-dependent-options.hip @@ -1,4 +1,4 @@ -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -c -fhip-emit-relocatable -nogpuinc -nogpulib --cuda-device-only -fgpu-rdc \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu \ @@ -7,7 +7,7 @@ // RELOCRDC: error: option '-fhip-emit-relocatable' cannot be specified with '-fgpu-rdc' -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -c -fhip-emit-relocatable -nogpuinc -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu \ diff --git a/clang/test/Driver/hip-device-compile.hip b/clang/test/Driver/hip-device-compile.hip --- a/clang/test/Driver/hip-device-compile.hip +++ b/clang/test/Driver/hip-device-compile.hip @@ -6,7 +6,7 @@ // is specified. // Output unbundled bitcode. -// RUN: %clang -c -emit-llvm --cuda-device-only -### --target=x86_64-linux-gnu \ +// RUN: not %clang -c -emit-llvm --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.bc -x hip --cuda-gpu-arch=gfx900 --no-gpu-bundle-output \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -14,7 +14,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=CHECK,BC,NBUN %s // Output bundled bitcode. -// RUN: %clang -c -emit-llvm --cuda-device-only -### --target=x86_64-linux-gnu \ +// RUN: not %clang -c -emit-llvm --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.bc -x hip --cuda-gpu-arch=gfx900 --no-gpu-bundle-output \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -22,7 +22,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=CHECK,BCBUN %s // Output unbundled LLVM IR. -// RUN: %clang -c -S -emit-llvm --cuda-device-only -### --target=x86_64-linux-gnu \ +// RUN: not %clang -c -S -emit-llvm --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.ll -x hip --cuda-gpu-arch=gfx900 --no-gpu-bundle-output \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -30,7 +30,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=CHECK,LL,NBUN %s // Output bundled LLVM IR. -// RUN: %clang -c -S -emit-llvm --cuda-device-only -### --target=x86_64-linux-gnu \ +// RUN: not %clang -c -S -emit-llvm --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.ll -x hip --cuda-gpu-arch=gfx900 --no-gpu-bundle-output \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -38,7 +38,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=CHECK,LLBUN %s // Output unbundled assembly. -// RUN: %clang -c -S --cuda-device-only -### --target=x86_64-linux-gnu \ +// RUN: not %clang -c -S --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.s -x hip --cuda-gpu-arch=gfx900 --no-gpu-bundle-output \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -46,7 +46,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=CHECK,ASM,NBUN %s // Output relocatable. -// RUN: %clang -c --cuda-device-only -### --target=x86_64-linux-gnu \ +// RUN: not %clang -c --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.o -x hip --cuda-gpu-arch=gfx900 -fhip-emit-relocatable \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -54,7 +54,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=CHECK,NBUN,RELOC %s // Output bundled assembly. -// RUN: %clang -c -S --cuda-device-only -### --target=x86_64-linux-gnu \ +// RUN: not %clang -c -S --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.s -x hip --cuda-gpu-arch=gfx900 --no-gpu-bundle-output \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -94,7 +94,7 @@ // specified. // Output bundled code objects. -// RUN: %clang -c --cuda-device-only -### --target=x86_64-linux-gnu \ +// RUN: not %clang -c --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.o -x hip --cuda-gpu-arch=gfx900 \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -102,7 +102,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=OBJ,OBJ-BUN %s // Output unbundled code objects. -// RUN: %clang -c --cuda-device-only -### --target=x86_64-linux-gnu \ +// RUN: not %clang -c --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.o -x hip --cuda-gpu-arch=gfx900 \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -110,7 +110,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=OBJ,OBJ-UBUN %s // Output bundled code objects. -// RUN: %clang --cuda-device-only -### --target=x86_64-linux-gnu \ +// RUN: not %clang --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.o -x hip --cuda-gpu-arch=gfx900 \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ @@ -118,7 +118,7 @@ // RUN: 2>&1 | FileCheck -check-prefixes=OBJ,OBJ-BUN %s // Output unbundled code objects. -// RUN: %clang --cuda-device-only -### --target=x86_64-linux-gnu \ +// RUN: not %clang --cuda-device-only -### --target=x86_64-linux-gnu \ // RUN: -o a.o -x hip --cuda-gpu-arch=gfx900 \ // RUN: --hip-device-lib=lib1.bc \ // RUN: --hip-device-lib-path=%S/Inputs/hip_multiple_inputs/lib1 \ diff --git a/clang/test/Driver/hip-device-libs.hip b/clang/test/Driver/hip-device-libs.hip --- a/clang/test/Driver/hip-device-libs.hip +++ b/clang/test/Driver/hip-device-libs.hip @@ -194,7 +194,7 @@ // RUN: 2>&1 | FileCheck %s --check-prefixes=ABI5 // Test -mcode-object-version=5 with old device library without abi_version_400.bc -// RUN: %clang -### --target=x86_64-linux-gnu --offload-arch=gfx900 \ +// RUN: not %clang -### --target=x86_64-linux-gnu --offload-arch=gfx900 \ // RUN: -mcode-object-version=5 \ // RUN: --hip-device-lib-path=%S/Inputs/rocm/amdgcn/bitcode-no-abi-ver \ // RUN: --rocm-path=%S/Inputs/rocm %S/Inputs/hip_multiple_inputs/b.hip \ diff --git a/clang/test/Driver/hip-host-cpu-features.hip b/clang/test/Driver/hip-host-cpu-features.hip --- a/clang/test/Driver/hip-host-cpu-features.hip +++ b/clang/test/Driver/hip-host-cpu-features.hip @@ -1,9 +1,9 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -c --target=x86_64-linux-gnu -march=znver2 --cuda-gpu-arch=gfx803 -nogpulib %s 2>&1 | FileCheck %s -check-prefix=HOSTCPU -// RUN: %clang -### -c --target=x86_64-linux-gnu -msse3 --cuda-gpu-arch=gfx803 -nogpulib %s 2>&1 | FileCheck %s -check-prefix=HOSTSSE3 -// RUN: %clang -### -c --target=x86_64-linux-gnu --gpu-use-aux-triple-only -march=znver2 --cuda-gpu-arch=gfx803 -nogpulib %s 2>&1 | FileCheck %s -check-prefix=NOHOSTCPU +// RUN: not %clang -### -c --target=x86_64-linux-gnu -march=znver2 --cuda-gpu-arch=gfx803 -nogpulib %s 2>&1 | FileCheck %s -check-prefix=HOSTCPU +// RUN: not %clang -### -c --target=x86_64-linux-gnu -msse3 --cuda-gpu-arch=gfx803 -nogpulib %s 2>&1 | FileCheck %s -check-prefix=HOSTSSE3 +// RUN: not %clang -### -c --target=x86_64-linux-gnu --gpu-use-aux-triple-only -march=znver2 --cuda-gpu-arch=gfx803 -nogpulib %s 2>&1 | FileCheck %s -check-prefix=NOHOSTCPU // HOSTCPU: "-cc1" "-triple" "amdgcn-amd-amdhsa" // HOSTCPU-SAME: "-aux-triple" "x86_64-unknown-linux-gnu" diff --git a/clang/test/Driver/hip-launch-api.hip b/clang/test/Driver/hip-launch-api.hip --- a/clang/test/Driver/hip-launch-api.hip +++ b/clang/test/Driver/hip-launch-api.hip @@ -3,14 +3,14 @@ // By default FE assumes -fhip-new-launch-api. -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=NEW %s // NEW: "-fhip-new-launch-api" -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ // RUN: -fhip-new-launch-api 2>&1 | FileCheck -check-prefixes=NEW %s // NEW: "-fhip-new-launch-api" -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ // RUN: -fno-hip-new-launch-api 2>&1 | FileCheck -check-prefixes=OLD %s // OLD-NOT: "-fhip-new-launch-api" diff --git a/clang/test/Driver/hip-link-bc-to-bc.hip b/clang/test/Driver/hip-link-bc-to-bc.hip --- a/clang/test/Driver/hip-link-bc-to-bc.hip +++ b/clang/test/Driver/hip-link-bc-to-bc.hip @@ -5,7 +5,7 @@ // RUN: touch %t/bundle1.bc // RUN: touch %t/bundle2.bc -// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx906 --hip-link \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx906 --hip-link \ // RUN: -emit-llvm -fgpu-rdc --cuda-device-only \ // RUN: %t/bundle1.bc %t/bundle2.bc \ // RUN: 2>&1 | FileCheck -check-prefix=BITCODE %s @@ -22,7 +22,7 @@ // RUN: llvm-ar rc %t/libhipbundle.a // RUN: touch %t/bundle.bc -// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx906 --hip-link \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx906 --hip-link \ // RUN: -emit-llvm -fgpu-rdc --cuda-device-only \ // RUN: %t/bundle.bc -L%t -lhipbundle \ // RUN: 2>&1 | FileCheck -check-prefix=ARCHIVE %s diff --git a/clang/test/Driver/hip-link-bundle-archive.hip b/clang/test/Driver/hip-link-bundle-archive.hip --- a/clang/test/Driver/hip-link-bundle-archive.hip +++ b/clang/test/Driver/hip-link-bundle-archive.hip @@ -7,26 +7,26 @@ // RUN: rm -rf %t && mkdir %t // RUN: touch %t/dummy.bc -// RUN: mkdir hipBundled +// RUN: mkdir -p hipBundled // RUN: llvm-ar cr %t/libhipBundled.a %t/dummy.bc -// RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ +// RUN: not %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: -nogpulib %s -fgpu-rdc -L%t -lhipBundled \ // RUN: 2>&1 | FileCheck -check-prefixes=GNU,GNU1,GNU-L %s // RUN: rm -rf hipBundled -// RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ +// RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 -nogpuinc \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: -nogpulib %s -fgpu-rdc -L%t -l:libhipBundled.a \ // RUN: 2>&1 | FileCheck -check-prefixes=GNU,GNU1,GNU-LA %s -// RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ +// RUN: not %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: -nogpulib %s -fgpu-rdc %t/libhipBundled.a \ // RUN: 2>&1 | FileCheck -check-prefixes=GNU,GNU1,GNU-A %s // RUN: llvm-ar cr %t/libhipBundled.a.5.2 %t/dummy.bc -// RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ +// RUN: not %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: -nogpulib %s -fgpu-rdc %t/libhipBundled.a.5.2 \ // RUN: 2>&1 | FileCheck -check-prefixes=GNU,GNU2,GNU-A %s @@ -34,22 +34,22 @@ // Check if a file is not an archive, it is not unbundled. // RUN: touch %t/libNonArchive.a -// RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ +// RUN: not %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: -nogpulib %s -fgpu-rdc -L%t -lNonArchive \ // RUN: 2>&1 | FileCheck -check-prefixes=NONARCHIVE %s -// RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ +// RUN: not %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: -nogpulib %s -fgpu-rdc -L%t -l:libNonArchive.a \ // RUN: 2>&1 | FileCheck -check-prefixes=NONARCHIVE %s -// RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ +// RUN: not %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: -nogpulib %s -fgpu-rdc -L%t libNonArchive.a \ // RUN: 2>&1 | FileCheck -check-prefixes=NONARCHIVE %s // Check if a file does not exist, it is not unbundled. -// RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ +// RUN: not %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: -nogpulib %s -fgpu-rdc %t/NoneExist.a \ // RUN: 2>&1 | FileCheck -check-prefixes=NONE %s @@ -57,17 +57,17 @@ // Check unbundling archive for MSVC. // RUN: llvm-ar cr %t/hipBundled2.lib %t/dummy.bc -// RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ +// RUN: not %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ // RUN: --target=x86_64-pc-windows-msvc \ // RUN: -nogpulib %s -fgpu-rdc -L%t -lhipBundled2 \ // RUN: 2>&1 | FileCheck -check-prefix=MSVC %s -// RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ +// RUN: not %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ // RUN: --target=x86_64-pc-windows-msvc \ // RUN: -nogpulib %s -fgpu-rdc -L%t -l:hipBundled2.lib \ // RUN: 2>&1 | FileCheck -check-prefix=MSVC %s -// RUN: %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ +// RUN: not %clang -### --offload-arch=gfx906 --offload-arch=gfx1030 \ // RUN: --target=x86_64-pc-windows-msvc \ // RUN: -nogpulib %s -fgpu-rdc %t/hipBundled2.lib \ // RUN: 2>&1 | FileCheck -check-prefix=MSVC %s diff --git a/clang/test/Driver/hip-no-device-libs.hip b/clang/test/Driver/hip-no-device-libs.hip --- a/clang/test/Driver/hip-no-device-libs.hip +++ b/clang/test/Driver/hip-no-device-libs.hip @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -nogpulib --target=x86_64-linux-gnu \ +// RUN: not %clang -### -nogpulib --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck %s diff --git a/clang/test/Driver/hip-options.hip b/clang/test/Driver/hip-options.hip --- a/clang/test/Driver/hip-options.hip +++ b/clang/test/Driver/hip-options.hip @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -x hip --gpu-max-threads-per-block=1024 %s 2>&1 | FileCheck %s +// RUN: not %clang -### -x hip --gpu-max-threads-per-block=1024 %s 2>&1 | FileCheck %s // Check that there are commands for both host- and device-side compilations. // @@ -22,7 +22,7 @@ // PTH: "-cc1"{{.*}} "-fgpu-default-stream=per-thread" {{.*}}"-x" "hip-cpp-output" // Check -mprintf-kind=hostcall -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -mprintf-kind=hostcall %s -save-temps 2>&1 | FileCheck -check-prefix=HOSTC %s +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -mprintf-kind=hostcall %s -save-temps 2>&1 | FileCheck -check-prefix=HOSTC %s // HOSTC: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}}"-mprintf-kind=hostcall" "-Werror=format-invalid-specifier"{{.*}}"-E" {{.*}} // HOSTC: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}} "-mprintf-kind=hostcall" "-Werror=format-invalid-specifier" {{.*}}"-x" "hip-cpp-output" // HOSTC: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}} "-mprintf-kind=hostcall" "-Werror=format-invalid-specifier" {{.*}}"-x" "ir" @@ -30,26 +30,26 @@ // HOSTC: "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}}"-x" "ir" // Check -mprintf-kind=buffered -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -mprintf-kind=buffered %s -save-temps 2>&1 | FileCheck -check-prefix=BUFF %s +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -mprintf-kind=buffered %s -save-temps 2>&1 | FileCheck -check-prefix=BUFF %s // BUFF: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}}"-mprintf-kind=buffered" "-Werror=format-invalid-specifier"{{.*}}"-E" {{.*}} // BUFF: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}} "-mprintf-kind=buffered" "-Werror=format-invalid-specifier" {{.*}}"-x" "hip-cpp-output" // BUFF: "-cc1" "-triple" "amdgcn-amd-amdhsa"{{.*}} "-mprintf-kind=buffered" "-Werror=format-invalid-specifier" {{.*}}"-x" "ir" // BUFF: "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}} "-E" {{.*}} // BUFF: "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}}"-x" "ir" -// RUN: %clang -### -x hip --target=x86_64-pc-windows-msvc -fms-extensions \ +// RUN: not %clang -### -x hip --target=x86_64-pc-windows-msvc -fms-extensions \ // RUN: -mllvm -amdgpu-early-inline-all=true %s 2>&1 | \ // RUN: FileCheck -check-prefix=MLLVM %s // MLLVM-NOT: "-mllvm"{{.*}}"-amdgpu-early-inline-all=true"{{.*}}"-mllvm"{{.*}}"-amdgpu-early-inline-all=true" -// RUN: %clang -### -Xarch_device -g -nogpulib --cuda-gpu-arch=gfx900 \ +// RUN: not %clang -### -Xarch_device -g -nogpulib --cuda-gpu-arch=gfx900 \ // RUN: -Xarch_device -fcf-protection=branch -Xarch_device -mllvm=--inline-threshold=100 \ // RUN: --cuda-gpu-arch=gfx906 %s 2>&1 | FileCheck -check-prefix=DEV %s // DEV: "-cc1"{{.*}} "-fcuda-is-device" {{.*}} "-debug-info-kind={{.*}}" {{.*}} "-fcf-protection=branch" {{.*}}"-mllvm" "--inline-threshold=100" // DEV: "-cc1"{{.*}} "-fcuda-is-device" {{.*}} "-debug-info-kind={{.*}}" {{.*}} "-fcf-protection=branch" {{.*}}"-mllvm" "--inline-threshold=100" // DEV-NOT: clang{{.*}} {{.*}} "-debug-info-kind={{.*}}" -// RUN: %clang -### -Xarch_host -g -nogpulib --cuda-gpu-arch=gfx900 \ +// RUN: not %clang -### -Xarch_host -g -nogpulib --cuda-gpu-arch=gfx900 \ // RUN: --cuda-gpu-arch=gfx906 %s 2>&1 | FileCheck -check-prefix=HOST %s // HOST-NOT: "-fcuda-is-device" {{.*}} "-debug-info-kind={{.*}}" // HOST-NOT: "-fcuda-is-device" {{.*}} "-debug-info-kind={{.*}}" diff --git a/clang/test/Driver/hip-output-file-name.hip b/clang/test/Driver/hip-output-file-name.hip --- a/clang/test/Driver/hip-output-file-name.hip +++ b/clang/test/Driver/hip-output-file-name.hip @@ -2,7 +2,7 @@ // REQUIRES: amdgpu-registered-target // Output bundled code objects for combined compilation. -// RUN: %clang -### -c --target=x86_64-linux-gnu -fgpu-rdc \ +// RUN: not %clang -### -c --target=x86_64-linux-gnu -fgpu-rdc \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck %s @@ -13,42 +13,42 @@ // is used to bundle the final output. // Output bundled PPE for one GPU for mixed compliation. -// RUN: %clang -### -E --target=x86_64-linux-gnu \ +// RUN: not %clang -### -E --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=DASH %s // Output unbundled PPE for one GPU for device only compilation. -// RUN: %clang -### -E --cuda-device-only --target=x86_64-linux-gnu \ +// RUN: not %clang -### -E --cuda-device-only --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s // Output bundled PPE for two GPUs for mixed compilation. -// RUN: %clang -### -E --target=x86_64-linux-gnu \ +// RUN: not %clang -### -E --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=DASH %s // Output bundled PPE for two GPUs for mixed compilation with -save-temps. -// RUN: %clang -### -E -save-temps --target=x86_64-linux-gnu \ +// RUN: not %clang -### -E -save-temps --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=DASH %s // Output unbundled PPE for two GPUs for device only compilation. -// RUN: %clang -### -E --cuda-device-only --target=x86_64-linux-gnu \ +// RUN: not %clang -### -E --cuda-device-only --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s // Output bundled PPE for two GPUs for device only compilation with --gpu-bundle-output. -// RUN: %clang -### -E --cuda-device-only --target=x86_64-linux-gnu \ +// RUN: not %clang -### -E --cuda-device-only --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s --gpu-bundle-output \ // RUN: 2>&1 | FileCheck -check-prefixes=DASH %s // Output unbundled PPE for two GPUs for device only compilation with --no-gpu-bundle-output. -// RUN: %clang -### -E --cuda-device-only --target=x86_64-linux-gnu \ +// RUN: not %clang -### -E --cuda-device-only --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s --no-gpu-bundle-output \ // RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s // Output unbundled PPE for host only compilation. -// RUN: %clang -### -E --cuda-host-only --target=x86_64-linux-gnu \ +// RUN: not %clang -### -E --cuda-host-only --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=CLANG-DASH %s @@ -60,22 +60,22 @@ // Check -E with -o. // Output bundled PPE for two GPUs for mixed compilation. -// RUN: %clang -### -E -o test.cui --target=x86_64-linux-gnu \ +// RUN: not %clang -### -E -o test.cui --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=OUT %s // Output bundled PPE for two GPUs for mixed compilation. -// RUN: %clang -### -E -o test.cui -save-temps --target=x86_64-linux-gnu \ +// RUN: not %clang -### -E -o test.cui -save-temps --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=OUT %s // Output bundled PPE for two GPUs for device only compilation with --gpu-bundle-output. -// RUN: %clang -### -E -o test.cui --cuda-device-only --target=x86_64-linux-gnu \ +// RUN: not %clang -### -E -o test.cui --cuda-device-only --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 --gpu-bundle-output %s \ // RUN: 2>&1 | FileCheck -check-prefixes=OUT %s // Output unbundled PPE for two GPUs for device only compilation. -// RUN: %clang -### -E -o test.cui --cuda-host-only --target=x86_64-linux-gnu \ +// RUN: not %clang -### -E -o test.cui --cuda-host-only --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=CLANG-OUT %s diff --git a/clang/test/Driver/hip-printf.hip b/clang/test/Driver/hip-printf.hip --- a/clang/test/Driver/hip-printf.hip +++ b/clang/test/Driver/hip-printf.hip @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### --target=x86_64-linux-gnu --cuda-gpu-arch=gfx900 \ +// RUN: not %clang -### --target=x86_64-linux-gnu --cuda-gpu-arch=gfx900 \ // RUN: %s 2>&1 | FileCheck %s // CHECK: [[CLANG:".*clang.*"]] "-cc1" diff --git a/clang/test/Driver/hip-rdc-device-only.hip b/clang/test/Driver/hip-rdc-device-only.hip --- a/clang/test/Driver/hip-rdc-device-only.hip +++ b/clang/test/Driver/hip-rdc-device-only.hip @@ -58,7 +58,7 @@ // Check output one file without bundling cause error. -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -S -nogpuinc -nogpulib --cuda-device-only -fgpu-rdc \ // RUN: %S/Inputs/hip_multiple_inputs/a.cu -o %t.s --no-gpu-bundle-output \ diff --git a/clang/test/Driver/hip-sanitize-options.hip b/clang/test/Driver/hip-sanitize-options.hip --- a/clang/test/Driver/hip-sanitize-options.hip +++ b/clang/test/Driver/hip-sanitize-options.hip @@ -20,17 +20,17 @@ // RUN: -nogpuinc --rocm-path=%S/Inputs/rocm \ // RUN: %s 2>&1 | FileCheck -check-prefixes=RDC %s -// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack+ \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack+ \ // RUN: -fsanitize=address -fgpu-sanitize \ // RUN: -nogpuinc --rocm-path=%S/Inputs/rocm-invalid \ // RUN: %s 2>&1 | FileCheck -check-prefixes=FAIL %s -// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ // RUN: --offload-arch=gfx900:xnack+ --offload-arch=gfx906 -fsanitize=address -fgpu-sanitize \ // RUN: -fsanitize=leak -nogpuinc --rocm-path=%S/Inputs/rocm \ // RUN: %s 2>&1 | FileCheck -check-prefixes=XNACK %s -// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ // RUN: --offload-arch=gfx900:xnack+ --offload-arch=gfx906 -fsanitize=address -fgpu-sanitize \ // RUN: -fsanitize=leak -nogpuinc --rocm-path=%S/Inputs/rocm \ // RUN: %s 2>&1 | FileCheck -check-prefixes=XNACKNEG %s @@ -39,12 +39,12 @@ // Sanitizer should be disabled for all GPU's and there should be no warnings about unsupported // GPU. -// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ // RUN: --offload-arch=gfx900:xnack+ --offload-arch=gfx906 -fsanitize=address -fno-gpu-sanitize \ // RUN: -fsanitize=leak -nogpuinc --rocm-path=%S/Inputs/rocm \ // RUN: %s 2>&1 | FileCheck -check-prefixes=NOGPU %s -// RUN: %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu --offload-arch=gfx900:xnack- \ // RUN: --offload-arch=gfx900:xnack+ --offload-arch=gfx906 -fsanitize=address -fno-gpu-sanitize \ // RUN: -fsanitize=leak -nogpuinc --rocm-path=%S/Inputs/rocm \ // RUN: %s 2>&1 | FileCheck -check-prefixes=NOGPUNEG %s diff --git a/clang/test/Driver/hip-save-temps.hip b/clang/test/Driver/hip-save-temps.hip --- a/clang/test/Driver/hip-save-temps.hip +++ b/clang/test/Driver/hip-save-temps.hip @@ -2,27 +2,27 @@ // REQUIRES: amdgpu-registered-target // -fno-gpu-rdc without -o with -c -// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ +// RUN: not %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // RUN: --cuda-gpu-arch=gfx900 -c %s 2>&1 | \ // RUN: FileCheck -check-prefixes=CHECK,NORDC %s // -fno-gpu-rdc without -o -// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ +// RUN: not %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // RUN: --cuda-gpu-arch=gfx900 %s 2>&1 | \ // RUN: FileCheck -check-prefixes=CHECK,NORDC,NOUT %s // -fno-gpu-rdc with -o -// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ +// RUN: not %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // RUN: -o executable --cuda-gpu-arch=gfx900 %s 2>&1 | \ // RUN: FileCheck -check-prefixes=CHECK,NORDC,WOUT %s // -fgpu-rdc without -o with -c -// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ +// RUN: not %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // RUN: -fgpu-rdc --cuda-gpu-arch=gfx900 -c %s 2>&1 | \ // RUN: FileCheck -check-prefixes=CHECK,RDC,RDCC %s // -fgpu-rdc without -o -// RUN: %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ +// RUN: not %clang -### --target=x86_64-linux-gnu -nogpulib -save-temps \ // RUN: -fgpu-rdc --cuda-gpu-arch=gfx900 %s 2>&1 | \ // RUN: FileCheck -check-prefixes=CHECK,RDC,RDCL,NOUT %s diff --git a/clang/test/Driver/hip-std.hip b/clang/test/Driver/hip-std.hip --- a/clang/test/Driver/hip-std.hip +++ b/clang/test/Driver/hip-std.hip @@ -1,26 +1,26 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=DEFAULT %s // DEFAULT: "-cc1"{{.*}}"-fcuda-is-device"{{.*}} // DEFAULT-NOT: "-std="{{.*}} // DEFAULT: "-cc1"{{.*}} // DEFAULT-NOT: "-std="{{.*}} -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -offload-arch=gfx906 %s \ // RUN: -std=c++17 %s 2>&1 | FileCheck -check-prefixes=SPECIFIED %s // SPECIFIED: "-cc1"{{.*}}"-fcuda-is-device"{{.*}}"-std=c++17" // SPECIFIED: "-cc1"{{.*}}"-std=c++17" -// RUN: %clang -### --target=x86_64-pc-windows-msvc -offload-arch=gfx906 %s \ +// RUN: not %clang -### --target=x86_64-pc-windows-msvc -offload-arch=gfx906 %s \ // RUN: 2>&1 | FileCheck -check-prefixes=MSVC-DEF %s // MSVC-DEF: "-cc1"{{.*}}"-fcuda-is-device"{{.*}} // MSVC-DEF-NOT: "-std="{{.*}} // MSVC-DEF: "-cc1"{{.*}} // MSVC-DEF-NOT: "-std="{{.*}} -// RUN: %clang -### --target=x86_64-pc-windows-msvc -offload-arch=gfx906 %s \ +// RUN: not %clang -### --target=x86_64-pc-windows-msvc -offload-arch=gfx906 %s \ // RUN: -std=c++17 %s 2>&1 | FileCheck -check-prefixes=MSVC-SPEC %s // MSVC-SPEC: "-cc1"{{.*}}"-fcuda-is-device"{{.*}}"-std=c++17" // MSVC-SPEC: "-cc1"{{.*}}"-std=c++17" diff --git a/clang/test/Driver/hip-syntax-only.hip b/clang/test/Driver/hip-syntax-only.hip --- a/clang/test/Driver/hip-syntax-only.hip +++ b/clang/test/Driver/hip-syntax-only.hip @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -nogpulib --target=x86_64 -fsyntax-only %s 2>&1 | FileCheck %s +// RUN: not %clang -### -nogpulib --target=x86_64 -fsyntax-only %s 2>&1 | FileCheck %s // Check that there are commands for both host- and device-side compilations. // diff --git a/clang/test/Driver/hip-target-id.hip b/clang/test/Driver/hip-target-id.hip --- a/clang/test/Driver/hip-target-id.hip +++ b/clang/test/Driver/hip-target-id.hip @@ -59,7 +59,7 @@ // RUN: %s 2>&1 | FileCheck -check-prefix=FIJI %s // FIJI: "-targets=host-x86_64-unknown-linux,hipv4-amdgcn-amd-amdhsa--gfx803" -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: -x hip \ // RUN: --offload-arch=gfx900:xnack- \ // RUN: --offload-arch=gfx900:xnack+ \ diff --git a/clang/test/Driver/hip-toolchain-dwarf.hip b/clang/test/Driver/hip-toolchain-dwarf.hip --- a/clang/test/Driver/hip-toolchain-dwarf.hip +++ b/clang/test/Driver/hip-toolchain-dwarf.hip @@ -1,7 +1,7 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### -c --target=x86_64-linux-gnu -fgpu-rdc \ +// RUN: not %clang -### -c --target=x86_64-linux-gnu -fgpu-rdc \ // RUN: -x hip --cuda-gpu-arch=gfx803 %s \ // RUN: -Xarch_gfx803 -g 2>&1 | FileCheck %s -check-prefix=DWARF_VER diff --git a/clang/test/Driver/hip-toolchain-features.hip b/clang/test/Driver/hip-toolchain-features.hip --- a/clang/test/Driver/hip-toolchain-features.hip +++ b/clang/test/Driver/hip-toolchain-features.hip @@ -1,10 +1,10 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: not %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx906:xnack+ --cuda-gpu-arch=gfx900:xnack+ %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=XNACK -// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: not %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx906:xnack- --cuda-gpu-arch=gfx900:xnack- %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=NOXNACK @@ -13,10 +13,10 @@ // XNACK: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+xnack" // NOXNACK: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-xnack" -// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: not %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx908:sramecc+ %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=SRAM -// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: not %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx908:sramecc- %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=NOSRAM @@ -25,10 +25,10 @@ // SRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+sramecc" // NOTSRAM: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-sramecc" -// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: not %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx1010 %s \ // RUN: -mcumode 2>&1 | FileCheck %s -check-prefix=CUMODE -// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: not %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx1010 %s \ // RUN: -mno-cumode 2>&1 | FileCheck %s -check-prefix=NOTCUMODE @@ -37,20 +37,20 @@ // CUMODE: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+cumode" // NOTCUMODE: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-cumode" -// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: not %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx908:xnack+:sramecc+ %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=ALL3 -// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: not %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx908:xnack-:sramecc- %s \ // RUN: 2>&1 | FileCheck %s -check-prefix=NOALL3 // ALL3: {{.*}}clang{{.*}}"-target-feature" "+sramecc" "-target-feature" "+xnack" // NOALL3: {{.*}}clang{{.*}}"-target-feature" "-sramecc" "-target-feature" "-xnack" -// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: not %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx1010 %s \ // RUN: -mtgsplit 2>&1 | FileCheck %s -check-prefix=TGSPLIT -// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: not %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx1010 %s \ // RUN: -mno-tgsplit 2>&1 | FileCheck %s -check-prefix=NOTTGSPLIT @@ -59,7 +59,7 @@ // TGSPLIT: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+tgsplit" // NOTTGSPLIT: {{.*}}lld{{.*}} "-plugin-opt=-mattr=-tgsplit" -// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: not %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx1010 %s \ // RUN: -mcumode -mcumode -mno-cumode -mwavefrontsize64 -mcumode \ // RUN: -mwavefrontsize64 -mno-wavefrontsize64 2>&1 \ @@ -70,7 +70,7 @@ // DUP-NOT: "-target-feature" "{{.*}}wavefrontsize64" // DUP: {{.*}}lld{{.*}} "-plugin-opt=-mattr=+cumode" -// RUN: %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ +// RUN: not %clang -### --target=x86_64-linux-gnu -fgpu-rdc -nogpulib \ // RUN: --cuda-gpu-arch=gfx1010 %s \ // RUN: -mno-wavefrontsize64 -mwavefrontsize64 2>&1 \ // RUN: | FileCheck %s -check-prefix=WAVE64 diff --git a/clang/test/Driver/hip-toolchain-mllvm.hip b/clang/test/Driver/hip-toolchain-mllvm.hip --- a/clang/test/Driver/hip-toolchain-mllvm.hip +++ b/clang/test/Driver/hip-toolchain-mllvm.hip @@ -5,25 +5,25 @@ // to device lld linker. // -mllvm options are passed to clang only. -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -mllvm -unroll-count=10 \ // RUN: -Xoffload-linker -mllvm=-inline-threshold=100 \ // RUN: %s 2>&1 | FileCheck %s -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -mllvm -unroll-count=10 \ // RUN: -Xoffload-linker -mllvm=-inline-threshold=100 \ // RUN: %s 2>&1 | FileCheck -check-prefix=NEG %s -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -fgpu-rdc -mllvm -unroll-count=10 \ // RUN: -Xoffload-linker -mllvm=-inline-threshold=100 \ // RUN: %s 2>&1 | FileCheck %s -// RUN: %clang -### --target=x86_64-linux-gnu \ +// RUN: not %clang -### --target=x86_64-linux-gnu \ // RUN: --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 \ // RUN: -fgpu-rdc -mllvm -unroll-count=10 \ // RUN: -Xoffload-linker -mllvm=-inline-threshold=100 \ diff --git a/clang/test/Driver/hip-toolchain-opt.hip b/clang/test/Driver/hip-toolchain-opt.hip --- a/clang/test/Driver/hip-toolchain-opt.hip +++ b/clang/test/Driver/hip-toolchain-opt.hip @@ -1,63 +1,63 @@ // REQUIRES: x86-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### \ +// RUN: not %clang -### \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,DEFAULT %s -// RUN: %clang -### -O0 \ +// RUN: not %clang -### -O0 \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,O0 %s -// RUN: %clang -### -O1 \ +// RUN: not %clang -### -O1 \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,O1 %s -// RUN: %clang -### -O2 \ +// RUN: not %clang -### -O2 \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,O2 %s -// RUN: %clang -### -O3 \ +// RUN: not %clang -### -O3 \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,O3 %s -// RUN: %clang -### -Os \ +// RUN: not %clang -### -Os \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,Os %s -// RUN: %clang -### -Oz \ +// RUN: not %clang -### -Oz \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,Oz %s -// RUN: %clang -### -Og \ +// RUN: not %clang -### -Og \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ // RUN: -c -nogpulib \ // RUN: %S/Inputs/hip_multiple_inputs/b.hip \ // RUN: 2>&1 | FileCheck --check-prefixes=ALL,Og %s -// RUN: %clang -### -O0 \ +// RUN: not %clang -### -O0 \ // RUN: -Xoffload-linker --lto-CGO2 \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --cuda-gpu-arch=gfx900 \ diff --git a/clang/test/Driver/ibm-profiling.c b/clang/test/Driver/ibm-profiling.c --- a/clang/test/Driver/ibm-profiling.c +++ b/clang/test/Driver/ibm-profiling.c @@ -1,5 +1,5 @@ // Check that -pg throws an error on z/OS. -// RUN: %clang -### 2>&1 --target=s390x-none-zos -S -pg %s | FileCheck -check-prefix=FAIL-PG-NAME %s +// RUN: not %clang -### 2>&1 --target=s390x-none-zos -S -pg %s | FileCheck -check-prefix=FAIL-PG-NAME %s // FAIL-PG-NAME: error: unsupported option '-pg' for target 's390x-none-zos' // Check that -p is still used when not linking on AIX. diff --git a/clang/test/Driver/ld-path.c b/clang/test/Driver/ld-path.c --- a/clang/test/Driver/ld-path.c +++ b/clang/test/Driver/ld-path.c @@ -24,20 +24,20 @@ // GOLD: Inputs/basic_freebsd_tree/usr/bin/ld.gold" -// RUN: env COMPILER_PATH= PATH=%S/Inputs/basic_freebsd_tree/usr/bin %clang %s -### --ld-path=not_exist \ +// RUN: not env COMPILER_PATH= PATH=%S/Inputs/basic_freebsd_tree/usr/bin %clang %s -### --ld-path=not_exist \ // RUN: --target=x86_64-unknown-freebsd --sysroot=%S/Inputs/basic_freebsd_tree 2>&1 | \ // RUN: FileCheck %s --check-prefix=NOT_EXIST // NOT_EXIST: error: invalid linker name in argument '--ld-path=not_exist' -// RUN: %clang %s -### --ld-path= \ +// RUN: not %clang %s -### --ld-path= \ // RUN: --target=x86_64-unknown-freebsd --sysroot=%S/Inputs/basic_freebsd_tree 2>&1 | \ // RUN: FileCheck %s --check-prefix=EMPTY // EMPTY: error: invalid linker name in argument '--ld-path=' /// If --ld-path= contains a slash, PATH is not consulted. -// RUN: env COMPILER_PATH=%S/Inputs/basic_freebsd_tree/usr/bin %clang %s -### --ld-path=./ld.bfd \ +// RUN: env COMPILER_PATH=%S/Inputs/basic_freebsd_tree/usr/bin not %clang %s -### --ld-path=./ld.bfd \ // RUN: --target=x86_64-unknown-freebsd --sysroot=%S/Inputs/basic_freebsd_tree 2>&1 | \ // RUN: FileCheck %s --check-prefix=NO_BFD diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c --- a/clang/test/Driver/linux-ld.c +++ b/clang/test/Driver/linux-ld.c @@ -191,7 +191,7 @@ // CHECK-CLANG-LD-STATIC-PIE: "{{.*}}rcrt1.o" // CHECK-CLANG-LD-STATIC-PIE: "--start-group" "-lgcc" "-lgcc_eh" "-lc" "--end-group" // -// RUN: %clang -static-pie -pie -### %s -no-pie 2>&1 \ +// RUN: not %clang -static-pie -pie -### %s -no-pie 2>&1 \ // RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ @@ -206,7 +206,7 @@ // CHECK-CLANG-LD-STATIC-PIE-PIE: "{{.*}}rcrt1.o" // CHECK-CLANG-LD-STATIC-PIE-PIE: "--start-group" "-lgcc" "-lgcc_eh" "-lc" "--end-group" // -// RUN: %clang -static-pie -static -### %s -no-pie 2>&1 \ +// RUN: not %clang -static-pie -static -### %s -no-pie 2>&1 \ // RUN: --target=x86_64-unknown-linux -rtlib=platform --unwindlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ @@ -221,7 +221,7 @@ // CHECK-CLANG-LD-STATIC-PIE-STATIC: "{{.*}}rcrt1.o" // CHECK-CLANG-LD-STATIC-PIE-STATIC: "--start-group" "-lgcc" "-lgcc_eh" "-lc" "--end-group" // -// RUN: %clang -static-pie -nopie -### %s -no-pie 2>&1 \ +// RUN: not %clang -static-pie -nopie -### %s -no-pie 2>&1 \ // RUN: --target=x86_64-unknown-linux -rtlib=platform \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ @@ -382,7 +382,7 @@ // CHECK-64-TO-64: "-L[[SYSROOT]]/lib" // CHECK-64-TO-64: "-L[[SYSROOT]]/usr/lib" // -// RUN: %clang -### %s -no-pie 2>&1 \ +// RUN: not %clang -### %s -no-pie 2>&1 \ // RUN: --target=x86_64-unknown-linux -rtlib=plaform -m32 \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/multilib_64bit_linux_tree \ @@ -1344,7 +1344,7 @@ // RUN: | FileCheck --check-prefix=CHECK-ANDROID-PTHREAD %s // CHECK-ANDROID-PTHREAD-NOT: -lpthread // -// RUN: %clang %t.o -no-pie -### -o %t 2>&1 \ +// RUN: not %clang %t.o -no-pie -### -o %t 2>&1 \ // RUN: --target=arm-linux-androideabi -pthread \ // RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/basic_android_tree/sysroot \ diff --git a/clang/test/Driver/loongarch-mfpu-error.c b/clang/test/Driver/loongarch-mfpu-error.c --- a/clang/test/Driver/loongarch-mfpu-error.c +++ b/clang/test/Driver/loongarch-mfpu-error.c @@ -1,3 +1,3 @@ -// RUN: %clang --target=loongarch64 -mfpu=xxx %s -### 2>&1 | FileCheck %s +// RUN: not %clang --target=loongarch64 -mfpu=xxx %s -### 2>&1 | FileCheck %s // CHECK: invalid argument 'xxx' to -mfpu=; must be one of: 64, 32, none, 0 (alias for none) diff --git a/clang/test/Driver/macho-embedded.c b/clang/test/Driver/macho-embedded.c --- a/clang/test/Driver/macho-embedded.c +++ b/clang/test/Driver/macho-embedded.c @@ -11,7 +11,7 @@ // RUN: %clang -arch armv7m --target=thumbv7-apple-watchos -mwatchos-version-min=5 -fdriver-only -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-MACHO-EMBEDDED-DIAG // RUN: %clang -arch armv7m --target=thumbv7-apple-tvos -mtvos-version-min=5 -fdriver-only -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-MACHO-EMBEDDED-DIAG -// RUN: %clang -arch armv7m --target=thumbv7-apple-tvos -mios-version-min=5 -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-MACHO-EMBEDDED-MIXED +// RUN: not %clang -arch armv7m --target=thumbv7-apple-tvos -mios-version-min=5 -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-MACHO-EMBEDDED-MIXED // CHECK-IOS: "-triple" "thumbv7" "thumbv7-apple-ios diff --git a/clang/test/Driver/mbig-obj.c b/clang/test/Driver/mbig-obj.c --- a/clang/test/Driver/mbig-obj.c +++ b/clang/test/Driver/mbig-obj.c @@ -1,6 +1,6 @@ // RUN: %clang --target=x86_64-windows -c -Wa,-mbig-obj %s -### 2>&1 | FileCheck %s --check-prefix=WINDOWS // RUN: %clang --target=x86_64-windows -c -Xassembler -mbig-obj %s -### 2>&1 | FileCheck %s --check-prefix=WINDOWS -// RUN: %clang --target=x86_64-linux -c -Wa,-mbig-obj %s -### 2>&1 | FileCheck %s --check-prefix=LINUX -// RUN: %clang --target=x86_64-linux -c -Xassembler -mbig-obj %s -### 2>&1 | FileCheck %s --check-prefix=LINUX +// RUN: not %clang --target=x86_64-linux -c -Wa,-mbig-obj %s -### 2>&1 | FileCheck %s --check-prefix=LINUX +// RUN: not %clang --target=x86_64-linux -c -Xassembler -mbig-obj %s -### 2>&1 | FileCheck %s --check-prefix=LINUX // WINDOWS-NOT: argument unused during compilation // LINUX: unsupported argument '-mbig-obj' to option '-{{(Wa,|Xassembler)}}' diff --git a/clang/test/Driver/mcount.c b/clang/test/Driver/mcount.c --- a/clang/test/Driver/mcount.c +++ b/clang/test/Driver/mcount.c @@ -3,8 +3,8 @@ // CHECK: "-mnop-mcount" // CHECK: "-mrecord-mcount" -// RUN: %clang -target x86_64 -c -### %s -mnop-mcount -mrecord-mcount 2>&1 | FileCheck --check-prefix=ERR1 %s -// RUN: %clang -target aarch64 -c -### %s -mnop-mcount -mrecord-mcount 2>&1 | FileCheck --check-prefix=ERR2 %s +// RUN: not %clang -target x86_64 -c -### %s -mnop-mcount -mrecord-mcount 2>&1 | FileCheck --check-prefix=ERR1 %s +// RUN: not %clang -target aarch64 -c -### %s -mnop-mcount -mrecord-mcount 2>&1 | FileCheck --check-prefix=ERR2 %s // ERR1: error: unsupported option '-mnop-mcount' for target 'x86_64' // ERR1: error: unsupported option '-mrecord-mcount' for target 'x86_64' diff --git a/clang/test/Driver/mdefault-visibility-export-mapping.c b/clang/test/Driver/mdefault-visibility-export-mapping.c --- a/clang/test/Driver/mdefault-visibility-export-mapping.c +++ b/clang/test/Driver/mdefault-visibility-export-mapping.c @@ -1,5 +1,5 @@ // RUN: %clang -### -S -mdefault-visibility-export-mapping=explicit --target=powerpc-ibm-aix %s 2>&1 | FileCheck %s -// RUN: %clang -### -S -mdefault-visibility-export-mapping=explicit --target=powerpc-unknown-linux %s 2>&1 | \ +// RUN: not %clang -### -S -mdefault-visibility-export-mapping=explicit --target=powerpc-unknown-linux %s 2>&1 | \ // RUN: FileCheck -check-prefix=ERROR %s // CHECK: "-mdefault-visibility-export-mapping=explicit" diff --git a/clang/test/Driver/memtag-ld.c b/clang/test/Driver/memtag-ld.c --- a/clang/test/Driver/memtag-ld.c +++ b/clang/test/Driver/memtag-ld.c @@ -24,11 +24,11 @@ // RUN: | FileCheck %s \ // RUN: --check-prefixes=CHECK-ASYNC,CHECK-HEAP,CHECK-NO-STACK -// RUN: %clang -### --target=aarch64-linux-android -march=armv8+memtag \ +// RUN: not %clang -### --target=aarch64-linux-android -march=armv8+memtag \ // RUN: -fsanitize=memtag-heap -fsanitize-memtag-mode=asymm %s 2>&1 \ // RUN: | FileCheck %s --check-prefixes=CHECK-INVALID-MODE -// RUN: %clang -### --target=aarch64-linux-android -march=armv8+memtag \ +// RUN: not %clang -### --target=aarch64-linux-android -march=armv8+memtag \ // RUN: -fsanitize=memtag-stack -fsanitize=memtag-heap \ // RUN: -fsanitize-memtag-mode=asymm -fno-sanitize=memtag %s 2>&1 \ // RUN: | FileCheck %s --check-prefixes=CHECK-NONE diff --git a/clang/test/Driver/miamcu-opt.c b/clang/test/Driver/miamcu-opt.c --- a/clang/test/Driver/miamcu-opt.c +++ b/clang/test/Driver/miamcu-opt.c @@ -2,9 +2,9 @@ // RUN: %clang -### --target=x86_64 -miamcu -rtlib=platform -m32 %s 2>&1 | FileCheck %s // RUN: %clang -### --target=x86_64 -miamcu -rtlib=platform --target=x86_64-unknown-linux-gnu %s 2>&1 | FileCheck %s // RUN: %clang -### --target=x86_64 -mno-iamcu -miamcu -rtlib=platform %s 2>&1 | FileCheck %s -// RUN: %clang -### --target=x86_64 -miamcu -rtlib=platform -m64 %s 2>&1 | FileCheck %s -check-prefix=M64 -// RUN: %clang -### --target=x86_64 -miamcu -rtlib=platform -dynamic %s 2>&1 | FileCheck %s -check-prefix=DYNAMIC -// RUN: %clang -### --target=x86_64 -miamcu -rtlib=platform --target=armv8-eabi %s 2>&1 | FileCheck %s -check-prefix=NOT-X86 +// RUN: not %clang -### --target=x86_64 -miamcu -rtlib=platform -m64 %s 2>&1 | FileCheck %s -check-prefix=M64 +// RUN: not %clang -### --target=x86_64 -miamcu -rtlib=platform -dynamic %s 2>&1 | FileCheck %s -check-prefix=DYNAMIC +// RUN: not %clang -### --target=x86_64 -miamcu -rtlib=platform --target=armv8-eabi %s 2>&1 | FileCheck %s -check-prefix=NOT-X86 // RUN: %clang -### --target=x86_64-unknown-linux-gnu -miamcu -mno-iamcu %s 2>&1 | FileCheck %s -check-prefix=MNOIAMCU // M64: error: invalid argument '-miamcu' not allowed with '-m64' diff --git a/clang/test/Driver/miamcu-opt.cpp b/clang/test/Driver/miamcu-opt.cpp --- a/clang/test/Driver/miamcu-opt.cpp +++ b/clang/test/Driver/miamcu-opt.cpp @@ -1,3 +1,3 @@ -// RUN: %clang -miamcu -rtlib=platform %s -### -o %t.o 2>&1 | FileCheck %s +// RUN: not %clang -miamcu -rtlib=platform %s -### -o %t.o 2>&1 | FileCheck %s // CHECK: error: the clang compiler does not support 'C++ for IAMCU' diff --git a/clang/test/Driver/mingw-cfguard.c b/clang/test/Driver/mingw-cfguard.c --- a/clang/test/Driver/mingw-cfguard.c +++ b/clang/test/Driver/mingw-cfguard.c @@ -24,5 +24,5 @@ // GUARD_NOCHECKS-SAME: "--guard-cf" // GUARD_NOCHECKS-NOT: "--no-guard-cf" -// RUN: %clang --target=x86_64-w64-windows-gnu -### %s -mguard=xxx 2>&1 | FileCheck -check-prefix=GUARD_UNKNOWN %s +// RUN: not %clang --target=x86_64-w64-windows-gnu -### %s -mguard=xxx 2>&1 | FileCheck -check-prefix=GUARD_UNKNOWN %s // GUARD_UNKNOWN: error: unsupported argument 'xxx' to option '-mguard=' diff --git a/clang/test/Driver/mlong-double-128.c b/clang/test/Driver/mlong-double-128.c --- a/clang/test/Driver/mlong-double-128.c +++ b/clang/test/Driver/mlong-double-128.c @@ -8,8 +8,8 @@ // CHECK: "-mlong-double-128" -// RUN: %clang -target aarch64 -c -### %s -mlong-double-128 2>&1 | FileCheck --check-prefix=ERR %s -// RUN: %clang -target powerpc -c -### %s -mlong-double-80 2>&1 | FileCheck --check-prefix=ERR2 %s +// RUN: not %clang -target aarch64 -c -### %s -mlong-double-128 2>&1 | FileCheck --check-prefix=ERR %s +// RUN: not %clang -target powerpc -c -### %s -mlong-double-80 2>&1 | FileCheck --check-prefix=ERR2 %s // ERR: error: unsupported option '-mlong-double-128' for target 'aarch64' // ERR2: error: unsupported option '-mlong-double-80' for target 'powerpc' diff --git a/clang/test/Driver/module-output.cppm b/clang/test/Driver/module-output.cppm --- a/clang/test/Driver/module-output.cppm +++ b/clang/test/Driver/module-output.cppm @@ -22,7 +22,7 @@ // // Tests that clang will reject the command line if it specifies -fmodule-output with // multiple archs. -// RUN: %clang %t/Hello.cppm -fmodule-output -arch i386 -arch x86_64 -### -target \ +// RUN: not %clang %t/Hello.cppm -fmodule-output -arch i386 -arch x86_64 -### -target \ // RUN: x86_64-apple-darwin 2>&1 | FileCheck %t/Hello.cppm -check-prefix=MULTIPLE-ARCH // Tests that the .pcm file will be generated in the same path with the specified one diff --git a/clang/test/Driver/modules.m b/clang/test/Driver/modules.m --- a/clang/test/Driver/modules.m +++ b/clang/test/Driver/modules.m @@ -4,7 +4,7 @@ // RUN: %clang -fmodules -fno-modules -fmodules -### %s 2>&1 | FileCheck -check-prefix=CHECK-HAS-MODULES %s // CHECK-HAS-MODULES: -fmodules -// RUN: %clang -fmodules -fbuild-session-file=doesntexist -### %s 2>&1 | FileCheck -check-prefix=NOFILE %s +// RUN: not %clang -fmodules -fbuild-session-file=doesntexist -### %s 2>&1 | FileCheck -check-prefix=NOFILE %s // NOFILE: no such file or directory: 'doesntexist' // RUN: touch -m -a -t 201008011501 %t.build-session-file @@ -13,7 +13,7 @@ // RUN: %clang -fmodules -fbuild-session-timestamp=1280703457 -### %s 2>&1 | FileCheck -check-prefix=TIMESTAMP_ONLY %s // TIMESTAMP_ONLY: -fbuild-session-timestamp=128{{([[:digit:]]{7})[^[:digit:]]}} -// RUN: %clang -fmodules -fbuild-session-file=%t.build-session-file -fbuild-session-timestamp=123 -### %s 2>&1 | FileCheck -check-prefix=CONFLICT %s +// RUN: not %clang -fmodules -fbuild-session-file=%t.build-session-file -fbuild-session-timestamp=123 -### %s 2>&1 | FileCheck -check-prefix=CONFLICT %s // CONFLICT: error: invalid argument '-fbuild-session-file={{.*}}.build-session-file' not allowed with '-fbuild-session-timestamp' // RUN: %clang -fmodules -fbuild-session-timestamp=123 -fmodules-validate-once-per-build-session -### %s 2>&1 | FileCheck -check-prefix=MODULES_VALIDATE_ONCE %s @@ -24,7 +24,7 @@ // MODULES_VALIDATE_ONCE_FILE: -fbuild-session-timestamp=128{{([[:digit:]]{7})[^[:digit:]]}} // MODULES_VALIDATE_ONCE_FILE: -fmodules-validate-once-per-build-session -// RUN: %clang -fmodules -fmodules-validate-once-per-build-session -### %s 2>&1 | FileCheck -check-prefix=MODULES_VALIDATE_ONCE_ERR %s +// RUN: not %clang -fmodules -fmodules-validate-once-per-build-session -### %s 2>&1 | FileCheck -check-prefix=MODULES_VALIDATE_ONCE_ERR %s // MODULES_VALIDATE_ONCE_ERR: option '-fmodules-validate-once-per-build-session' requires '-fbuild-session-timestamp=' or '-fbuild-session-file=' // RUN: %clang -### %s 2>&1 | FileCheck -check-prefix=MODULES_VALIDATE_SYSTEM_HEADERS_DEFAULT %s diff --git a/clang/test/Driver/mprefer-vector-width.c b/clang/test/Driver/mprefer-vector-width.c --- a/clang/test/Driver/mprefer-vector-width.c +++ b/clang/test/Driver/mprefer-vector-width.c @@ -14,11 +14,11 @@ //// Check invalid parameters. -// RUN: %clang -### -S %s -mprefer-vector-width=one 2>&1 | FileCheck --check-prefix=WIDTHONE %s +// RUN: not %clang -### -S %s -mprefer-vector-width=one 2>&1 | FileCheck --check-prefix=WIDTHONE %s // WIDTHONE: invalid value 'one' in 'mprefer-vector-width=' -// RUN: %clang -### -S %s -mprefer-vector-width=128.5 2>&1 | FileCheck --check-prefix=WIDTH128p5 %s +// RUN: not %clang -### -S %s -mprefer-vector-width=128.5 2>&1 | FileCheck --check-prefix=WIDTH128p5 %s // WIDTH128p5: invalid value '128.5' in 'mprefer-vector-width=' -// RUN: %clang -### -S %s -mprefer-vector-width=-128 2>&1 | FileCheck --check-prefix=WIDTHNEG128 %s +// RUN: not %clang -### -S %s -mprefer-vector-width=-128 2>&1 | FileCheck --check-prefix=WIDTHNEG128 %s // WIDTHNEG128: invalid value '-128' in 'mprefer-vector-width=' diff --git a/clang/test/Driver/mrecip.c b/clang/test/Driver/mrecip.c --- a/clang/test/Driver/mrecip.c +++ b/clang/test/Driver/mrecip.c @@ -59,26 +59,26 @@ //// Check invalid parameters. -// RUN: %clang -### -S %s -mrecip=bogus 2>&1 | FileCheck --check-prefix=RECIP13 %s +// RUN: not %clang -### -S %s -mrecip=bogus 2>&1 | FileCheck --check-prefix=RECIP13 %s // RECIP13: error: unknown argument -// RUN: %clang -### -S %s -mrecip=divd:1,divd 2>&1 | FileCheck --check-prefix=RECIP14 %s +// RUN: not %clang -### -S %s -mrecip=divd:1,divd 2>&1 | FileCheck --check-prefix=RECIP14 %s // RECIP14: error: invalid value -// RUN: %clang -### -S %s -mrecip=sqrt,sqrtf 2>&1 | FileCheck --check-prefix=RECIP15 %s +// RUN: not %clang -### -S %s -mrecip=sqrt,sqrtf 2>&1 | FileCheck --check-prefix=RECIP15 %s // RECIP15: error: invalid value -// RUN: %clang -### -S %s -mrecip=+default:10 2>&1 | FileCheck --check-prefix=RECIP16 %s +// RUN: not %clang -### -S %s -mrecip=+default:10 2>&1 | FileCheck --check-prefix=RECIP16 %s // RECIP16: error: invalid value -// RUN: %clang -### -S %s -mrecip=!vec-divd: 2>&1 | FileCheck --check-prefix=RECIP17 %s +// RUN: not %clang -### -S %s -mrecip=!vec-divd: 2>&1 | FileCheck --check-prefix=RECIP17 %s // RECIP17: error: invalid value -// RUN: %clang -### -S %s -mrecip=divh:1,divh 2>&1 | FileCheck --check-prefix=RECIP20 %s +// RUN: not %clang -### -S %s -mrecip=divh:1,divh 2>&1 | FileCheck --check-prefix=RECIP20 %s // RECIP20: error: invalid value -// RUN: %clang -### -S %s -mrecip=divh,div 2>&1 | FileCheck --check-prefix=RECIP21 %s +// RUN: not %clang -### -S %s -mrecip=divh,div 2>&1 | FileCheck --check-prefix=RECIP21 %s // RECIP21: error: invalid value -// RUN: %clang -### -S %s -mrecip=sqrt,sqrth 2>&1 | FileCheck --check-prefix=RECIP22 %s +// RUN: not %clang -### -S %s -mrecip=sqrt,sqrth 2>&1 | FileCheck --check-prefix=RECIP22 %s // RECIP22: error: invalid value diff --git a/clang/test/Driver/msp430-mmcu.c b/clang/test/Driver/msp430-mmcu.c --- a/clang/test/Driver/msp430-mmcu.c +++ b/clang/test/Driver/msp430-mmcu.c @@ -10,13 +10,13 @@ // MSP430-I2020: "-cc1" {{.*}} "-D__MSP430i2020__" // MSP430-I2020: msp430-elf-ld{{.*}} "-Tmsp430i2020.ld" -// RUN: %clang -### %s --target=msp430 -mmcu=not-a-mcu 2>&1 \ +// RUN: not %clang -### %s --target=msp430 -mmcu=not-a-mcu 2>&1 \ // RUN: | FileCheck -check-prefix=MSP430-UNSUP %s // MSP430-UNSUP: error: the clang compiler does not support 'not-a-mcu' // The generic MCU name "msp430" is not supported. -// RUN: %clang -### %s --target=msp430 -mmcu=msp430 2>&1 \ +// RUN: not %clang -### %s --target=msp430 -mmcu=msp430 2>&1 \ // RUN: | FileCheck -check-prefix=MSP430 %s // MSP430: error: the clang compiler does not support 'msp430' diff --git a/clang/test/Driver/mtargetos-darwin.c b/clang/test/Driver/mtargetos-darwin.c --- a/clang/test/Driver/mtargetos-darwin.c +++ b/clang/test/Driver/mtargetos-darwin.c @@ -5,10 +5,10 @@ // RUN: %clang -mtargetos=tvos14 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=TVOS %s // RUN: %clang -mtargetos=watchos7.1 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=WATCHOS %s -// RUN: %clang -target arm64-apple-ios14 -mtargetos=ios14 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOMIX1 %s -// RUN: %clang -mtargetos=ios14 -arch arm64 -miphoneos-version-min=14 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOMIX2 %s -// RUN: %clang -mtargetos=darwin20 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=INVALIDOS %s -// RUN: %clang -mtargetos=ios -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOVERSION %s +// RUN: not %clang -target arm64-apple-ios14 -mtargetos=ios14 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOMIX1 %s +// RUN: not %clang -mtargetos=ios14 -arch arm64 -miphoneos-version-min=14 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOMIX2 %s +// RUN: not %clang -mtargetos=darwin20 -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=INVALIDOS %s +// RUN: not %clang -mtargetos=ios -arch arm64 -c %s -o %t.o -### 2>&1 | FileCheck --check-prefix=NOVERSION %s // REQUIRES: system-darwin diff --git a/clang/test/Driver/munaligned-access-unused.c b/clang/test/Driver/munaligned-access-unused.c --- a/clang/test/Driver/munaligned-access-unused.c +++ b/clang/test/Driver/munaligned-access-unused.c @@ -1,8 +1,8 @@ /// Check -m[no-]unaligned-access and -m[no-]strict-align are warned unused on a target that does not support them. -// RUN: %clang --target=x86_64 -munaligned-access -fsyntax-only %s -### 2>&1 | FileCheck %s -DOPTION=unaligned-access -// RUN: %clang --target=x86_64 -mno-unaligned-access -fsyntax-only %s -### 2>&1 | FileCheck %s -DOPTION=no-unaligned-access -// RUN: %clang --target=x86_64 -mstrict-align -fsyntax-only %s -### 2>&1 | FileCheck %s -DOPTION=strict-align -// RUN: %clang --target=x86_64 -mno-strict-align -fsyntax-only %s -### 2>&1 | FileCheck %s -DOPTION=no-strict-align +// RUN: not %clang --target=x86_64 -munaligned-access -fsyntax-only %s -### 2>&1 | FileCheck %s -DOPTION=unaligned-access +// RUN: not %clang --target=x86_64 -mno-unaligned-access -fsyntax-only %s -### 2>&1 | FileCheck %s -DOPTION=no-unaligned-access +// RUN: not %clang --target=x86_64 -mstrict-align -fsyntax-only %s -### 2>&1 | FileCheck %s -DOPTION=strict-align +// RUN: not %clang --target=x86_64 -mno-strict-align -fsyntax-only %s -### 2>&1 | FileCheck %s -DOPTION=no-strict-align // CHECK: error: unsupported option '-m{{(no-)?}}unaligned-access' for target '{{.*}}' diff --git a/clang/test/Driver/myriad-toolchain.c b/clang/test/Driver/myriad-toolchain.c --- a/clang/test/Driver/myriad-toolchain.c +++ b/clang/test/Driver/myriad-toolchain.c @@ -24,7 +24,7 @@ // NO_SLASH_INCLUDE: "-isysroot" "/yow" // NO_SLASH_INCLUDE-NOT: "-internal-isystem" "/yow/include" -// RUN: %clang -### --target=what-myriad %s 2>&1 | FileCheck %s -check-prefix=BAD_ARCH +// RUN: not %clang -### --target=what-myriad %s 2>&1 | FileCheck %s -check-prefix=BAD_ARCH // BAD_ARCH: the target architecture 'what' is not supported by the target 'myriad' // Ensure that '-target shave' picks a different compiler. diff --git a/clang/test/Driver/nvptx-cuda-system-arch.c b/clang/test/Driver/nvptx-cuda-system-arch.c --- a/clang/test/Driver/nvptx-cuda-system-arch.c +++ b/clang/test/Driver/nvptx-cuda-system-arch.c @@ -12,16 +12,16 @@ // RUN: chmod +x %t/nvptx_arch_empty // case when nvptx-arch returns nothing or fails -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --nvptx-arch-tool=%t/nvptx_arch_fail -x cuda %s 2>&1 \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --nvptx-arch-tool=%t/nvptx_arch_fail -x cuda %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=NO-OUTPUT-ERROR -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --nvptx-arch-tool=%t/nvptx_arch_fail -x cuda %s 2>&1 \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --nvptx-arch-tool=%t/nvptx_arch_fail -x cuda %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=NO-OUTPUT-ERROR // NO-OUTPUT-ERROR: error: cannot determine nvptx64 architecture{{.*}}; consider passing it via '--offload-arch' // case when nvptx-arch does not return anything with successful execution -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --nvptx-arch-tool=%t/nvptx_arch_empty -x cuda %s 2>&1 \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-arch=native --nvptx-arch-tool=%t/nvptx_arch_empty -x cuda %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=EMPTY-OUTPUT -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --nvptx-arch-tool=%t/nvptx_arch_empty -x cuda %s 2>&1 \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib --offload-new-driver --offload-arch=native --nvptx-arch-tool=%t/nvptx_arch_empty -x cuda %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=EMPTY-OUTPUT // EMPTY-OUTPUT: error: cannot determine nvptx64 architecture: No NVIDIA GPU detected in the system; consider passing it via '--offload-arch' diff --git a/clang/test/Driver/objc-weak.m b/clang/test/Driver/objc-weak.m --- a/clang/test/Driver/objc-weak.m +++ b/clang/test/Driver/objc-weak.m @@ -10,8 +10,8 @@ // ARC-NO-WEAK: -fobjc-arc // ARC-NO-WEAK: -fno-objc-weak -// RUN: %clang -target x86_64-apple-macosx10.5 -S -### %s -fobjc-arc -fobjc-weak 2>&1 | FileCheck %s --check-prefix ARC-WEAK-NOTSUPPORTED -// RUN: %clang -target x86_64-apple-macosx10.5 -S -### %s -fno-objc-weak -fobjc-weak -fobjc-arc 2>&1 | FileCheck %s --check-prefix ARC-WEAK-NOTSUPPORTED +// RUN: not %clang -target x86_64-apple-macosx10.5 -S -### %s -fobjc-arc -fobjc-weak 2>&1 | FileCheck %s --check-prefix ARC-WEAK-NOTSUPPORTED +// RUN: not %clang -target x86_64-apple-macosx10.5 -S -### %s -fno-objc-weak -fobjc-weak -fobjc-arc 2>&1 | FileCheck %s --check-prefix ARC-WEAK-NOTSUPPORTED // ARC-WEAK-NOTSUPPORTED: error: -fobjc-weak is not supported on the current deployment target // RUN: %clang -target x86_64-apple-macos10.7 -S -### %s -fobjc-weak 2>&1 | FileCheck %s --check-prefix MRC-WEAK @@ -22,6 +22,6 @@ // RUN: %clang -target x86_64-apple-macosx10.7 -S -### %s -fobjc-weak -fno-objc-weak 2>&1 | FileCheck %s --check-prefix MRC-NO-WEAK // MRC-NO-WEAK: -fno-objc-weak -// RUN: %clang -target x86_64-apple-macosx10.5 -S -### %s -fobjc-weak 2>&1 | FileCheck %s --check-prefix MRC-WEAK-NOTSUPPORTED -// RUN: %clang -target x86_64-apple-macosx10.5 -S -### %s -fno-objc-weak -fobjc-weak 2>&1 | FileCheck %s --check-prefix MRC-WEAK-NOTSUPPORTED +// RUN: not %clang -target x86_64-apple-macosx10.5 -S -### %s -fobjc-weak 2>&1 | FileCheck %s --check-prefix MRC-WEAK-NOTSUPPORTED +// RUN: not %clang -target x86_64-apple-macosx10.5 -S -### %s -fno-objc-weak -fobjc-weak 2>&1 | FileCheck %s --check-prefix MRC-WEAK-NOTSUPPORTED // MRC-WEAK-NOTSUPPORTED: error: -fobjc-weak is not supported on the current deployment target diff --git a/clang/test/Driver/offloading-interoperability.c b/clang/test/Driver/offloading-interoperability.c --- a/clang/test/Driver/offloading-interoperability.c +++ b/clang/test/Driver/offloading-interoperability.c @@ -4,7 +4,7 @@ // // Verify that CUDA device commands do not get OpenMP flags. // -// RUN: %clang -### -x cuda --target=powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \ +// RUN: not %clang -### -x cuda --target=powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \ // RUN: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE // // NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: "-cc1" "-triple" "nvptx64-nvidia-cuda" diff --git a/clang/test/Driver/ohos.c b/clang/test/Driver/ohos.c --- a/clang/test/Driver/ohos.c +++ b/clang/test/Driver/ohos.c @@ -32,7 +32,7 @@ // CHECK: clang_rt.crtend.o // CHECK: crtn.o -// RUN: %clang %s -### --target=arm-liteos -rtlib=libgcc 2>&1 \ +// RUN: not %clang %s -### --target=arm-liteos -rtlib=libgcc 2>&1 \ // RUN: | FileCheck %s -check-prefix=CHECK-RTLIB // CHECK-RTLIB: error: invalid runtime library name in argument '-rtlib=libgcc' diff --git a/clang/test/Driver/ohos.cpp b/clang/test/Driver/ohos.cpp --- a/clang/test/Driver/ohos.cpp +++ b/clang/test/Driver/ohos.cpp @@ -25,7 +25,7 @@ // CHECK: clang_rt.crtend.o // CHECK: crtn.o -// RUN: %clangxx %s -### --target=arm-unknown-liteos -stdlib=libstdc++ 2>&1 \ +// RUN: not %clangxx %s -### --target=arm-unknown-liteos -stdlib=libstdc++ 2>&1 \ // RUN: | FileCheck %s -check-prefix=CHECK-STDLIB // CHECK-STDLIB: error: invalid library name in argument '-stdlib=libstdc++' diff --git a/clang/test/Driver/openmp-offload-gpu.c b/clang/test/Driver/openmp-offload-gpu.c --- a/clang/test/Driver/openmp-offload-gpu.c +++ b/clang/test/Driver/openmp-offload-gpu.c @@ -10,7 +10,7 @@ /// ########################################################################### /// Check -Xopenmp-target uses one of the archs provided when several archs are used. -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ // RUN: -Xopenmp-target -march=sm_35 -Xopenmp-target -march=sm_60 %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-ARCHS %s @@ -19,7 +19,7 @@ /// ########################################################################### /// Check -Xopenmp-target -march=sm_35 works as expected when two triples are present. -// RUN: %clang -### -fopenmp=libomp \ +// RUN: not %clang -### -fopenmp=libomp \ // RUN: -fopenmp-targets=powerpc64le-ibm-linux-gnu,nvptx64-nvidia-cuda \ // RUN: -Xopenmp-target=nvptx64-nvidia-cuda -march=sm_35 %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-COMPILATION %s @@ -27,7 +27,7 @@ // CHK-FOPENMP-TARGET-COMPILATION: ptxas{{.*}}" "--gpu-name" "sm_35" /// Check PTXAS is passed -c flag when offloading to an NVIDIA device using OpenMP. -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda %s 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-PTXAS-DEFAULT %s // CHK-PTXAS-DEFAULT: ptxas{{.*}}" "-c" @@ -35,7 +35,7 @@ /// ########################################################################### /// PTXAS is passed -c flag by default when offloading to an NVIDIA device using OpenMP - disable it. -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -fnoopenmp-relocatable-target \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -fnoopenmp-relocatable-target \ // RUN: -save-temps %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-PTXAS-NORELO %s @@ -45,7 +45,7 @@ /// PTXAS is passed -c flag by default when offloading to an NVIDIA device using OpenMP /// Check that the flag is passed when -fopenmp-relocatable-target is used. -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-relocatable-target \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-relocatable-target \ // RUN: -save-temps %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-PTXAS-RELO %s @@ -75,21 +75,21 @@ /// Check that the runtime bitcode library is part of the compile line. /// Create a bogus bitcode library and specify it with libomptarget-nvptx-bc-path -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ // RUN: --libomptarget-nvptx-bc-path=%S/Inputs/libomptarget/libomptarget-nvptx-test.bc \ // RUN: -Xopenmp-target -march=sm_35 --cuda-path=%S/Inputs/CUDA_102/usr/local/cuda \ // RUN: -fopenmp-relocatable-target -save-temps %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-BCLIB %s /// Specify the directory containing the bitcode lib, check clang picks the right one -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ // RUN: --libomptarget-nvptx-bc-path=%S/Inputs/libomptarget \ // RUN: -Xopenmp-target -march=sm_35 --cuda-path=%S/Inputs/CUDA_102/usr/local/cuda \ // RUN: -fopenmp-relocatable-target -save-temps \ // RUN: %s 2>&1 | FileCheck -check-prefix=CHK-BCLIB-DIR %s /// Create a bogus bitcode library and find it with LIBRARY_PATH -// RUN: env LIBRARY_PATH=%S/Inputs/libomptarget/subdir %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ +// RUN: env LIBRARY_PATH=%S/Inputs/libomptarget/subdir not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ // RUN: -Xopenmp-target -march=sm_35 --cuda-path=%S/Inputs/CUDA_102/usr/local/cuda \ // RUN: -fopenmp-relocatable-target -save-temps \ // RUN: %s 2>&1 | FileCheck -check-prefix=CHK-ENV-BCLIB %s @@ -103,7 +103,7 @@ /// Check that the warning is thrown when the libomptarget bitcode library is not found. /// Libomptarget requires sm_35 or newer so an sm_35 bitcode library should never exist. -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ // RUN: -Xopenmp-target -march=sm_35 --cuda-path=%S/Inputs/CUDA_102/usr/local/cuda \ // RUN: -fopenmp-relocatable-target -save-temps %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-BCLIB-WARN %s @@ -113,7 +113,7 @@ /// ########################################################################### /// Check that the error is thrown when the libomptarget bitcode library does not exist. -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ // RUN: -Xopenmp-target -march=sm_35 --cuda-path=%S/Inputs/CUDA_102/usr/local/cuda \ // RUN: --libomptarget-nvptx-bc-path=not-exist.bc \ // RUN: -fopenmp-relocatable-target -save-temps %s 2>&1 \ @@ -124,7 +124,7 @@ /// ########################################################################### /// Check that the error is thrown when CUDA 9.1 or lower version is used. -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ // RUN: -Xopenmp-target -march=sm_35 --cuda-path=%S/Inputs/CUDA_90/usr/local/cuda \ // RUN: -fopenmp-relocatable-target -save-temps %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-CUDA-VERSION-ERROR %s @@ -132,17 +132,17 @@ // CHK-CUDA-VERSION-ERROR: NVPTX target requires CUDA 9.2 or above; CUDA 9.0 detected /// Check that debug info is emitted in dwarf-2 -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O1 --no-cuda-noopt-device-debug 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O1 --no-cuda-noopt-device-debug 2>&1 \ // RUN: | FileCheck -check-prefix=DEBUG_DIRECTIVES %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O3 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O3 2>&1 \ // RUN: | FileCheck -check-prefix=DEBUG_DIRECTIVES %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O3 --no-cuda-noopt-device-debug 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O3 --no-cuda-noopt-device-debug 2>&1 \ // RUN: | FileCheck -check-prefix=DEBUG_DIRECTIVES %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g0 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g0 2>&1 \ // RUN: | FileCheck -check-prefix=NO_DEBUG %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb0 -O3 --cuda-noopt-device-debug 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb0 -O3 --cuda-noopt-device-debug 2>&1 \ // RUN: | FileCheck -check-prefix=NO_DEBUG %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -gline-directives-only 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -gline-directives-only 2>&1 \ // RUN: | FileCheck -check-prefix=DEBUG_DIRECTIVES %s // DEBUG_DIRECTIVES-NOT: warning: debug @@ -156,25 +156,25 @@ // DEBUG_DIRECTIVES: ptxas // DEBUG_DIRECTIVES: "-lineinfo" -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O0 --no-cuda-noopt-device-debug 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O0 --no-cuda-noopt-device-debug 2>&1 \ // RUN: | FileCheck -check-prefix=HAS_DEBUG %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g 2>&1 \ // RUN: | FileCheck -check-prefix=HAS_DEBUG %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O0 --cuda-noopt-device-debug 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O0 --cuda-noopt-device-debug 2>&1 \ // RUN: | FileCheck -check-prefix=HAS_DEBUG %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O3 --cuda-noopt-device-debug 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g -O3 --cuda-noopt-device-debug 2>&1 \ // RUN: | FileCheck -check-prefix=HAS_DEBUG %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g2 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g2 2>&1 \ // RUN: | FileCheck -check-prefix=HAS_DEBUG %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb2 -O0 --cuda-noopt-device-debug 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb2 -O0 --cuda-noopt-device-debug 2>&1 \ // RUN: | FileCheck -check-prefix=HAS_DEBUG %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g3 -O3 --cuda-noopt-device-debug 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -g3 -O3 --cuda-noopt-device-debug 2>&1 \ // RUN: | FileCheck -check-prefix=HAS_DEBUG %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb3 -O2 --cuda-noopt-device-debug 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb3 -O2 --cuda-noopt-device-debug 2>&1 \ // RUN: | FileCheck -check-prefix=HAS_DEBUG %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -gline-tables-only 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -gline-tables-only 2>&1 \ // RUN: | FileCheck -check-prefix=HAS_DEBUG %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb1 -O2 --cuda-noopt-device-debug 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -ggdb1 -O2 --cuda-noopt-device-debug 2>&1 \ // RUN: | FileCheck -check-prefix=HAS_DEBUG %s // HAS_DEBUG-NOT: warning: debug @@ -187,43 +187,43 @@ // HAS_DEBUG-SAME: "--dont-merge-basicblocks" // HAS_DEBUG-SAME: "--return-at-end" -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-mode 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-mode 2>&1 \ // RUN: | FileCheck -check-prefix=CUDA_MODE %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fno-openmp-cuda-mode -fopenmp-cuda-mode 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fno-openmp-cuda-mode -fopenmp-cuda-mode 2>&1 \ // RUN: | FileCheck -check-prefix=CUDA_MODE %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target -march=gfx906 %s -fopenmp-cuda-mode 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target -march=gfx906 %s -fopenmp-cuda-mode 2>&1 \ // RUN: | FileCheck -check-prefix=CUDA_MODE %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target -march=gfx906 %s -fno-openmp-cuda-mode -fopenmp-cuda-mode 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target -march=gfx906 %s -fno-openmp-cuda-mode -fopenmp-cuda-mode 2>&1 \ // RUN: | FileCheck -check-prefix=CUDA_MODE %s // CUDA_MODE: "-cc1"{{.*}}"-triple" "{{nvptx64-nvidia-cuda|amdgcn-amd-amdhsa}}" // CUDA_MODE-SAME: "-fopenmp-cuda-mode" -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fno-openmp-cuda-mode 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fno-openmp-cuda-mode 2>&1 \ // RUN: | FileCheck -check-prefix=NO_CUDA_MODE %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-mode -fno-openmp-cuda-mode 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-mode -fno-openmp-cuda-mode 2>&1 \ // RUN: | FileCheck -check-prefix=NO_CUDA_MODE %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target -march=gfx906 %s -fno-openmp-cuda-mode 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target -march=gfx906 %s -fno-openmp-cuda-mode 2>&1 \ // RUN: | FileCheck -check-prefix=NO_CUDA_MODE %s -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target -march=gfx906 %s -fopenmp-cuda-mode -fno-openmp-cuda-mode 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=amdgcn-amd-amdhsa -Xopenmp-target -march=gfx906 %s -fopenmp-cuda-mode -fno-openmp-cuda-mode 2>&1 \ // RUN: | FileCheck -check-prefix=NO_CUDA_MODE %s // NO_CUDA_MODE-NOT: "-{{fno-|f}}openmp-cuda-mode" -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-teams-reduction-recs-num=2048 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda -Xopenmp-target -march=sm_60 %s -fopenmp-cuda-teams-reduction-recs-num=2048 2>&1 \ // RUN: | FileCheck -check-prefix=CUDA_RED_RECS %s // CUDA_RED_RECS: "-cc1"{{.*}}"-triple" "nvptx64-nvidia-cuda" // CUDA_RED_RECS-SAME: "-fopenmp-cuda-teams-reduction-recs-num=2048" -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda %s 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda %s 2>&1 \ // RUN: | FileCheck -check-prefix=OPENMP_NVPTX_WRAPPERS %s // OPENMP_NVPTX_WRAPPERS: "-cc1"{{.*}}"-triple" "nvptx64-nvidia-cuda" // OPENMP_NVPTX_WRAPPERS-SAME: "-internal-isystem" "{{.*}}openmp_wrappers" -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ // RUN: -save-temps -ccc-print-bindings %s -o openmp-offload-gpu 2>&1 \ // RUN: | FileCheck -check-prefix=SAVE_TEMPS_NAMES %s // SAVE_TEMPS_NAMES-NOT: "GNU::Linker"{{.*}}["[[SAVE_TEMPS_INPUT1:.*\.o]]", "[[SAVE_TEMPS_INPUT1]]"] -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64 -Xopenmp-target=nvptx64 -march=sm_35 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64 -Xopenmp-target=nvptx64 -march=sm_35 \ // RUN: -save-temps %s -o openmp-offload-gpu 2>&1 \ // RUN: | FileCheck -check-prefix=TRIPLE %s @@ -326,13 +326,13 @@ // CHECK-HOST-ONLY: "x86_64-unknown-linux-gnu" - "clang", inputs: ["[[INPUT:.*]]"], output: "[[OUTPUT:.*]]" // CHECK-HOST-ONLY: "x86_64-unknown-linux-gnu" - "Offload::Linker", inputs: ["[[OUTPUT]]"], output: "a.out" -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ // RUN: --offload-device-only -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-DEVICE-ONLY // CHECK-DEVICE-ONLY: "x86_64-unknown-linux-gnu" - "clang", inputs: ["[[INPUT:.*]]"], output: "[[HOST_BC:.*]]" // CHECK-DEVICE-ONLY: "nvptx64-nvidia-cuda" - "clang", inputs: ["[[INPUT]]", "[[HOST_BC]]"], output: "[[DEVICE_ASM:.*]]" // CHECK-DEVICE-ONLY: "nvptx64-nvidia-cuda" - "NVPTX::Assembler", inputs: ["[[DEVICE_ASM]]"], output: "{{.*}}-openmp-nvptx64-nvidia-cuda.o" -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda \ // RUN: --offload-device-only -E -nogpulib %s 2>&1 | FileCheck %s --check-prefix=CHECK-DEVICE-ONLY-PP // CHECK-DEVICE-ONLY-PP: "nvptx64-nvidia-cuda" - "clang", inputs: ["[[INPUT:.*]]"], output: "-" @@ -341,7 +341,7 @@ // CHECK-LTO-LIBRARY: {{.*}}-lomptarget{{.*}}-lomptarget.devicertl -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp --offload-arch=sm_52 \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp --offload-arch=sm_52 \ // RUN: %s 2>&1 | FileCheck --check-prefix=CHECK-NO-LTO-LIBRARY %s // CHECK-NO-LTO-LIBRARY: {{.*}}-lomptarget{{.*}}-lomptarget.devicertl @@ -371,7 +371,7 @@ // // Check that `-Xarch_host` works for OpenMP offloading. // -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp \ // RUN: -fopenmp-targets=nvptx64-nvidia-cuda -Xarch_host -O3 %s 2>&1 \ // RUN: | FileCheck --check-prefix=XARCH-HOST %s // XARCH-HOST: "-cc1" "-triple" "x86_64-unknown-linux-gnu"{{.*}}"-O3" @@ -380,7 +380,7 @@ // // Check that `-Xarch_device` works for OpenMP offloading. // -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp \ // RUN: -fopenmp-targets=nvptx64-nvidia-cuda -Xarch_device -O3 %s 2>&1 \ // RUN: | FileCheck --check-prefix=XARCH-DEVICE %s // XARCH-DEVICE: "-cc1" "-triple" "nvptx64-nvidia-cuda"{{.*}}"-O3" diff --git a/clang/test/Driver/openmp-offload-infer.c b/clang/test/Driver/openmp-offload-infer.c --- a/clang/test/Driver/openmp-offload-infer.c +++ b/clang/test/Driver/openmp-offload-infer.c @@ -2,7 +2,7 @@ // REQUIRES: nvptx-registered-target // REQUIRES: amdgpu-registered-target -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp \ // RUN: --offload-arch=sm_52 --offload-arch=gfx803 \ // RUN: --libomptarget-amdgpu-bc-path=%S/Inputs/hip_dev_lib/libomptarget-amdgpu-gfx803.bc \ // RUN: --libomptarget-nvptx-bc-path=%S/Inputs/libomptarget/libomptarget-nvptx-test.bc %s 2>&1 \ @@ -39,7 +39,7 @@ // CHECK-ARCH-BINDINGS: "x86_64-unknown-linux-gnu" - "clang", inputs: ["[[HOST_BC]]", "[[BINARY]]"], output: "[[HOST_OBJ:.*]]" // CHECK-ARCH-BINDINGS: "x86_64-unknown-linux-gnu" - "Offload::Linker", inputs: ["[[HOST_OBJ]]"], output: "a.out" -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp=libomp \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp=libomp \ // RUN: --offload-arch=sm_70 --offload-arch=gfx908 --offload-arch=native \ // RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-bindings -fopenmp \ // RUN: --offload-arch=sm_70 --offload-arch=gfx908 --offload-arch=skylake \ diff --git a/clang/test/Driver/openmp-offload-jit.c b/clang/test/Driver/openmp-offload-jit.c --- a/clang/test/Driver/openmp-offload-jit.c +++ b/clang/test/Driver/openmp-offload-jit.c @@ -16,7 +16,7 @@ // RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-phases -fopenmp=libomp \ // RUN: -fopenmp-targets=amdgcn-amd-amdhsa -foffload-lto -fopenmp-target-jit %s 2>&1 \ // RUN: | FileCheck -check-prefix=PHASES-JIT %s -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-phases -fopenmp=libomp \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -ccc-print-phases -fopenmp=libomp \ // RUN: -fopenmp-targets=amdgcn-amd-amdhsa -fno-offload-lto -fopenmp-target-jit %s 2>&1 \ // RUN: | FileCheck -check-prefix=PHASES-JIT %s // @@ -36,19 +36,19 @@ // PHASES-JIT-NEXT: 13: clang-linker-wrapper, {12}, image, (host-openmp) // Check that we add the `--embed-bitcode` flag to the linker wrapper. -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp \ // RUN: -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-target-jit %s 2>&1 \ // RUN: | FileCheck -check-prefix=LINKER %s // LINKER: clang-linker-wrapper"{{.*}}"--embed-bitcode" // Check for incompatible combinations -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -fno-offload-lto \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -fno-offload-lto \ // RUN: -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-target-jit %s 2>&1 \ // RUN: | FileCheck -check-prefix=NO-LTO %s // NO-LTO: error: the combination of '-fno-offload-lto' and '-fopenmp-target-jit' is incompatible -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -foffload-lto=thin \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fopenmp=libomp -foffload-lto=thin \ // RUN: -fopenmp-targets=nvptx64-nvidia-cuda -fopenmp-target-jit %s 2>&1 \ // RUN: | FileCheck -check-prefix=THIN-LTO %s // THIN-LTO: error: the combination of '-foffload-lto=' and '-fopenmp-target-jit' is incompatible diff --git a/clang/test/Driver/openmp-offload.c b/clang/test/Driver/openmp-offload.c --- a/clang/test/Driver/openmp-offload.c +++ b/clang/test/Driver/openmp-offload.c @@ -9,7 +9,7 @@ /// ########################################################################### /// Check whether an invalid OpenMP target is specified: -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=aaa-bbb-ccc-ddd %s 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=aaa-bbb-ccc-ddd %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-INVALID-TARGET %s // CHK-INVALID-TARGET: error: OpenMP target is invalid: 'aaa-bbb-ccc-ddd' @@ -23,9 +23,9 @@ /// ########################################################################### /// Check error for no -fopenmp option -// RUN: %clang -### -fopenmp-targets=powerpc64le-ibm-linux-gnu %s 2>&1 \ +// RUN: not %clang -### -fopenmp-targets=powerpc64le-ibm-linux-gnu %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-NO-FOPENMP %s -// RUN: %clang -### -fopenmp=libgomp -fopenmp-targets=powerpc64le-ibm-linux-gnu %s 2>&1 \ +// RUN: not %clang -### -fopenmp=libgomp -fopenmp-targets=powerpc64le-ibm-linux-gnu %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-NO-FOPENMP %s // CHK-NO-FOPENMP: error: '-fopenmp-targets' must be used in conjunction with a '-fopenmp' option compatible with offloading; e.g., '-fopenmp=libomp' or '-fopenmp=libiomp5' @@ -63,7 +63,7 @@ /// ########################################################################## /// Check -march=pwr7 is NOT passed to nvptx64-nvidia-cuda. -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda --target=powerpc64le-ibm-linux-gnu -march=pwr7 %s 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda --target=powerpc64le-ibm-linux-gnu -march=pwr7 %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-FOPENMP-MARCH-TO-GPU %s // CHK-FOPENMP-MARCH-TO-GPU-NOT: clang{{.*}} "-target-cpu" "pwr7" {{.*}}"-fopenmp-is-target-device" @@ -71,7 +71,7 @@ /// ########################################################################### /// Check -march=pwr7 is NOT passed to x86_64-unknown-linux-gnu. -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=x86_64-unknown-linux-gnu --target=powerpc64le-ibm-linux-gnu -march=pwr7 %s 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=x86_64-unknown-linux-gnu --target=powerpc64le-ibm-linux-gnu -march=pwr7 %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-FOPENMP-MARCH-TO-X86 %s // CHK-FOPENMP-MARCH-TO-X86-NOT: clang{{.*}} "-target-cpu" "pwr7" {{.*}}"-fopenmp-is-target-device" @@ -79,7 +79,7 @@ /// ########################################################################### /// Check -Xopenmp-target triggers error when multiple triples are used. -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu,powerpc64le-unknown-linux-gnu -Xopenmp-target -mcpu=pwr8 %s 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu,powerpc64le-unknown-linux-gnu -Xopenmp-target -mcpu=pwr8 %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-AMBIGUOUS-ERROR %s // CHK-FOPENMP-TARGET-AMBIGUOUS-ERROR: clang{{.*}} error: cannot deduce implicit triple value for -Xopenmp-target, specify triple using -Xopenmp-target= @@ -87,7 +87,7 @@ /// ########################################################################### /// Check -Xopenmp-target triggers error when an option requiring arguments is passed to it. -// RUN: %clang -### -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target -Xopenmp-target -mcpu=pwr8 %s 2>&1 \ +// RUN: not %clang -### -fopenmp=libomp -fopenmp-targets=powerpc64le-ibm-linux-gnu -Xopenmp-target -Xopenmp-target -mcpu=pwr8 %s 2>&1 \ // RUN: | FileCheck -check-prefix=CHK-FOPENMP-TARGET-NESTED-ERROR %s // CHK-FOPENMP-TARGET-NESTED-ERROR: clang{{.*}} error: invalid -Xopenmp-target argument: '-Xopenmp-target -Xopenmp-target', options requiring arguments are unsupported diff --git a/clang/test/Driver/openmp-system-arch.c b/clang/test/Driver/openmp-system-arch.c --- a/clang/test/Driver/openmp-system-arch.c +++ b/clang/test/Driver/openmp-system-arch.c @@ -19,16 +19,16 @@ // RUN: chmod +x %t/nvptx_arch_empty // case when nvptx-arch and amdgpu-arch return nothing or fails -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -fopenmp=libomp --offload-arch=native \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -fopenmp=libomp --offload-arch=native \ // RUN: --nvptx-arch-tool=%t/nvptx_arch_fail --amdgpu-arch-tool=%t/amdgpu_arch_fail %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=NO-OUTPUT-ERROR -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -fopenmp=libomp --offload-arch=native \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -fopenmp=libomp --offload-arch=native \ // RUN: --nvptx-arch-tool=%t/nvptx_arch_empty --amdgpu-arch-tool=%t/amdgpu_arch_empty %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=NO-OUTPUT-ERROR -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -fopenmp=libomp --offload-arch= \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -fopenmp=libomp --offload-arch= \ // RUN: --nvptx-arch-tool=%t/nvptx_arch_fail --amdgpu-arch-tool=%t/amdgpu_arch_fail %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=NO-OUTPUT-ERROR -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -fopenmp=libomp --offload-arch= \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -fopenmp=libomp --offload-arch= \ // RUN: --nvptx-arch-tool=%t/nvptx_arch_empty --amdgpu-arch-tool=%t/amdgpu_arch_empty %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=NO-OUTPUT-ERROR // NO-OUTPUT-ERROR: error: failed to deduce triple for target architecture 'native'; specify the triple using '-fopenmp-targets' and '-Xopenmp-target' instead. @@ -68,13 +68,13 @@ // ARCH-MULTIPLE: "-cc1" "-triple" "nvptx64-nvidia-cuda"{{.*}}"-target-cpu" "sm_75" // case when 'nvptx-arch' returns nothing using `-fopenmp-targets=`. -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -fopenmp=libomp \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -fopenmp=libomp \ // RUN: -fopenmp-targets=nvptx64-nvidia-cuda --nvptx-arch-tool=%t/nvptx_arch_empty %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=NVPTX // NVPTX: error: cannot determine nvptx64 architecture: No NVIDIA GPU detected in the system; consider passing it via '-march' // case when 'amdgpu-arch' returns nothing using `-fopenmp-targets=`. -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -fopenmp=libomp \ +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -nogpulib -fopenmp=libomp \ // RUN: -fopenmp-targets=amdgcn-amd-amdhsa --amdgpu-arch-tool=%t/amdgpu_arch_empty %s 2>&1 \ // RUN: | FileCheck %s --check-prefix=AMDGPU // AMDGPU: error: cannot determine amdgcn architecture: No AMD GPU detected in the system; consider passing it via '-march' diff --git a/clang/test/Driver/p.c b/clang/test/Driver/p.c --- a/clang/test/Driver/p.c +++ b/clang/test/Driver/p.c @@ -1,5 +1,5 @@ /// For most targets -p is legacy. We used to report -Wunused-command-line-argument. -// RUN: %clang -### --target=x86_64-unknown-linux-gnu -c -p %s 2>&1 | FileCheck %s --check-prefix=ERR +// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -c -p %s 2>&1 | FileCheck %s --check-prefix=ERR // RUN: %clang -### --target=x86_64-unknown-openbsd -c -p %s 2>&1 | FileCheck %s --implicit-check-not=error: // RUN: %clang -### --target=powerpc64-ibm-aix -c -p %s 2>&1 | FileCheck %s --implicit-check-not=error: diff --git a/clang/test/Driver/pic.c b/clang/test/Driver/pic.c --- a/clang/test/Driver/pic.c +++ b/clang/test/Driver/pic.c @@ -320,7 +320,7 @@ // RUN: -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PIC-DATA-TEXT-REL // RUN: %clang -fpic -c --target=s390x-linux-gnu -mpic-data-is-text-relative %s -### \ // RUN: 2>&1 | FileCheck %s --check-prefix=CHECK-PIC-DATA-TEXT-REL -// RUN: %clang -fpic -c --target=arm-arm-none-eabi -mno-pic-data-is-text-relative %s \ +// RUN: not %clang -fpic -c --target=arm-arm-none-eabi -mno-pic-data-is-text-relative %s \ // RUN: -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PIC-DATA-TEXT-REL-NON-SYSTEMZ -// RUN: %clang -fpic -c --target=arm-arm-none-eabi -mpic-data-is-text-relative %s \ +// RUN: not %clang -fpic -c --target=arm-arm-none-eabi -mpic-data-is-text-relative %s \ // RUN: -### 2>&1 | FileCheck %s --check-prefix=CHECK-PIC-DATA-TEXT-REL-NON-SYSTEMZ diff --git a/clang/test/Driver/ppc-cpus.c b/clang/test/Driver/ppc-cpus.c --- a/clang/test/Driver/ppc-cpus.c +++ b/clang/test/Driver/ppc-cpus.c @@ -41,5 +41,5 @@ // // GENERIC: "-target-cpu" "ppc64" -// RUN: %clang -### -c --target=powerpc64 %s -march=generic 2>&1 | FileCheck --check-prefix=MARCH %s +// RUN: not %clang -### -c --target=powerpc64 %s -march=generic 2>&1 | FileCheck --check-prefix=MARCH %s // MARCH: error: unsupported option '-march=' for target 'powerpc64' diff --git a/clang/test/Driver/ppc-roptr.c b/clang/test/Driver/ppc-roptr.c --- a/clang/test/Driver/ppc-roptr.c +++ b/clang/test/Driver/ppc-roptr.c @@ -17,20 +17,20 @@ // RUN: %clang -### --target=powerpc64-ibm-aix-xcoff -mxcoff-roptr %t.o 2>&1 | \ // RUN: FileCheck %s --check-prefix=LINK -// RUN: %clang -### --target=powerpc64le-unknown-linux-gnu -mxcoff-roptr \ +// RUN: not %clang -### --target=powerpc64le-unknown-linux-gnu -mxcoff-roptr \ // RUN: %s 2>&1 | FileCheck %s --check-prefix=TARGET_ROPTR_ERR -// RUN: %clang -### --target=powerpc64le-unknown-linux-gnu -mno-xcoff-roptr \ +// RUN: not %clang -### --target=powerpc64le-unknown-linux-gnu -mno-xcoff-roptr \ // RUN: %s 2>&1 | FileCheck %s --check-prefix=TARGET_NOROPTR_ERR // RUN: touch %t.o -// RUN: %clang -### --target=powerpc64-ibm-aix-xcoff -mxcoff-roptr -shared \ +// RUN: not %clang -### --target=powerpc64-ibm-aix-xcoff -mxcoff-roptr -shared \ // RUN: %t.o 2>&1 | FileCheck %s --check-prefix=SHARED_ERR -// RUN: %clang -### --target=powerpc64le-unknown-linux-gnu -mxcoff-roptr -flto \ +// RUN: not %clang -### --target=powerpc64le-unknown-linux-gnu -mxcoff-roptr -flto \ // RUN: %t.o 2>&1 | FileCheck %s --check-prefix=TARGET_ROPTR_ERR -// RUN: %clang -### --target=powerpc64-ibm-aix-xcoff -mxcoff-roptr -flto -fno-data-sections \ +// RUN: not %clang -### --target=powerpc64-ibm-aix-xcoff -mxcoff-roptr -flto -fno-data-sections \ // RUN: %t.o 2>&1 | FileCheck %s --check-prefix=DATA_SECTION_ERR // RUN: %clang -### --target=powerpc64-ibm-aix-xcoff -mno-xcoff-roptr -flto -fno-data-sections \ // RUN: %t.o 2>&1 | FileCheck %s --check-prefix=NO_DATA_SECTION_ERR -// RUN: %clang -### --target=powerpc64le-unknown-linux-gnu -mno-xcoff-roptr -flto \ +// RUN: not %clang -### --target=powerpc64le-unknown-linux-gnu -mno-xcoff-roptr -flto \ // RUN: %t.o 2>&1 | FileCheck %s --check-prefix=TARGET_NOROPTR_ERR // DATA_SECTION_ERR: error: -mxcoff-roptr is supported only with -fdata-sections diff --git a/clang/test/Driver/preserve-uselistorder.c b/clang/test/Driver/preserve-uselistorder.c --- a/clang/test/Driver/preserve-uselistorder.c +++ b/clang/test/Driver/preserve-uselistorder.c @@ -1,4 +1,4 @@ -// RUN: %clang -target x86_64-apple-darwin -emit-llvm -arch x86_64 %s -### 2>&1 \ +// RUN: not %clang -target x86_64-apple-darwin -emit-llvm -arch x86_64 %s -### 2>&1 \ // RUN: | FileCheck %s // CHECK: "-emit-llvm-bc" // CHECK: "-emit-llvm-uselists" diff --git a/clang/test/Driver/response-file-errs.c b/clang/test/Driver/response-file-errs.c --- a/clang/test/Driver/response-file-errs.c +++ b/clang/test/Driver/response-file-errs.c @@ -4,12 +4,12 @@ // If response file does not exist, '@file; directive remains unexpanded in // command line. // -// RUN: %clang @%S/Inputs/inexistent.rsp -### 2>&1 | FileCheck --check-prefix=INEXISTENT %s +// RUN: not %clang @%S/Inputs/inexistent.rsp -### 2>&1 | FileCheck --check-prefix=INEXISTENT %s // INEXISTENT: @{{.*}}Inputs/inexistent.rsp // As the above case but '@file' is in response file. // -// RUN: %clang @%S/Inputs/inc-inexistent.rsp -### 2>&1 | FileCheck --check-prefix=INEXISTENT2 %s +// RUN: not %clang @%S/Inputs/inc-inexistent.rsp -### 2>&1 | FileCheck --check-prefix=INEXISTENT2 %s // INEXISTENT2: @{{.*}}inexistent.txt // If file in `@file` is a directory, it is an error. diff --git a/clang/test/Driver/riscv-abi.c b/clang/test/Driver/riscv-abi.c --- a/clang/test/Driver/riscv-abi.c +++ b/clang/test/Driver/riscv-abi.c @@ -60,7 +60,7 @@ // CHECK-LP64: "-target-abi" "lp64" -// RUN: %clang --target=riscv64-unknown-elf %s -### -march=rv64f -mabi=lp64f 2>&1 \ +// RUN: not %clang --target=riscv64-unknown-elf %s -### -march=rv64f -mabi=lp64f 2>&1 \ // RUN: | FileCheck -check-prefix=CHECK-LP64F %s // CHECK-LP64F: "-target-abi" "lp64f" diff --git a/clang/test/Driver/riscv-arch.c b/clang/test/Driver/riscv-arch.c --- a/clang/test/Driver/riscv-arch.c +++ b/clang/test/Driver/riscv-arch.c @@ -140,11 +140,11 @@ // CHECK-NOT: error: invalid arch name ' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32 -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32 -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32 %s // RV32: error: invalid arch name 'rv32' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32m -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32m -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32M %s // RV32M: error: invalid arch name 'rv32m' @@ -152,27 +152,27 @@ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32ID %s // RV32ID: "-target-feature" "+f" "-target-feature" "+d" -// RUN: %clang --target=riscv32-unknown-elf -march=rv32l -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32l -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32L %s // RV32L: error: invalid arch name 'rv32l' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32imadf -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32imadf -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32IMADF %s // RV32IMADF: error: invalid arch name 'rv32imadf' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32imm -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32imm -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32IMM %s // RV32IMM: error: invalid arch name 'rv32imm' -// RUN: %clang --target=riscv32-unknown-elf -march=RV32I -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=RV32I -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32I-UPPER %s // RV32I-UPPER: error: invalid arch name 'RV32I' -// RUN: %clang --target=riscv64-unknown-elf -march=rv64 -### %s \ +// RUN: not %clang --target=riscv64-unknown-elf -march=rv64 -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64 %s // RV64: error: invalid arch name 'rv64' -// RUN: %clang --target=riscv64-unknown-elf -march=rv64m -### %s \ +// RUN: not %clang --target=riscv64-unknown-elf -march=rv64m -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64M %s // RV64M: error: invalid arch name 'rv64m' @@ -180,162 +180,162 @@ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64ID %s // RV64ID: "-target-feature" "+f" "-target-feature" "+d" -// RUN: %clang --target=riscv64-unknown-elf -march=rv64l -### %s \ +// RUN: not %clang --target=riscv64-unknown-elf -march=rv64l -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64L %s // RV64L: error: invalid arch name 'rv64l' -// RUN: %clang --target=riscv64-unknown-elf -march=rv64imadf -### %s \ +// RUN: not %clang --target=riscv64-unknown-elf -march=rv64imadf -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64IMADF %s // RV64IMADF: error: invalid arch name 'rv64imadf' -// RUN: %clang --target=riscv64-unknown-elf -march=rv64imm -### %s \ +// RUN: not %clang --target=riscv64-unknown-elf -march=rv64imm -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64IMM %s // RV64IMM: error: invalid arch name 'rv64imm' -// RUN: %clang --target=riscv64-unknown-elf -march=RV64I -### %s \ +// RUN: not %clang --target=riscv64-unknown-elf -march=RV64I -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV64I-UPPER %s // RV64I-UPPER: error: invalid arch name 'RV64I' // Testing specific messages and unsupported extensions. -// RUN: %clang --target=riscv32-unknown-elf -march=rv32imC -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32imC -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-LOWER %s // RV32-LOWER: error: invalid arch name 'rv32imC', // RV32-LOWER: string must be lowercase -// RUN: %clang --target=riscv32-unknown-elf -march=unknown -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=unknown -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-STR %s // RV32-STR: error: invalid arch name 'unknown', // RV32-STR: string must begin with rv32{i,e,g} or rv64{i,e,g} -// RUN: %clang --target=riscv32-unknown-elf -march=rv32q -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32q -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-LETTER %s // RV32-LETTER: error: invalid arch name 'rv32q', // RV32-LETTER: first letter should be 'e', 'i' or 'g' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32imcq -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32imcq -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ORDER %s // RV32-ORDER: error: invalid arch name 'rv32imcq', // RV32-ORDER: standard user-level extension not given in canonical order 'q' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32izvl64b -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izvl64b -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZVL64B-ER %s // RV32-ZVL64B-ER: error: invalid arch name 'rv32izvl64b', // RV32-ZVL64B-ER: 'zvl*b' requires 'v' or 'zve*' extension to also be specified -// RUN: %clang --target=riscv32-unknown-elf -march=rv32imw -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32imw -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-STD-INVAL %s // RV32-STD-INVAL: error: invalid arch name 'rv32imw', // RV32-STD-INVAL: invalid standard user-level extension 'w' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32imqc -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32imqc -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-STD %s // RV32-STD: error: invalid arch name 'rv32imqc', // RV32-STD: unsupported standard user-level extension 'q' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32ib -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ib -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-B %s // RV32-B: error: invalid arch name 'rv32ib', // RV32-B: unsupported standard user-level extension 'b' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32xabc -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32xabc -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32X %s // RV32X: error: invalid arch name 'rv32xabc', // RV32X: first letter should be 'e', 'i' or 'g' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32sabc -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32sabc -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32S %s // RV32S: error: invalid arch name 'rv32sabc', // RV32S: first letter should be 'e', 'i' or 'g' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32ix -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ix -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32X-NAME %s // RV32X-NAME: error: invalid arch name 'rv32ix', // RV32X-NAME: non-standard user-level extension name missing after 'x' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32is -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32is -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32S-NAME %s // RV32S-NAME: error: invalid arch name 'rv32is', // RV32S-NAME: standard supervisor-level extension // RV32S-NAME: name missing after 's' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32ix_s -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ix_s -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32ALL-NAME %s // RV32ALL-NAME: error: invalid arch name 'rv32ix_s', // RV32ALL-NAME: non-standard user-level extension // RV32ALL-NAME: name missing after 'x' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixabc -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ixabc -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32X-UNS %s // RV32X-UNS: error: invalid arch name 'rv32ixabc', // RV32X-UNS: unsupported non-standard user-level extension 'xabc' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32isa -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32isa -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32S-UNS %s // RV32S-UNS: error: invalid arch name 'rv32isa', // RV32S-UNS: unsupported standard supervisor-level extension 'sa' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32isp_xabc -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32isp_xabc -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32ALL %s // RV32ALL: error: invalid arch name 'rv32isp_xabc', // RV32ALL: unsupported standard supervisor-level extension 'sp' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32i20 -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32i20 -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-IVER %s // RV32-IVER: error: invalid arch name 'rv32i20', unsupported // RV32-IVER: version number 20 for extension 'i' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32imc5 -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32imc5 -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-CVER %s // RV32-CVER: error: invalid arch name 'rv32imc5', unsupported // RV32-CVER: version number 5 for extension 'c' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32i2p -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32i2p -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-IMINOR-MISS %s // RV32-IMINOR-MISS: error: invalid arch name 'rv32i2p', // RV32-IMINOR-MISS: minor version number missing after 'p' for extension 'i' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32i2p2 -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32i2p2 -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-IMINOR1 %s // RV32-IMINOR1: error: invalid arch name 'rv32i2p2', unsupported // RV32-IMINOR1: version number 2.2 for extension 'i' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixt2p -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ixt2p -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-XMINOR-MISS %s // RV32-XMINOR-MISS: error: invalid arch name 'rv32ixt2p', // RV32-XMINOR-MISS: minor version number missing after 'p' for extension 'xt' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32ist2p0 -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ist2p0 -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-SMINOR0 %s // RV32-SMINOR0: error: invalid arch name 'rv32ist2p0', // RV32-SMINOR0: unsupported version number 2.0 for extension 'st' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixabc_ -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ixabc_ -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-XSEP %s // RV32-XSEP: error: invalid arch name 'rv32ixabc_', // RV32-XSEP: extension name missing after separator '_' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixabc_a -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ixabc_a -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-PREFIX %s // RV32-PREFIX: error: invalid arch name 'rv32ixabc_a', // RV32-PREFIX: invalid extension prefix 'a' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixdef_sabc -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ixdef_sabc -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-X-ORDER %s // RV32-X-ORDER: error: invalid arch name 'rv32ixdef_sabc', // RV32-X-ORDER unsupported non-standard user-level extension 'xdef' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixabc_xabc -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ixabc_xabc -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-XDUP %s // RV32-XDUP: error: invalid arch name 'rv32ixabc_xabc', // RV32-XDUP: duplicated non-standard user-level extension 'xabc' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32ixabc_xdef -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ixabc_xdef -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-X-X-INVAL %s // RV32-X-X-INVAL: error: invalid arch name 'rv32ixabc_xdef', unsupported // RV32-X-X-INVAL: non-standard user-level extension 'xabc' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32isdef_xabc -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32isdef_xabc -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-X-S-INVAL %s // RV32-X-S-INVAL: error: invalid arch name 'rv32isdef_xabc', // RV32-X-S-INVAL: unsupported standard supervisor-level extension 'sdef' @@ -372,17 +372,17 @@ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZFHMIN %s // RV32-ZFHMIN: "-target-feature" "+zfhmin" -// RUN: %clang --target=riscv32-unknown-elf -march=rv32izfa -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izfa -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-NOFLAG %s // RV32-EXPERIMENTAL-NOFLAG: error: invalid arch name 'rv32izfa' // RV32-EXPERIMENTAL-NOFLAG: requires '-menable-experimental-extensions' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32izfa -menable-experimental-extensions -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izfa -menable-experimental-extensions -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-NOVERS %s // RV32-EXPERIMENTAL-NOVERS: error: invalid arch name 'rv32izfa' // RV32-EXPERIMENTAL-NOVERS: experimental extension requires explicit version number -// RUN: %clang --target=riscv32-unknown-elf -march=rv32izfa0p1 -menable-experimental-extensions -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izfa0p1 -menable-experimental-extensions -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-BADVERS %s // RV32-EXPERIMENTAL-BADVERS: error: invalid arch name 'rv32izfa0p1' // RV32-EXPERIMENTAL-BADVERS: unsupported version number 0.1 for experimental extension 'zfa' (this compiler supports 0.2) @@ -397,7 +397,7 @@ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBB %s // RV32-ZBB: "-target-feature" "+zbb" -// RUN: %clang --target=riscv32-unknown-elf -march=rv32izbb1p0zbs1p0 -menable-experimental-extensions -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izbb1p0zbs1p0 -menable-experimental-extensions -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-EXPERIMENTAL-ZBB-ZBS-UNDERSCORE %s // RV32-EXPERIMENTAL-ZBB-ZBS-UNDERSCORE: error: invalid arch name 'rv32izbb1p0zbs1p0', unsupported version number 1.0 for extension 'zbb1p0zbs' @@ -407,7 +407,7 @@ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZBA %s // RV32-ZBA: "-target-feature" "+zba" -// RUN: %clang --target=riscv32-unknown-elf -march=rv32iv0p1 -### %s -c 2>&1 | \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32iv0p1 -### %s -c 2>&1 | \ // RUN: FileCheck -check-prefix=RV32-V-BADVERS %s // RV32-V-BADVERS: error: invalid arch name 'rv32iv0p1' // RV32-V-BADVERS: unsupported version number 0.1 for extension 'v' @@ -416,7 +416,7 @@ // RUN: FileCheck -check-prefix=RV32-V-GOODVERS %s // RV32-V-GOODVERS: "-target-feature" "+v" -// RUN: %clang --target=riscv32-unknown-elf -march=rv32iv1p0_zvl32b0p1 -### %s -c 2>&1 | \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32iv1p0_zvl32b0p1 -### %s -c 2>&1 | \ // RUN: FileCheck -check-prefix=RV32-ZVL-BADVERS %s // RV32-ZVL-BADVERS: error: invalid arch name 'rv32iv1p0_zvl32b0p1' // RV32-ZVL-BADVERS: unsupported version number 0.1 for extension 'zvl32b' @@ -477,7 +477,7 @@ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=CHECK-RV32-ZFHMIN %s // CHECK-RV32-ZFHMIN: "-target-feature" "+zfhmin" -// RUN: %clang --target=riscv32-unknown-elf -march=rv32izve32x0p1 -### %s -c 2>&1 | \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izve32x0p1 -### %s -c 2>&1 | \ // RUN: FileCheck -check-prefix=RV32-ZVE32X-BADVERS %s // RV32-ZVE32X-BADVERS: error: invalid arch name 'rv32izve32x0p1' // RV32-ZVE32X-BADVERS: unsupported version number 0.1 for extension 'zve32x' @@ -518,12 +518,12 @@ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZHINX-GOOD %s // RV32-ZHINX-GOOD: "-target-feature" "+zhinx" -// RUN: %clang --target=riscv32-unknown-elf -march=rv32izhinx0p1 -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32izhinx0p1 -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZHINX-BADVERS %s // RV32-ZHINX-BADVERS: error: invalid arch name 'rv32izhinx0p1' // RV32-ZHINX-BADVERS: unsupported version number 0.1 for extension 'zhinx' -// RUN: %clang --target=riscv32-unknown-elf -march=rv32i_zmmul2p0 -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32i_zmmul2p0 -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZMMUL-BADVERS %s // RV32-ZMMUL-BADVERS: error: invalid arch name 'rv32i_zmmul2p0' // RV32-ZMMUL-BADVERS: unsupported version number 2.0 for extension @@ -532,12 +532,12 @@ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-ZMMUL-GOODVERS %s // RV32-ZMMUL-GOODVERS: "-target-feature" "+zmmul" -// RUN: %clang --target=riscv32-unknown-elf -march=rv32ifzfinx -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32ifzfinx -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-F-ZFINX-ER %s // RV32-F-ZFINX-ER: error: invalid arch name 'rv32ifzfinx', // RV32-F-ZFINX-ER: 'f' and 'zfinx' extensions are incompatible -// RUN: %clang --target=riscv32-unknown-elf -march=rv32idzdinx -### %s \ +// RUN: not %clang --target=riscv32-unknown-elf -march=rv32idzdinx -### %s \ // RUN: -fsyntax-only 2>&1 | FileCheck -check-prefix=RV32-D-ZDINX-ER %s // RV32-D-ZDINX-ER: error: invalid arch name 'rv32idzdinx', // RV32-D-ZFINX-ER: 'f' and 'zfinx' extensions are incompatible diff --git a/clang/test/Driver/riscv-cpus.c b/clang/test/Driver/riscv-cpus.c --- a/clang/test/Driver/riscv-cpus.c +++ b/clang/test/Driver/riscv-cpus.c @@ -185,8 +185,8 @@ // Check failed cases -// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=generic-rv321 | FileCheck -check-prefix=FAIL-MCPU-NAME %s +// RUN: not %clang --target=riscv32 -### -c %s 2>&1 -mcpu=generic-rv321 | FileCheck -check-prefix=FAIL-MCPU-NAME %s // FAIL-MCPU-NAME: error: unsupported argument 'generic-rv321' to option '-mcpu=' -// RUN: %clang --target=riscv32 -### -c %s 2>&1 -mcpu=generic-rv32 -march=rv64i | FileCheck -check-prefix=MISMATCH-ARCH %s +// RUN: not %clang --target=riscv32 -### -c %s 2>&1 -mcpu=generic-rv32 -march=rv64i | FileCheck -check-prefix=MISMATCH-ARCH %s // MISMATCH-ARCH: cpu 'generic-rv32' does not support rv64 diff --git a/clang/test/Driver/riscv-rvv-vector-bits.c b/clang/test/Driver/riscv-rvv-vector-bits.c --- a/clang/test/Driver/riscv-rvv-vector-bits.c +++ b/clang/test/Driver/riscv-rvv-vector-bits.c @@ -31,15 +31,15 @@ // Error out if an unsupported value is passed to -mrvv-vector-bits. // ----------------------------------------------------------------------------- -// RUN: %clang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \ +// RUN: not %clang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \ // RUN: -mrvv-vector-bits=16 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s -// RUN: %clang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \ +// RUN: not %clang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \ // RUN: -mrvv-vector-bits=A 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s -// RUN: %clang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \ +// RUN: not %clang -c %s -### --target=riscv64-linux-gnu -march=rv64gc_zve64x \ // RUN: -mrvv-vector-bits=131072 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s -// RUN: %clang -c %s -### --target=riscv64-linux-gnu -march=rv64gc \ +// RUN: not %clang -c %s -### --target=riscv64-linux-gnu -march=rv64gc \ // RUN: -mrvv-vector-bits=zvl 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s -// RUN: %clang -c %s -### --target=riscv64-linux-gnu -march=rv64gcv \ +// RUN: not %clang -c %s -### --target=riscv64-linux-gnu -march=rv64gcv \ // RUN: -mrvv-vector-bits=64 2>&1 | FileCheck --check-prefix=CHECK-BAD-VALUE-ERROR %s // CHECK-BAD-VALUE-ERROR: error: unsupported argument '{{.*}}' to option '-mrvv-vector-bits=' diff --git a/clang/test/Driver/rocm-detect.hip b/clang/test/Driver/rocm-detect.hip --- a/clang/test/Driver/rocm-detect.hip +++ b/clang/test/Driver/rocm-detect.hip @@ -102,7 +102,7 @@ // and --rocm-device-lib-path can be used to specify them. // RUN: cp -r %T/rocm-spack/hip-* %T/rocm-spack/hip-4.0.0-abcd -// RUN: %T/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin/clang -### -v \ +// RUN: not %T/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin/clang -### -v \ // RUN: -target x86_64-linux-gnu --cuda-gpu-arch=gfx900 %s 2>&1 \ // RUN: | FileCheck -check-prefixes=SPACK-MULT %s // RUN: %T/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin/clang -### -v \ @@ -115,7 +115,7 @@ // RUN: rm -rf %T/rocm-spack/hip-* // RUN: rm -rf %T/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/amdgcn -// RUN: %T/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin/clang -### -v \ +// RUN: not %T/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin/clang -### -v \ // RUN: -target x86_64-linux-gnu --cuda-gpu-arch=gfx900 %s 2>&1 \ // RUN: | FileCheck -check-prefixes=SPACK-MISS %s // RUN: %T/rocm-spack/llvm-amdgpu-4.0.0-ieagcs7inf7runpyfvepqkurasoglq4z/bin/clang --version 2>&1 \ diff --git a/clang/test/Driver/rocm-not-found.cl b/clang/test/Driver/rocm-not-found.cl --- a/clang/test/Driver/rocm-not-found.cl +++ b/clang/test/Driver/rocm-not-found.cl @@ -2,8 +2,8 @@ // Check that we raise an error if we're trying to compile OpenCL for amdhsa code but can't // find a ROCm install, unless -nogpulib was passed. -// RUN: %clang -### --sysroot=%s/no-rocm-there -target amdgcn--amdhsa %s 2>&1 | FileCheck %s --check-prefix ERR -// RUN: %clang -### --rocm-path=%s/no-rocm-there -target amdgcn--amdhsa %s 2>&1 | FileCheck %s --check-prefix ERR +// RUN: not %clang -### --sysroot=%s/no-rocm-there -target amdgcn--amdhsa %s 2>&1 | FileCheck %s --check-prefix ERR +// RUN: not %clang -### --rocm-path=%s/no-rocm-there -target amdgcn--amdhsa %s 2>&1 | FileCheck %s --check-prefix ERR // ERR: cannot find ROCm device library; provide its path via '--rocm-path' or '--rocm-device-lib-path', or pass '-nogpulib' to build without ROCm device library // Accept nogpulib or nostdlib for OpenCL. diff --git a/clang/test/Driver/ropi-rwpi.c b/clang/test/Driver/ropi-rwpi.c --- a/clang/test/Driver/ropi-rwpi.c +++ b/clang/test/Driver/ropi-rwpi.c @@ -7,13 +7,13 @@ // RUN: %clang -target thumb-none-eabi -fropi -### -c %s 2>&1 | FileCheck --check-prefix=ROPI %s // RUN: %clang -target thumbeb-none-eabi -fropi -### -c %s 2>&1 | FileCheck --check-prefix=ROPI %s -// RUN: %clang -target x86_64-linux-gnu -fropi -### -c %s 2>&1 | FileCheck --check-prefix=ROPI-NON-ARM %s -// RUN: %clang -target x86_64-linux-gnu -frwpi -### -c %s 2>&1 | FileCheck --check-prefix=RWPI-NON-ARM %s -// RUN: %clang -target x86_64-linux-gnu -fropi -frwpi -### -c %s 2>&1 | FileCheck --check-prefix=ROPI-NON-ARM --check-prefix=RWPI-NON-ARM %s +// RUN: not %clang -target x86_64-linux-gnu -fropi -### -c %s 2>&1 | FileCheck --check-prefix=ROPI-NON-ARM %s +// RUN: not %clang -target x86_64-linux-gnu -frwpi -### -c %s 2>&1 | FileCheck --check-prefix=RWPI-NON-ARM %s +// RUN: not %clang -target x86_64-linux-gnu -fropi -frwpi -### -c %s 2>&1 | FileCheck --check-prefix=ROPI-NON-ARM --check-prefix=RWPI-NON-ARM %s -// RUN: %clang -target arm-none-eabi -fpic -fropi -### -c %s 2>&1 | FileCheck --check-prefix=PIC %s -// RUN: %clang -target arm-none-eabi -fpie -frwpi -### -c %s 2>&1 | FileCheck --check-prefix=PIC %s -// RUN: %clang -target arm-none-eabi -fPIC -fropi -frwpi -### -c %s 2>&1 | FileCheck --check-prefix=PIC %s +// RUN: not %clang -target arm-none-eabi -fpic -fropi -### -c %s 2>&1 | FileCheck --check-prefix=PIC %s +// RUN: not %clang -target arm-none-eabi -fpie -frwpi -### -c %s 2>&1 | FileCheck --check-prefix=PIC %s +// RUN: not %clang -target arm-none-eabi -fPIC -fropi -frwpi -### -c %s 2>&1 | FileCheck --check-prefix=PIC %s // RUN: %clang -target arm-none-eabi -fno-pic -fropi -### -c %s 2>&1 | FileCheck --check-prefix=ROPI %s // RUN: %clang --target=arm-none-eabi -x c++ -fropi -### -c %s 2>&1 | FileCheck --check-prefix=CXX %s @@ -21,9 +21,9 @@ // RUN: %clang --target=arm-none-eabi -x c++ -fropi -frwpi -### -c %s 2>&1 | FileCheck --check-prefix=CXX %s // RUN: %clang -target arm-none-eabi -x c++ -fallow-unsupported -fropi -### -c %s 2>&1 | FileCheck --check-prefix=ROPI %s -// RUN: %clang -target arm-none-eabi -march=armv8m.main -fropi -mcmse -### -c %s 2>&1 | FileCheck --check-prefix=ROPI-CMSE %s -// RUN: %clang -target arm-none-eabi -march=armv8m.main -frwpi -mcmse -### -c %s 2>&1 | FileCheck --check-prefix=RWPI-CMSE %s -// RUN: %clang -target arm-none-eabi -march=armv8m.main -frwpi -fropi -mcmse -### -c %s 2>&1 | FileCheck --check-prefix=ROPI-CMSE --check-prefix=RWPI-CMSE %s +// RUN: not %clang -target arm-none-eabi -march=armv8m.main -fropi -mcmse -### -c %s 2>&1 | FileCheck --check-prefix=ROPI-CMSE %s +// RUN: not %clang -target arm-none-eabi -march=armv8m.main -frwpi -mcmse -### -c %s 2>&1 | FileCheck --check-prefix=RWPI-CMSE %s +// RUN: not %clang -target arm-none-eabi -march=armv8m.main -frwpi -fropi -mcmse -### -c %s 2>&1 | FileCheck --check-prefix=ROPI-CMSE --check-prefix=RWPI-CMSE %s // RUN: %clang -target arm-none-eabi -march=armv8m.main -frwpi -mcmse -fallow-unsupported -### -c %s 2>&1 | FileCheck --check-prefix=RWPI-CMSE-ALLOW-UNSUPPORTED --check-prefix=ROPI-CMSE-ALLOW-UNSUPPORTED %s // RUN: %clang -target arm-none-eabi -march=armv8m.main -fropi -mcmse -fallow-unsupported -### -c %s 2>&1 | FileCheck --check-prefix=ROPI-CMSE-ALLOW-UNSUPPORTED %s diff --git a/clang/test/Driver/sanitizer-ld.c b/clang/test/Driver/sanitizer-ld.c --- a/clang/test/Driver/sanitizer-ld.c +++ b/clang/test/Driver/sanitizer-ld.c @@ -296,7 +296,7 @@ // // CHECK-TSAN-NO-LINK-RUNTIME-LINUX-NOT: libclang_rt.tsan -// RUN: %clang -fsanitize=thread -fno-sanitize-link-runtime -### %s 2>&1 \ +// RUN: not %clang -fsanitize=thread -fno-sanitize-link-runtime -### %s 2>&1 \ // RUN: --target=arm64e-apple-ios -fuse-ld=ld \ // RUN: -resource-dir=%S/Inputs/resource_dir \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ @@ -451,19 +451,19 @@ // CHECK-UBSAN-MINIMAL-DARWIN: "{{.*}}ld{{(.exe)?}}" // CHECK-UBSAN-MINIMAL-DARWIN: "{{.*}}libclang_rt.ubsan_minimal_osx_dynamic.dylib" -// RUN: %clang -fsanitize=undefined -### %s 2>&1 \ +// RUN: not %clang -fsanitize=undefined -### %s 2>&1 \ // RUN: --target=x86_64-apple-darwin -fuse-ld=ld -static-libsan \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-UBSAN-STATIC-DARWIN %s // CHECK-UBSAN-STATIC-DARWIN: {{.*}}error: static UndefinedBehaviorSanitizer runtime is not supported on darwin -// RUN: %clang -fsanitize=address -### %s 2>&1 \ +// RUN: not %clang -fsanitize=address -### %s 2>&1 \ // RUN: --target=x86_64-apple-darwin -fuse-ld=ld -static-libsan \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-ASAN-STATIC-DARWIN %s // CHECK-ASAN-STATIC-DARWIN: {{.*}}error: static AddressSanitizer runtime is not supported on darwin -// RUN: %clang -fsanitize=thread -### %s 2>&1 \ +// RUN: not %clang -fsanitize=thread -### %s 2>&1 \ // RUN: --target=x86_64-apple-darwin -fuse-ld=ld -static-libsan \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-TSAN-STATIC-DARWIN %s @@ -629,7 +629,7 @@ // CHECK-COV-LINUX: "-lresolv" // CFI by itself does not link runtime libraries. -// RUN: %clang -fsanitize=cfi -### %s 2>&1 \ +// RUN: not %clang -fsanitize=cfi -### %s 2>&1 \ // RUN: --target=x86_64-unknown-linux -fuse-ld=ld -rtlib=platform \ // RUN: -resource-dir=%S/Inputs/resource_dir \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ @@ -638,7 +638,7 @@ // CHECK-CFI-LINUX-NOT: libclang_rt. // CFI with diagnostics links the UBSan runtime. -// RUN: %clang -fsanitize=cfi -fno-sanitize-trap=cfi -fsanitize-recover=cfi \ +// RUN: not %clang -fsanitize=cfi -fno-sanitize-trap=cfi -fsanitize-recover=cfi \ // RUN: -### %s 2>&1\ // RUN: --target=x86_64-unknown-linux -fuse-ld=ld \ // RUN: -resource-dir=%S/Inputs/resource_dir \ @@ -648,7 +648,7 @@ // CHECK-CFI-DIAG-LINUX: "--whole-archive" "{{[^"]*}}libclang_rt.ubsan_standalone-x86_64.a" "--no-whole-archive" // Cross-DSO CFI links the CFI runtime. -// RUN: %clang -fsanitize=cfi -fsanitize-cfi-cross-dso -### %s 2>&1 \ +// RUN: not %clang -fsanitize=cfi -fsanitize-cfi-cross-dso -### %s 2>&1 \ // RUN: --target=x86_64-unknown-linux -fuse-ld=ld \ // RUN: -resource-dir=%S/Inputs/resource_dir \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ @@ -658,7 +658,7 @@ // CHECK-CFI-CROSS-DSO-LINUX: -export-dynamic // Cross-DSO CFI with diagnostics links just the CFI runtime. -// RUN: %clang -fsanitize=cfi -fsanitize-cfi-cross-dso -### %s 2>&1 \ +// RUN: not %clang -fsanitize=cfi -fsanitize-cfi-cross-dso -### %s 2>&1 \ // RUN: -fno-sanitize-trap=cfi -fsanitize-recover=cfi \ // RUN: --target=x86_64-unknown-linux -fuse-ld=ld \ // RUN: -resource-dir=%S/Inputs/resource_dir \ @@ -669,7 +669,7 @@ // CHECK-CFI-CROSS-DSO-DIAG-LINUX: -export-dynamic // Cross-DSO CFI on Android does not link runtime libraries. -// RUN: %clang -fsanitize=cfi -fsanitize-cfi-cross-dso -### %s 2>&1 \ +// RUN: not %clang -fsanitize=cfi -fsanitize-cfi-cross-dso -### %s 2>&1 \ // RUN: --target=aarch64-linux-android -fuse-ld=ld \ // RUN: -resource-dir=%S/Inputs/resource_dir \ // RUN: --sysroot=%S/Inputs/basic_android_tree \ @@ -678,7 +678,7 @@ // CHECK-CFI-CROSS-DSO-ANDROID-NOT: libclang_rt.cfi // Cross-DSO CFI with diagnostics on Android links just the UBSAN runtime. -// RUN: %clang -fsanitize=cfi -fsanitize-cfi-cross-dso -### %s 2>&1 \ +// RUN: not %clang -fsanitize=cfi -fsanitize-cfi-cross-dso -### %s 2>&1 \ // RUN: -fno-sanitize-trap=cfi -fsanitize-recover=cfi \ // RUN: --target=aarch64-linux-android -fuse-ld=ld \ // RUN: -resource-dir=%S/Inputs/resource_dir \ @@ -728,7 +728,7 @@ // RUN: | FileCheck --check-prefix=CHECK-SHADOWCALLSTACK-LINUX-X86-64 %s // CHECK-SHADOWCALLSTACK-LINUX-X86-64-NOT: error: -// RUN: %clang -fsanitize=shadow-call-stack -### %s 2>&1 \ +// RUN: not %clang -fsanitize=shadow-call-stack -### %s 2>&1 \ // RUN: --target=aarch64-unknown-linux -fuse-ld=ld \ // RUN: | FileCheck --check-prefix=CHECK-SHADOWCALLSTACK-LINUX-AARCH64 %s // CHECK-SHADOWCALLSTACK-LINUX-AARCH64: '-fsanitize=shadow-call-stack' only allowed with '-ffixed-x18' @@ -763,7 +763,7 @@ // RUN: | FileCheck --check-prefix=CHECK-SHADOWCALLSTACK-LINUX-AARCH64-X18 %s // CHECK-SHADOWCALLSTACK-LINUX-AARCH64-X18-NOT: error: -// RUN: %clang -fsanitize=shadow-call-stack -### %s 2>&1 \ +// RUN: not %clang -fsanitize=shadow-call-stack -### %s 2>&1 \ // RUN: --target=x86-unknown-linux -fuse-ld=ld \ // RUN: | FileCheck --check-prefix=CHECK-SHADOWCALLSTACK-LINUX-X86 %s // CHECK-SHADOWCALLSTACK-LINUX-X86: error: unsupported option '-fsanitize=shadow-call-stack' for target 'x86-unknown-linux' @@ -773,7 +773,7 @@ // RUN: | FileCheck --check-prefix=CHECK-SHADOWCALLSTACK-SAFESTACK %s // CHECK-SHADOWCALLSTACK-SAFESTACK-NOT: error: -// RUN: %clang -fsanitize=cfi -fsanitize-stats -### %s 2>&1 \ +// RUN: not %clang -fsanitize=cfi -fsanitize-stats -### %s 2>&1 \ // RUN: --target=x86_64-unknown-linux -fuse-ld=ld \ // RUN: -resource-dir=%S/Inputs/resource_dir \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ @@ -783,7 +783,7 @@ // CHECK-CFI-STATS-LINUX-NOT: "--whole-archive" // CHECK-CFI-STATS-LINUX: "{{[^"]*}}libclang_rt.stats-x86_64.a" -// RUN: %clang -fsanitize=cfi -fsanitize-stats -### %s 2>&1 \ +// RUN: not %clang -fsanitize=cfi -fsanitize-stats -### %s 2>&1 \ // RUN: --target=x86_64-apple-darwin -fuse-ld=ld \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-CFI-STATS-DARWIN %s @@ -791,7 +791,7 @@ // CHECK-CFI-STATS-DARWIN: "{{[^"]*}}libclang_rt.stats_client_osx.a" // CHECK-CFI-STATS-DARWIN: "{{[^"]*}}libclang_rt.stats_osx_dynamic.dylib" -// RUN: %clang -fsanitize=cfi -fsanitize-stats -### %s 2>&1 \ +// RUN: not %clang -fsanitize=cfi -fsanitize-stats -### %s 2>&1 \ // RUN: --target=x86_64-pc-windows \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-CFI-STATS-WIN64 %s @@ -799,7 +799,7 @@ // CHECK-CFI-STATS-WIN64: "--dependent-lib=clang_rt.stats{{(-x86_64)?}}.lib" // CHECK-CFI-STATS-WIN64: "--linker-option=/include:__sanitizer_stats_register" -// RUN: %clang -fsanitize=cfi -fsanitize-stats -### %s 2>&1 \ +// RUN: not %clang -fsanitize=cfi -fsanitize-stats -### %s 2>&1 \ // RUN: --target=i686-pc-windows \ // RUN: --sysroot=%S/Inputs/basic_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-CFI-STATS-WIN32 %s @@ -831,7 +831,7 @@ // CHECK-SAFESTACK-ANDROID-AARCH64: "{{(.*[^-.0-9A-Z_a-z])?}}ld.lld{{(.exe)?}}" // CHECK-SAFESTACK-ANDROID-AARCH64-NOT: libclang_rt.safestack -// RUN: %clang -fsanitize=undefined -### %s 2>&1 \ +// RUN: not %clang -fsanitize=undefined -### %s 2>&1 \ // RUN: --target=x86_64-scei-ps4 -fuse-ld=ld \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-UBSAN-PS4 %s @@ -839,7 +839,7 @@ // CHECK-UBSAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-UBSAN-PS4: -lSceDbgUBSanitizer_stub_weak -// RUN: %clang -fsanitize=undefined -### %s 2>&1 \ +// RUN: not %clang -fsanitize=undefined -### %s 2>&1 \ // RUN: --target=x86_64-sie-ps5 -fuse-ld=ld \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-UBSAN-PS5 %s @@ -847,7 +847,7 @@ // CHECK-UBSAN-PS5: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-UBSAN-PS5: -lSceUBSanitizer_nosubmission_stub_weak -// RUN: %clang -fsanitize=address -### %s 2>&1 \ +// RUN: not %clang -fsanitize=address -### %s 2>&1 \ // RUN: --target=x86_64-scei-ps4 -fuse-ld=ld \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-ASAN-PS4 %s @@ -855,7 +855,7 @@ // CHECK-ASAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-ASAN-PS4: -lSceDbgAddressSanitizer_stub_weak -// RUN: %clang -fsanitize=address -### %s 2>&1 \ +// RUN: not %clang -fsanitize=address -### %s 2>&1 \ // RUN: --target=x86_64-sie-ps5 -fuse-ld=ld \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-ASAN-PS5 %s @@ -863,7 +863,7 @@ // CHECK-ASAN-PS5: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-ASAN-PS5: -lSceAddressSanitizer_nosubmission_stub_weak -// RUN: %clang -fsanitize=address,undefined -### %s 2>&1 \ +// RUN: not %clang -fsanitize=address,undefined -### %s 2>&1 \ // RUN: --target=x86_64-scei-ps4 -fuse-ld=ld \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-AUBSAN-PS4 %s @@ -873,7 +873,7 @@ // CHECK-AUBSAN-PS4: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-AUBSAN-PS4: -lSceDbgAddressSanitizer_stub_weak -// RUN: %clang -fsanitize=address,undefined -### %s 2>&1 \ +// RUN: not %clang -fsanitize=address,undefined -### %s 2>&1 \ // RUN: --target=x86_64-sie-ps5 -fuse-ld=ld \ // RUN: -shared \ // RUN: | FileCheck --check-prefix=CHECK-AUBSAN-PS5 %s @@ -883,14 +883,14 @@ // CHECK-AUBSAN-PS5: "{{.*}}ld{{(.gold)?(.exe)?}}" // CHECK-AUBSAN-PS5: -lSceAddressSanitizer_nosubmission_stub_weak -// RUN: %clang -fsanitize=address,undefined -### %s 2>&1 \ +// RUN: not %clang -fsanitize=address,undefined -### %s 2>&1 \ // RUN: --target=x86_64-scei-ps4 -fuse-ld=ld \ // RUN: -shared \ // RUN: -nostdlib \ // RUN: | FileCheck --check-prefix=CHECK-NOLIB-PS4 %s // CHECK-NOLIB-PS4-NOT: SceDbgAddressSanitizer_stub_weak -// RUN: %clang -fsanitize=address,undefined -### %s 2>&1 \ +// RUN: not %clang -fsanitize=address,undefined -### %s 2>&1 \ // RUN: --target=x86_64-sie-ps5 -fuse-ld=ld \ // RUN: -shared \ // RUN: -nostdlib \ diff --git a/clang/test/Driver/save-stats.c b/clang/test/Driver/save-stats.c --- a/clang/test/Driver/save-stats.c +++ b/clang/test/Driver/save-stats.c @@ -16,7 +16,7 @@ // CHECK-OBJ-NOO: "-stats-file=save-stats.stats" // CHECK-OBJ-NOO: "-o" "save-stats.o" -// RUN: %clang -target x86_64-apple-darwin -save-stats=bla -c %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID +// RUN: not %clang -target x86_64-apple-darwin -save-stats=bla -c %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-INVALID // CHECK-INVALID: invalid value 'bla' in '-save-stats=bla' // RUN: %clang -target x86_64-linux-unknown -save-stats -flto -o obj/dir/save-stats.exe %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-LTO diff --git a/clang/test/Driver/sparc-float.c b/clang/test/Driver/sparc-float.c --- a/clang/test/Driver/sparc-float.c +++ b/clang/test/Driver/sparc-float.c @@ -33,7 +33,7 @@ // CHECK-FLOATABIHARD-NOT: "-target-feature" "+soft-float" // // check invalid -mfloat-abi -// RUN: %clang -c %s -### -o %t.o 2>&1 \ +// RUN: not %clang -c %s -### -o %t.o 2>&1 \ // RUN: -target sparc-linux-gnu -mfloat-abi=x \ // RUN: | FileCheck --check-prefix=CHECK-ERRMSG %s // CHECK-ERRMSG: error: invalid float ABI '-mfloat-abi=x' @@ -70,7 +70,7 @@ // CHECK-FLOATABIHARD64-NOT: "-target-feature" "+soft-float" // // check invalid -mfloat-abi -// RUN: %clang -c %s -### -o %t.o 2>&1 \ +// RUN: not %clang -c %s -### -o %t.o 2>&1 \ // RUN: -target sparc64-linux-gnu -mfloat-abi=x \ // RUN: | FileCheck --check-prefix=CHECK-ERRMSG64 %s // CHECK-ERRMSG64: error: invalid float ABI '-mfloat-abi=x' diff --git a/clang/test/Driver/sparc-march.c b/clang/test/Driver/sparc-march.c --- a/clang/test/Driver/sparc-march.c +++ b/clang/test/Driver/sparc-march.c @@ -1,4 +1,4 @@ -// RUN: %clang -target sparcv9 -march=v9 -### -c %s 2>&1 | FileCheck %s -// RUN: %clang -target sparc64 -march=v9 -### -c %s 2>&1 | FileCheck %s -// RUN: %clang -target sparc -march=v9 -### -c %s 2>&1 | FileCheck %s +// RUN: not %clang -target sparcv9 -march=v9 -### -c %s 2>&1 | FileCheck %s +// RUN: not %clang -target sparc64 -march=v9 -### -c %s 2>&1 | FileCheck %s +// RUN: not %clang -target sparc -march=v9 -### -c %s 2>&1 | FileCheck %s // CHECK: error: unsupported option '-march=' for target diff --git a/clang/test/Driver/split-lto-unit.c b/clang/test/Driver/split-lto-unit.c --- a/clang/test/Driver/split-lto-unit.c +++ b/clang/test/Driver/split-lto-unit.c @@ -2,7 +2,7 @@ // RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin -fsplit-lto-unit 2>&1 | FileCheck --check-prefix=UNIT %s // RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin -fno-split-lto-unit 2>&1 | FileCheck --check-prefix=NOUNIT %s // RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin -fno-split-lto-unit -fwhole-program-vtables 2>&1 | FileCheck --check-prefix=ERROR1 %s -// RUN: %clang --target=x86_64-unknown-linux -### %s -flto=thin -fno-split-lto-unit -fsanitize=cfi 2>&1 | FileCheck --check-prefix=ERROR2 %s +// RUN: not %clang --target=x86_64-unknown-linux -### %s -flto=thin -fno-split-lto-unit -fsanitize=cfi 2>&1 | FileCheck --check-prefix=ERROR2 %s // RUN: %clang --target=x86_64-apple-darwin13.3.0 -### %s -fwhole-program-vtables -flto=full 2>&1 | FileCheck --check-prefix=UNIT %s // RUN: %clang --target=x86_64-apple-darwin13.3.0 -### %s -fwhole-program-vtables -flto=thin 2>&1 | FileCheck --check-prefix=NOUNIT %s // RUN: %clang --target=x86_64-scei-ps4 -### %s -fwhole-program-vtables -flto=full 2>&1 | FileCheck --check-prefix=UNIT %s diff --git a/clang/test/Driver/systemz-float-01.c b/clang/test/Driver/systemz-float-01.c --- a/clang/test/Driver/systemz-float-01.c +++ b/clang/test/Driver/systemz-float-01.c @@ -22,19 +22,19 @@ // CHECK-SOFT: "-msoft-float" "-mfloat-abi" "soft" // // -mfloat-abi=soft -// RUN: %clang -c %s -### -o %t.o 2>&1 \ +// RUN: not %clang -c %s -### -o %t.o 2>&1 \ // RUN: -target s390x-linux-gnu -mfloat-abi=soft \ // RUN: | FileCheck --check-prefix=CHECK-FLOATABISOFT %s // CHECK-FLOATABISOFT: error: unsupported option '-mfloat-abi=soft' // // -mfloat-abi=hard -// RUN: %clang -c %s -### -o %t.o 2>&1 \ +// RUN: not %clang -c %s -### -o %t.o 2>&1 \ // RUN: -target s390x-linux-gnu -mfloat-abi=hard \ // RUN: | FileCheck --check-prefix=CHECK-FLOATABIHARD %s // CHECK-FLOATABIHARD: error: unsupported option '-mfloat-abi=hard' // // check invalid -mfloat-abi -// RUN: %clang -c %s -### -o %t.o 2>&1 \ +// RUN: not %clang -c %s -### -o %t.o 2>&1 \ // RUN: -target s390x-linux-gnu -mfloat-abi=x \ // RUN: | FileCheck --check-prefix=CHECK-ERRMSG %s // CHECK-ERRMSG: error: unsupported option '-mfloat-abi=x' diff --git a/clang/test/Driver/unknown-arg.c b/clang/test/Driver/unknown-arg.c --- a/clang/test/Driver/unknown-arg.c +++ b/clang/test/Driver/unknown-arg.c @@ -8,9 +8,9 @@ // RUN: FileCheck %s --check-prefix=CL // RUN: %clang_cl -Brepo -### -- %s 2>&1 | \ // RUN: FileCheck %s --check-prefix=CL-DID-YOU-MEAN -// RUN: %clang_cl /Brepo -### -- %s 2>&1 | \ +// RUN: not %clang_cl /Brepo -### -- %s 2>&1 | \ // RUN: FileCheck %s --check-prefix=CL-DID-YOU-MEAN-SLASH -// RUN: %clang_cl /Brepo -### /Tc%s /link 2>&1 | \ +// RUN: not %clang_cl /Brepo -### /Tc%s /link 2>&1 | \ // RUN: FileCheck %s --check-prefix=CL-DID-YOU-MEAN-SLASH // RUN: not %clang_cl -cake-is-lie -%0 -%d -HHHH -munknown-to-clang-option -print-stats -funknown-to-clang-option -c -Werror=unknown-argument -### -- %s 2>&1 | \ // RUN: FileCheck %s --check-prefix=CL-ERROR diff --git a/clang/test/Driver/virtual-function-elimination.cpp b/clang/test/Driver/virtual-function-elimination.cpp --- a/clang/test/Driver/virtual-function-elimination.cpp +++ b/clang/test/Driver/virtual-function-elimination.cpp @@ -1,5 +1,5 @@ -// RUN: %clang -target x86_64-unknown-linux -fvirtual-function-elimination -### %s 2>&1 | FileCheck --check-prefix=BAD-LTO %s -// RUN: %clang -target x86_64-unknown-linux -fvirtual-function-elimination -flto=thin -### %s 2>&1 | FileCheck --check-prefix=BAD-LTO %s +// RUN: not %clang -target x86_64-unknown-linux -fvirtual-function-elimination -### %s 2>&1 | FileCheck --check-prefix=BAD-LTO %s +// RUN: not %clang -target x86_64-unknown-linux -fvirtual-function-elimination -flto=thin -### %s 2>&1 | FileCheck --check-prefix=BAD-LTO %s // BAD-LTO: invalid argument '-fvirtual-function-elimination' only allowed with '-flto=full' // RUN: %clang -target x86_64-unknown-linux -fvirtual-function-elimination -flto -### %s 2>&1 | FileCheck --check-prefix=GOOD %s diff --git a/clang/test/Driver/wasm-toolchain.c b/clang/test/Driver/wasm-toolchain.c --- a/clang/test/Driver/wasm-toolchain.c +++ b/clang/test/Driver/wasm-toolchain.c @@ -75,32 +75,32 @@ // Thread-related command line tests. // '-pthread' sets +atomics, +bulk-memory, +mutable-globals, +sign-ext, and --shared-memory -// RUN: %clang -### --target=wasm32-unknown-unknown \ +// RUN: not %clang -### --target=wasm32-unknown-unknown \ // RUN: --sysroot=/foo %s -fuse-ld=wasm-ld -pthread 2>&1 \ // RUN: | FileCheck -check-prefix=PTHREAD %s // PTHREAD: "-cc1" {{.*}} "-target-feature" "+atomics" "-target-feature" "+bulk-memory" "-target-feature" "+mutable-globals" "-target-feature" "+sign-ext" // PTHREAD: wasm-ld{{.*}}" "-lpthread" "--shared-memory" // '-pthread' not allowed with '-mno-atomics' -// RUN: %clang -### --target=wasm32-unknown-unknown \ +// RUN: not %clang -### --target=wasm32-unknown-unknown \ // RUN: --sysroot=/foo %s -pthread -mno-atomics 2>&1 \ // RUN: | FileCheck -check-prefix=PTHREAD_NO_ATOMICS %s // PTHREAD_NO_ATOMICS: invalid argument '-pthread' not allowed with '-mno-atomics' // '-pthread' not allowed with '-mno-bulk-memory' -// RUN: %clang -### --target=wasm32-unknown-unknown \ +// RUN: not %clang -### --target=wasm32-unknown-unknown \ // RUN: --sysroot=/foo %s -pthread -mno-bulk-memory 2>&1 \ // RUN: | FileCheck -check-prefix=PTHREAD_NO_BULK_MEM %s // PTHREAD_NO_BULK_MEM: invalid argument '-pthread' not allowed with '-mno-bulk-memory' // '-pthread' not allowed with '-mno-mutable-globals' -// RUN: %clang -### --target=wasm32-unknown-unknown \ +// RUN: not %clang -### --target=wasm32-unknown-unknown \ // RUN: --sysroot=/foo %s -pthread -mno-mutable-globals 2>&1 \ // RUN: | FileCheck -check-prefix=PTHREAD_NO_MUT_GLOBALS %s // PTHREAD_NO_MUT_GLOBALS: invalid argument '-pthread' not allowed with '-mno-mutable-globals' // '-pthread' not allowed with '-mno-sign-ext' -// RUN: %clang -### --target=wasm32-unknown-unknown \ +// RUN: not %clang -### --target=wasm32-unknown-unknown \ // RUN: --sysroot=/foo %s -pthread -mno-sign-ext 2>&1 \ // RUN: | FileCheck -check-prefix=PTHREAD_NO_SIGN_EXT %s // PTHREAD_NO_SIGN_EXT: invalid argument '-pthread' not allowed with '-mno-sign-ext' @@ -115,7 +115,7 @@ // '-mllvm -emscripten-cxx-exceptions-allowed' only allowed with // '-mllvm -enable-emscripten-cxx-exceptions' -// RUN: %clang -### --target=wasm32-unknown-unknown \ +// RUN: not %clang -### --target=wasm32-unknown-unknown \ // RUN: --sysroot=/foo %s -mllvm -emscripten-cxx-exceptions-allowed 2>&1 \ // RUN: | FileCheck -check-prefix=EMSCRIPTEN_EH_ALLOWED_WO_ENABLE %s // EMSCRIPTEN_EH_ALLOWED_WO_ENABLE: invalid argument '-mllvm -emscripten-cxx-exceptions-allowed' only allowed with '-mllvm -enable-emscripten-cxx-exceptions' @@ -127,13 +127,13 @@ // WASM_EXCEPTIONS: "-cc1" {{.*}} "-target-feature" "+exception-handling" "-mllvm" "-wasm-enable-eh" // '-fwasm-exceptions' not allowed with '-mno-exception-handling' -// RUN: %clang -### --target=wasm32-unknown-unknown \ +// RUN: not %clang -### --target=wasm32-unknown-unknown \ // RUN: --sysroot=/foo %s -fwasm-exceptions -mno-exception-handling 2>&1 \ // RUN: | FileCheck -check-prefix=WASM_EXCEPTIONS_NO_EH %s // WASM_EXCEPTIONS_NO_EH: invalid argument '-fwasm-exceptions' not allowed with '-mno-exception-handling' // '-fwasm-exceptions' not allowed with '-mllvm -enable-emscripten-cxx-exceptions' -// RUN: %clang -### --target=wasm32-unknown-unknown \ +// RUN: not %clang -### --target=wasm32-unknown-unknown \ // RUN: --sysroot=/foo %s -fwasm-exceptions \ // RUN: -mllvm -enable-emscripten-cxx-exceptions 2>&1 \ // RUN: | FileCheck -check-prefix=WASM_EXCEPTIONS_EMSCRIPTEN_EH %s @@ -147,7 +147,7 @@ // WASM_SJLJ: "-cc1" {{.*}} "-target-feature" "+exception-handling" "-exception-model=wasm" // '-mllvm -wasm-enable-sjlj' not allowed with '-mno-exception-handling' -// RUN: %clang -### --target=wasm32-unknown-unknown \ +// RUN: not %clang -### --target=wasm32-unknown-unknown \ // RUN: --sysroot=/foo %s -mllvm -wasm-enable-sjlj -mno-exception-handling \ // RUN: 2>&1 \ // RUN: | FileCheck -check-prefix=WASM_SJLJ_NO_EH %s @@ -155,14 +155,14 @@ // '-mllvm -wasm-enable-sjlj' not allowed with // '-mllvm -enable-emscripten-cxx-exceptions' -// RUN: %clang -### --target=wasm32-unknown-unknown \ +// RUN: not %clang -### --target=wasm32-unknown-unknown \ // RUN: --sysroot=/foo %s -mllvm -wasm-enable-sjlj \ // RUN: -mllvm -enable-emscripten-cxx-exceptions 2>&1 \ // RUN: | FileCheck -check-prefix=WASM_SJLJ_EMSCRIPTEN_EH %s // WASM_SJLJ_EMSCRIPTEN_EH: invalid argument '-mllvm -wasm-enable-sjlj' not allowed with '-mllvm -enable-emscripten-cxx-exceptions' // '-mllvm -wasm-enable-sjlj' not allowed with '-mllvm -enable-emscripten-sjlj' -// RUN: %clang -### --target=wasm32-unknown-unknown \ +// RUN: not %clang -### --target=wasm32-unknown-unknown \ // RUN: --sysroot=/foo %s -mllvm -wasm-enable-sjlj \ // RUN: -mllvm -enable-emscripten-sjlj 2>&1 \ // RUN: | FileCheck -check-prefix=WASM_SJLJ_EMSCRIPTEN_SJLJ %s @@ -172,7 +172,7 @@ // CHECK-ASAN-EMSCRIPTEN: "-fsanitize=address" // CHECK-ASAN-EMSCRIPTEN: "-fsanitize-address-globals-dead-stripping" -// RUN: %clang -### %s -fsanitize=function --target=wasm32-unknown-emscripten 2>&1 | FileCheck --check-prefix=FUNCTION %s +// RUN: not %clang -### %s -fsanitize=function --target=wasm32-unknown-emscripten 2>&1 | FileCheck --check-prefix=FUNCTION %s // FUNCTION: error: unsupported option '-fsanitize=function' for target 'wasm32-unknown-emscripten' // Basic exec-model tests. @@ -194,6 +194,6 @@ // CHECK-PIC: "-cc1" {{.*}} "-target-feature" "+mutable-globals" // '-mno-mutable-globals' is not allowed with '-fPIC' -// RUN: %clang -### %s --target=wasm32-unknown-unknown --sysroot=%s/no-sysroot-there -fPIC -mno-mutable-globals %s 2>&1 \ +// RUN: not %clang -### %s --target=wasm32-unknown-unknown --sysroot=%s/no-sysroot-there -fPIC -mno-mutable-globals %s 2>&1 \ // RUN: | FileCheck -check-prefix=PIC_NO_MUTABLE_GLOBALS %s // PIC_NO_MUTABLE_GLOBALS: error: invalid argument '-fPIC' not allowed with '-mno-mutable-globals' diff --git a/clang/test/Driver/whole-program-vtables.c b/clang/test/Driver/whole-program-vtables.c --- a/clang/test/Driver/whole-program-vtables.c +++ b/clang/test/Driver/whole-program-vtables.c @@ -1,15 +1,15 @@ -// RUN: %clang -target x86_64-unknown-linux -fwhole-program-vtables -### %s 2>&1 | FileCheck --check-prefix=NO-LTO %s -// RUN: %clang_cl --target=x86_64-pc-win32 -fwhole-program-vtables -### -- %s 2>&1 | FileCheck --check-prefix=NO-LTO %s +// RUN: not %clang -target x86_64-unknown-linux -fwhole-program-vtables -### %s 2>&1 | FileCheck --check-prefix=NO-LTO %s +// RUN: not %clang_cl --target=x86_64-pc-win32 -fwhole-program-vtables -### -- %s 2>&1 | FileCheck --check-prefix=NO-LTO %s // NO-LTO: invalid argument '-fwhole-program-vtables' only allowed with '-flto' // RUN: %clang -target x86_64-unknown-linux -fwhole-program-vtables -flto -### %s 2>&1 | FileCheck --check-prefix=LTO %s -// RUN: %clang_cl --target=x86_64-pc-win32 -fwhole-program-vtables -flto -### -- %s 2>&1 | FileCheck --check-prefix=LTO %s +// RUN: not %clang_cl --target=x86_64-pc-win32 -fwhole-program-vtables -flto -### -- %s 2>&1 | FileCheck --check-prefix=LTO %s // LTO: "-fwhole-program-vtables" /// -funified-lto does not imply -flto, so we still get an error that fwhole-program-vtables has no effect without -flto -// RUN: %clang --target=x86_64-pc-linux-gnu -fwhole-program-vtables -funified-lto -### %s 2>&1 | FileCheck --check-prefix=NO-LTO %s -// RUN: %clang --target=x86_64-pc-linux-gnu -fwhole-program-vtables -fno-unified-lto -### %s 2>&1 | FileCheck --check-prefix=NO-LTO %s +// RUN: not %clang --target=x86_64-pc-linux-gnu -fwhole-program-vtables -funified-lto -### %s 2>&1 | FileCheck --check-prefix=NO-LTO %s +// RUN: not %clang --target=x86_64-pc-linux-gnu -fwhole-program-vtables -fno-unified-lto -### %s 2>&1 | FileCheck --check-prefix=NO-LTO %s // RUN: %clang -target x86_64-unknown-linux -fwhole-program-vtables -fno-whole-program-vtables -flto -### %s 2>&1 | FileCheck --check-prefix=LTO-DISABLE %s -// RUN: %clang_cl --target=x86_64-pc-win32 -fwhole-program-vtables -fno-whole-program-vtables -flto -### -- %s 2>&1 | FileCheck --check-prefix=LTO-DISABLE %s +// RUN: not %clang_cl --target=x86_64-pc-win32 -fwhole-program-vtables -fno-whole-program-vtables -flto -### -- %s 2>&1 | FileCheck --check-prefix=LTO-DISABLE %s // LTO-DISABLE-NOT: "-fwhole-program-vtables" diff --git a/clang/test/Driver/windows-pic.cpp b/clang/test/Driver/windows-pic.cpp --- a/clang/test/Driver/windows-pic.cpp +++ b/clang/test/Driver/windows-pic.cpp @@ -1,34 +1,34 @@ -// RUN: %clang -### -target i686-windows -fPIC %s 2>&1 | FileCheck -check-prefix CHECK-PIC-ERROR %s -// RUN: %clang -### -target i686-windows -fpic %s 2>&1 | FileCheck -check-prefix CHECK-pic-ERROR %s -// RUN: %clang -### -target i686-windows -fPIE %s 2>&1 | FileCheck -check-prefix CHECK-PIE-ERROR %s -// RUN: %clang -### -target i686-windows -fpie %s 2>&1 | FileCheck -check-prefix CHECK-pie-ERROR %s +// RUN: not %clang -### -target i686-windows -fPIC %s 2>&1 | FileCheck -check-prefix CHECK-PIC-ERROR %s +// RUN: not %clang -### -target i686-windows -fpic %s 2>&1 | FileCheck -check-prefix CHECK-pic-ERROR %s +// RUN: not %clang -### -target i686-windows -fPIE %s 2>&1 | FileCheck -check-prefix CHECK-PIE-ERROR %s +// RUN: not %clang -### -target i686-windows -fpie %s 2>&1 | FileCheck -check-prefix CHECK-pie-ERROR %s // RUN: %clang -### -target i686-windows -fPIC -fno-pic %s // RUN: %clang -### -target i686-windows -Fpic -fno-pic %s // RUN: %clang -### -target i686-windows -fPIE -fno-pie %s // RUN: %clang -### -target i686-windows -fpie -fno-pie %s -// RUN: %clang -### -target i686-windows-itanium -fPIC %s 2>&1 | FileCheck -check-prefix CHECK-PIC-ERROR %s -// RUN: %clang -### -target i686-windows-itanium -fpic %s 2>&1 | FileCheck -check-prefix CHECK-pic-ERROR %s -// RUN: %clang -### -target i686-windows-itanium -fPIE %s 2>&1 | FileCheck -check-prefix CHECK-PIE-ERROR %s -// RUN: %clang -### -target i686-windows-itanium -fpie %s 2>&1 | FileCheck -check-prefix CHECK-pie-ERROR %s +// RUN: not %clang -### -target i686-windows-itanium -fPIC %s 2>&1 | FileCheck -check-prefix CHECK-PIC-ERROR %s +// RUN: not %clang -### -target i686-windows-itanium -fpic %s 2>&1 | FileCheck -check-prefix CHECK-pic-ERROR %s +// RUN: not %clang -### -target i686-windows-itanium -fPIE %s 2>&1 | FileCheck -check-prefix CHECK-PIE-ERROR %s +// RUN: not %clang -### -target i686-windows-itanium -fpie %s 2>&1 | FileCheck -check-prefix CHECK-pie-ERROR %s // RUN: %clang -### -target i686-windows-itanium -fPIC -fno-pic %s // RUN: %clang -### -target i686-windows-itanium -Fpic -fno-pic %s // RUN: %clang -### -target i686-windows-itanium -fPIE -fno-pie %s // RUN: %clang -### -target i686-windows-itanium -fpie -fno-pie %s -// RUN: %clang -### -target x86_64-windows -fPIC %s 2>&1 | FileCheck -check-prefix CHECK-PIC-ERROR %s -// RUN: %clang -### -target x86_64-windows -fpic %s 2>&1 | FileCheck -check-prefix CHECK-pic-ERROR %s -// RUN: %clang -### -target x86_64-windows -fPIE %s 2>&1 | FileCheck -check-prefix CHECK-PIE-ERROR %s -// RUN: %clang -### -target x86_64-windows -fpie %s 2>&1 | FileCheck -check-prefix CHECK-pie-ERROR %s +// RUN: not %clang -### -target x86_64-windows -fPIC %s 2>&1 | FileCheck -check-prefix CHECK-PIC-ERROR %s +// RUN: not %clang -### -target x86_64-windows -fpic %s 2>&1 | FileCheck -check-prefix CHECK-pic-ERROR %s +// RUN: not %clang -### -target x86_64-windows -fPIE %s 2>&1 | FileCheck -check-prefix CHECK-PIE-ERROR %s +// RUN: not %clang -### -target x86_64-windows -fpie %s 2>&1 | FileCheck -check-prefix CHECK-pie-ERROR %s // RUN: %clang -### -target x86_64-windows -fPIC -fno-pic %s // RUN: %clang -### -target x86_64-windows -Fpic -fno-pic %s // RUN: %clang -### -target x86_64-windows -fPIE -fno-pie %s // RUN: %clang -### -target x86_64-windows -fpie -fno-pie %s -// RUN: %clang -### -target x86_64-windows-itanium -fPIC %s 2>&1 | FileCheck -check-prefix CHECK-PIC-ERROR %s -// RUN: %clang -### -target x86_64-windows-itanium -fpic %s 2>&1 | FileCheck -check-prefix CHECK-pic-ERROR %s -// RUN: %clang -### -target x86_64-windows-itanium -fPIE %s 2>&1 | FileCheck -check-prefix CHECK-PIE-ERROR %s -// RUN: %clang -### -target x86_64-windows-itanium -fpie %s 2>&1 | FileCheck -check-prefix CHECK-pie-ERROR %s +// RUN: not %clang -### -target x86_64-windows-itanium -fPIC %s 2>&1 | FileCheck -check-prefix CHECK-PIC-ERROR %s +// RUN: not %clang -### -target x86_64-windows-itanium -fpic %s 2>&1 | FileCheck -check-prefix CHECK-pic-ERROR %s +// RUN: not %clang -### -target x86_64-windows-itanium -fPIE %s 2>&1 | FileCheck -check-prefix CHECK-PIE-ERROR %s +// RUN: not %clang -### -target x86_64-windows-itanium -fpie %s 2>&1 | FileCheck -check-prefix CHECK-pie-ERROR %s // RUN: %clang -### -target x86_64-windows-itanium -fPIC -fno-pic %s // RUN: %clang -### -target x86_64-windows-itanium -Fpic -fno-pic %s // RUN: %clang -### -target x86_64-windows-itanium -fPIE -fno-pie %s diff --git a/clang/test/Driver/working-directory.c b/clang/test/Driver/working-directory.c --- a/clang/test/Driver/working-directory.c +++ b/clang/test/Driver/working-directory.c @@ -1,5 +1,5 @@ -// RUN: %clang -### -coverage -working-directory /no/such/dir/ input 2>&1 | FileCheck %s -// RUN: %clang -### -coverage -working-directory %p/Inputs no_such_file.cpp -c 2>&1 | FileCheck %s --check-prefix=CHECK_NO_FILE +// RUN: not %clang -### -coverage -working-directory /no/such/dir/ input 2>&1 | FileCheck %s +// RUN: not %clang -### -coverage -working-directory %p/Inputs no_such_file.cpp -c 2>&1 | FileCheck %s --check-prefix=CHECK_NO_FILE // RUN: %clang -### -coverage -working-directory %p/Inputs pchfile.cpp -c 2>&1 | FileCheck %s --check-prefix=CHECK_WORKS // CHECK: unable to set working directory: /no/such/dir/ diff --git a/clang/test/Driver/x86-mabi.c b/clang/test/Driver/x86-mabi.c --- a/clang/test/Driver/x86-mabi.c +++ b/clang/test/Driver/x86-mabi.c @@ -1,6 +1,6 @@ // RUN: %clang -### --target=x86_64-windows-msvc -mabi=ms -S %s 2>&1 | FileCheck %s -// RUN: %clang -### --target=i386-unknown-linux -mabi=ms -S %s 2>&1 | FileCheck --check-prefix=ERR %s -// RUN: %clang -### --target=x86_64-windows-msvc -mabi=sysv -S %s 2>&1 | FileCheck --check-prefix=ERR %s +// RUN: not %clang -### --target=i386-unknown-linux -mabi=ms -S %s 2>&1 | FileCheck --check-prefix=ERR %s +// RUN: not %clang -### --target=x86_64-windows-msvc -mabi=sysv -S %s 2>&1 | FileCheck --check-prefix=ERR %s // RUN: %clang -### --target=i386-unknown-linux -mabi=sysv -S %s 2>&1 | FileCheck %s // RUN: %clang -### --target=x86_64-windows-gnu -mabi=ms -S %s 2>&1 | FileCheck %s diff --git a/clang/test/Driver/x86-malign-branch.c b/clang/test/Driver/x86-malign-branch.c --- a/clang/test/Driver/x86-malign-branch.c +++ b/clang/test/Driver/x86-malign-branch.c @@ -6,8 +6,8 @@ // RUN: %clang -target x86_64-unknown-linux -malign-branch-boundary=16 -flto %s -### 2>&1 | FileCheck %s --check-prefix=BOUNDARY-LTO // BOUNDARY-LTO: "-plugin-opt=-x86-align-branch-boundary=16" -// RUN: %clang -target x86_64 -malign-branch-boundary=8 %s -c -### 2>&1 | FileCheck %s --check-prefix=BOUNDARY-ERR -// RUN: %clang -target x86_64 -malign-branch-boundary=15 %s -c -### 2>&1 | FileCheck %s --check-prefix=BOUNDARY-ERR +// RUN: not %clang -target x86_64 -malign-branch-boundary=8 %s -c -### 2>&1 | FileCheck %s --check-prefix=BOUNDARY-ERR +// RUN: not %clang -target x86_64 -malign-branch-boundary=15 %s -c -### 2>&1 | FileCheck %s --check-prefix=BOUNDARY-ERR // BOUNDARY-ERR: invalid argument {{.*}} to -malign-branch-boundary= /// Test -malign-branch= @@ -37,8 +37,8 @@ // 32B-LTO: "-plugin-opt=-x86-branches-within-32B-boundaries" /// Unsupported on other targets. -// RUN: %clang -target aarch64 -malign-branch=jmp %s -c -### 2>&1 | FileCheck --check-prefix=UNUSED %s -// RUN: %clang -target aarch64 -malign-branch-boundary=7 %s -c -### 2>&1 | FileCheck --check-prefix=UNUSED %s -// RUN: %clang -target aarch64 -mpad-max-prefix-size=15 %s -c -### 2>&1 | FileCheck --check-prefix=UNUSED %s -// RUN: %clang -target aarch64 -mbranches-within-32B-boundaries %s -c -### 2>&1 | FileCheck --check-prefix=UNUSED %s +// RUN: not %clang -target aarch64 -malign-branch=jmp %s -c -### 2>&1 | FileCheck --check-prefix=UNUSED %s +// RUN: not %clang -target aarch64 -malign-branch-boundary=7 %s -c -### 2>&1 | FileCheck --check-prefix=UNUSED %s +// RUN: not %clang -target aarch64 -mpad-max-prefix-size=15 %s -c -### 2>&1 | FileCheck --check-prefix=UNUSED %s +// RUN: not %clang -target aarch64 -mbranches-within-32B-boundaries %s -c -### 2>&1 | FileCheck --check-prefix=UNUSED %s // UNUSED: error: unsupported option '{{.*}}' for target '{{.*}}' diff --git a/clang/test/Driver/x86-target-features.c b/clang/test/Driver/x86-target-features.c --- a/clang/test/Driver/x86-target-features.c +++ b/clang/test/Driver/x86-target-features.c @@ -378,7 +378,7 @@ // RUN: %clang --target=i386 -march=i386 -mharden-sls=indirect-jmp %s -### -o %t.o 2>&1 | FileCheck -check-prefixes=SLS-IJMP,NO-SLS %s // RUN: %clang --target=i386 -march=i386 -mharden-sls=none -mharden-sls=all %s -### -o %t.o 2>&1 | FileCheck -check-prefixes=SLS-IJMP,SLS-RET %s // RUN: %clang --target=i386 -march=i386 -mharden-sls=all -mharden-sls=none %s -### -o %t.o 2>&1 | FileCheck -check-prefix=NO-SLS %s -// RUN: %clang --target=i386 -march=i386 -mharden-sls=return,indirect-jmp %s -### -o %t.o 2>&1 | FileCheck -check-prefix=BAD-SLS %s +// RUN: not %clang --target=i386 -march=i386 -mharden-sls=return,indirect-jmp %s -### -o %t.o 2>&1 | FileCheck -check-prefix=BAD-SLS %s // NO-SLS-NOT: "+harden-sls- // SLS-RET-DAG: "-target-feature" "+harden-sls-ret" // SLS-IJMP-DAG: "-target-feature" "+harden-sls-ijmp" diff --git a/clang/test/Driver/xcoff-build-id.c b/clang/test/Driver/xcoff-build-id.c --- a/clang/test/Driver/xcoff-build-id.c +++ b/clang/test/Driver/xcoff-build-id.c @@ -6,8 +6,8 @@ // 3) a zero is added when odd number of digits is specified in the HEXSTRING. // RUN: %clang --target=powerpc-ibm-aix -### %t.o -Wl,-bdbg:ldrinfo:FOO -mxcoff-build-id=0x011ffFF 2>&1 | FileCheck %s --check-prefix=OTHER -// RUN: %clang --target=powerpc-ibm-aix -### %t.o -mxcoff-build-id=ff 2>&1 | FileCheck %s --check-prefix=BAD_INPUT -// RUN: %clang --target=powerpc-ibm-aix -### %t.o -mxcoff-build-id=0x0z 2>&1 | FileCheck %s --check-prefix=BAD_INPUT +// RUN: not %clang --target=powerpc-ibm-aix -### %t.o -mxcoff-build-id=ff 2>&1 | FileCheck %s --check-prefix=BAD_INPUT +// RUN: not %clang --target=powerpc-ibm-aix -### %t.o -mxcoff-build-id=0x0z 2>&1 | FileCheck %s --check-prefix=BAD_INPUT CHECK: "-bdbg:ldrinfo:xcoff_binary_id:0x12" OTHER: "-bdbg:ldrinfo:xcoff_binary_id:0x0011ffff" {{.*}} "-bdbg:ldrinfo:FOO" diff --git a/clang/test/OpenMP/linking.c b/clang/test/OpenMP/linking.c --- a/clang/test/OpenMP/linking.c +++ b/clang/test/OpenMP/linking.c @@ -55,12 +55,12 @@ // CHECK-IOMP5-LD-64: "-l[[DEFAULT_OPENMP_LIB:[^"]*]]" // CHECK-IOMP5-LD-64: "-lpthread" "-lc" // -// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: not %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: -fopenmp=lib -target i386-unknown-linux \ // RUN: | FileCheck --check-prefix=CHECK-LIB-LD-32 %s // CHECK-LIB-LD-32: error: unsupported argument 'lib' to option '-fopenmp=' // -// RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ +// RUN: not %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: -fopenmp=lib -target x86_64-unknown-linux \ // RUN: | FileCheck --check-prefix=CHECK-LIB-LD-64 %s // CHECK-LIB-LD-64: error: unsupported argument 'lib' to option '-fopenmp=' diff --git a/clang/test/Preprocessor/aarch64-target-features.c b/clang/test/Preprocessor/aarch64-target-features.c --- a/clang/test/Preprocessor/aarch64-target-features.c +++ b/clang/test/Preprocessor/aarch64-target-features.c @@ -140,8 +140,8 @@ // RUN: %clang -target aarch64-none-elf -march=armv8.2-a -x c -E -dM %s -o - | FileCheck --check-prefix=CHECK-QRDMX %s // CHECK-QRDMX: __ARM_FEATURE_QRDMX 1 -// RUN: %clang -target aarch64 -march=arm64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ARCH-NOT-ACCEPT %s -// RUN: %clang -target aarch64 -march=aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ARCH-NOT-ACCEPT %s +// RUN: not %clang -target aarch64 -march=arm64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ARCH-NOT-ACCEPT %s +// RUN: not %clang -target aarch64 -march=aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ARCH-NOT-ACCEPT %s // CHECK-ARCH-NOT-ACCEPT: error: unsupported argument {{.*}} to option '-march=' // RUN: %clang -target aarch64 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-GENERIC %s @@ -473,10 +473,10 @@ // RUN: %clang -target aarch64 -mtune=CyclonE -mcpu=cortex-a53 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-MTUNE %s // CHECK-MCPU-MTUNE: "-cc1"{{.*}} "-triple" "aarch64{{.*}}" "-target-feature" "+aes" "-target-feature" "+crc" "-target-feature" "+fp-armv8" "-target-feature" "+sha2" "-target-feature" "+neon" "-target-feature" "+zcm" "-target-feature" "+zcz" -// RUN: %clang -target aarch64 -mcpu=generic+neon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s -// RUN: %clang -target aarch64 -mcpu=generic+noneon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s -// RUN: %clang -target aarch64 -march=armv8-a+neon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s -// RUN: %clang -target aarch64 -march=armv8-a+noneon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s +// RUN: not %clang -target aarch64 -mcpu=generic+neon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s +// RUN: not %clang -target aarch64 -mcpu=generic+noneon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s +// RUN: not %clang -target aarch64 -march=armv8-a+neon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s +// RUN: not %clang -target aarch64 -march=armv8-a+noneon -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-ERROR-NEON %s // CHECK-ERROR-NEON: error: [no]neon is not accepted as modifier, please use [no]simd instead // RUN: %clang -target aarch64 -march=armv8.1a+crypto -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V81A-FEATURE-1 %s