That way, lit's builtin 'env' command can be used for the 'env' bit.
Also it's clearer that way that the 'not' shouldn't cover 'env'
failures.
llvm-svn: 374749
-# RUN: not env CLANGD_FLAGS=-index-file=no-such-index clangd -lit-test </dev/null 2>&1 >/dev/null | FileCheck %s
+# RUN: env CLANGD_FLAGS=-index-file=no-such-index not clangd -lit-test </dev/null 2>&1 >/dev/null | FileCheck %s
CHECK: I[{{.*}}] clangd version {{.*}}
CHECK: Working directory: {{.*}}
CHECK: argv[0]: clangd
// RUN: rm -rf %t
// RUN: mkdir -p %t/i %t/m %t
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only %s \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only %s \
// RUN: -I %S/Inputs/module -isysroot %/t/i/ \
// RUN: -fmodules -fmodules-cache-path=%t/m/ -DFOO=BAR 2>&1 | \
// RUN: FileCheck -check-prefix=CRASH_ENV %s
-// RUN: not env TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -gen-reproducer -fsyntax-only %s \
+// RUN: env TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -gen-reproducer -fsyntax-only %s \
// RUN: -I %S/Inputs/module -isysroot %/t/i/ \
// RUN: -fmodules -fmodules-cache-path=%t/m/ -DFOO=BAR 2>&1 | \
// RUN: FileCheck -check-prefix=CRASH_FLAG %s
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH=1 %clang -fsyntax-only -x c /dev/null -lstdc++ 2>&1 | FileCheck %s
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH=1 not %clang -fsyntax-only -x c /dev/null -lstdc++ 2>&1 | FileCheck %s
// FIXME: Investigating. "fatal error: file 'nul' modified since it was first processed"
// XFAIL: windows-gnu
// RUN: echo '// Foo.h' > %t/i/Foo.framework/Headers/Foo.h
// RUN: %hmaptool write %S/../Preprocessor/Inputs/headermap-rel/foo.hmap.json %t/i/foo.hmap
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only -fmodules -fmodules-cache-path=%t/m %s \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only -fmodules -fmodules-cache-path=%t/m %s \
// RUN: -I %t/i/foo.hmap -F %t/i 2>&1 | FileCheck %s
// RUN: FileCheck --check-prefix=CHECKSH %s -input-file %t/crash-vfs-*.sh
// RUN: -fmodules-cache-path=%t/cache -O0 \
// RUN: -isystem %S/Inputs/System/usr/include
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang %s -E -include-pch %t/out/pch-used.h.pch -fmodules -nostdlibinc \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang %s -E -include-pch %t/out/pch-used.h.pch -fmodules -nostdlibinc \
// RUN: -fimplicit-module-maps -fmodules-cache-path=%t/cache -O0 \
// RUN: -Xclang -fno-validate-pch -isystem %S/Inputs/System/usr/include \
// RUN: -o %t/output.E 2>&1 | FileCheck %s
// RUN: sed -e "s@INPUT_DIR@%/t@g" -e "s@OUT_DIR@%/t/example@g" \
// RUN: %S/../VFS/Inputs/vfsoverlay2.yaml > %t/srcvfs.yaml
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
// RUN: ASAN_OPTIONS=detect_leaks=0 \
-// RUN: %clang -fsyntax-only -nostdinc %s \
+// RUN: not %clang -fsyntax-only -nostdinc %s \
// RUN: -I %S/Inputs/crash-recovery/usr/include \
// RUN: -ivfsoverlay %t/srcvfs.yaml \
// RUN: -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
// RUN: mkdir -p %t/i %t/m %t %t/sysroot
// RUN: cp -R %S/Inputs/crash-recovery/usr %t/i/
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \
// RUN: -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
// RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-vfs-*.m
// RUN: cp -R %S/Inputs/crash-recovery/usr %t/i/
// RUN: ln -s include/tcl-private %t/i/usr/x
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \
// RUN: -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
// RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-vfs-*.m
// RUN: rm -f %t/i/usr/include/pthread_impl.h
// RUN: ln -s pthread/pthread_impl.h %t/i/usr/include/pthread_impl.h
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only %s -I %/t/i -isysroot %/t/sysroot/ \
// RUN: -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
// RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-vfs-*.m
// RUN: rm -rf %t
// RUN: mkdir -p %t/i %t/m %t
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only %s -I %S/Inputs/crash-recovery -isysroot %/t/i/ \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only %s -I %S/Inputs/crash-recovery -isysroot %/t/i/ \
// RUN: -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
// RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-vfs-*.m
// RUN: mkdir -p %t/m
// RUN: cd %S/Inputs/crash-recovery/usr
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only -nostdinc %s -Iinclude \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only -nostdinc %s -Iinclude \
// RUN: -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
// RUN: FileCheck --check-prefix=CHECKSRC %s -input-file %t/crash-vfs-*.m
// RUN: rm -rf %t
// RUN: mkdir -p %t/i %t/m %t
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only -nostdinc %s \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only -nostdinc %s \
// RUN: -I %S/Inputs/crash-recovery/usr/include -isysroot %/t/i/ \
// RUN: -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
// RUN: rm -rf %t
// RUN: mkdir -p %t/i %t/m %t
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -fsyntax-only -nostdinc %s \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -fsyntax-only -nostdinc %s \
// RUN: -I %S/Inputs/crash-recovery/usr/include -isysroot %/t/i/ \
// RUN: -fmodules -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
// RUN: mkdir -p %t/i/Frameworks/A.framework/Frameworks
// RUN: ln -s ../../B.framework %t/i/Frameworks/A.framework/Frameworks/B.framework
-// RUN: not env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
-// RUN: %clang -nostdinc -fsyntax-only %s \
+// RUN: env FORCE_CLANG_DIAGNOSTICS_CRASH= TMPDIR=%t TEMP=%t TMP=%t \
+// RUN: not %clang -nostdinc -fsyntax-only %s \
// RUN: -F %/t/i/Frameworks -fmodules \
// RUN: -fmodules-cache-path=%t/m/ 2>&1 | FileCheck %s
// RUN: cp "%s" "%t/abc/def/ijk/qwe/test.cpp"
// RUN: ln -sf %t/abc/def %t/abc/def2
// RUN: cd %t/abc/def2
-// RUN: not env PWD="%t/abc/def" clang-check "ijk/qwe/test.cpp" 2>&1 | FileCheck %s
+// RUN: env PWD="%t/abc/def" not clang-check "ijk/qwe/test.cpp" 2>&1 | FileCheck %s
// CHECK: C++ requires
// CHECK: /abc/def/ijk/qwe/test.cpp
// RUN: cp "%s" "%t/test.cpp"
// RUN: ln -sf %t %t.foobar
// RUN: cd %t
-// RUN: not env PWD="%t.foobar" clang-check -p "%t" "test.cpp" 2>&1|FileCheck %s
+// RUN: env PWD="%t.foobar" not clang-check -p "%t" "test.cpp" 2>&1|FileCheck %s
// FIXME: Make the above easier.
// CHECK: C++ requires