summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Analysis/html-diags.c12
-rw-r--r--test/CoverageMapping/abspath.cpp2
-rw-r--r--test/Driver/compilation_database.c2
-rw-r--r--test/Driver/cpath.c8
-rw-r--r--test/Driver/darwin-ld-lto.c8
-rw-r--r--test/Driver/linker-opts.c6
-rw-r--r--test/Driver/output-file-cleanup.c50
-rw-r--r--test/Driver/parse-progname.c80
-rw-r--r--test/Driver/ps4-linker-non-win.c18
-rw-r--r--test/Driver/ps4-linker-win.c15
-rw-r--r--test/Driver/warning-options.cpp2
-rw-r--r--test/FixIt/fixit-include.c11
-rw-r--r--test/Format/style-on-command-line.cpp19
-rw-r--r--test/Lexer/case-insensitive-include-ms.c10
-rw-r--r--test/Lexer/case-insensitive-include-pr31836.sh6
-rw-r--r--test/Lexer/case-insensitive-include.c14
-rw-r--r--test/Lexer/case-insensitive-system-include.c10
-rw-r--r--test/Modules/crash-typo-correction-visibility.cpp5
-rw-r--r--test/Modules/modules-cache-path-canonicalization.m4
-rw-r--r--test/PCH/case-insensitive-include.c15
-rw-r--r--test/PCH/include-timestamp.cpp20
-rw-r--r--test/Preprocessor/cuda-types.cu32
-rw-r--r--test/Tooling/clang-diff-basic.cpp7
23 files changed, 185 insertions, 171 deletions
diff --git a/test/Analysis/html-diags.c b/test/Analysis/html-diags.c
index dd185b542a..78a378a66d 100644
--- a/test/Analysis/html-diags.c
+++ b/test/Analysis/html-diags.c
@@ -1,7 +1,7 @@
-// RUN: rm -fR %T/dir
-// RUN: mkdir %T/dir
-// RUN: %clang_analyze_cc1 -analyzer-output=html -analyzer-checker=core -o %T/dir %s
-// RUN: ls %T/dir | grep report
+// RUN: rm -fR %t
+// RUN: mkdir %t
+// RUN: %clang_analyze_cc1 -analyzer-output=html -analyzer-checker=core -o %t %s
+// RUN: ls %t | grep report
// D30406: Test new html-single-file output
// RUN: rm -fR %T/dir
@@ -10,9 +10,9 @@
// RUN: ls %T/dir | grep report
// PR16547: Test relative paths
-// RUN: cd %T/dir
+// RUN: cd %t
// RUN: %clang_analyze_cc1 -analyzer-output=html -analyzer-checker=core -o testrelative %s
-// RUN: ls %T/dir/testrelative | grep report
+// RUN: ls %t/testrelative | grep report
// Currently this test mainly checks that the HTML diagnostics doesn't crash
// when handling macros will calls with macros. We should actually validate
diff --git a/test/CoverageMapping/abspath.cpp b/test/CoverageMapping/abspath.cpp
index 667172e32c..4b92a3773d 100644
--- a/test/CoverageMapping/abspath.cpp
+++ b/test/CoverageMapping/abspath.cpp
@@ -4,7 +4,7 @@
// RMDOTS-NOT: Inputs
// RMDOTS: "
-// RUN: cd %T && mkdir -p test && cd test
+// RUN: mkdir -p %t/test && cd %t/test
// RUN: echo "void f1() {}" > f1.c
// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -main-file-name abspath.cpp ../test/f1.c -o - | FileCheck -check-prefix=RELPATH %s
diff --git a/test/Driver/compilation_database.c b/test/Driver/compilation_database.c
index d5bafd41a6..017178d60c 100644
--- a/test/Driver/compilation_database.c
+++ b/test/Driver/compilation_database.c
@@ -1,4 +1,4 @@
-// RUN: cd "%T"
+// RUN: mkdir -p %t && cd %t
// RUN: %clang -MD -MP --sysroot=somewhere -c -x c %s -xc++ %s -Wall -MJ - -no-canonical-prefixes 2>&1 | FileCheck %s
// RUN: not %clang -c -x c %s -MJ %s/non-existant -no-canonical-prefixes 2>&1 | FileCheck --check-prefix=ERROR %s
diff --git a/test/Driver/cpath.c b/test/Driver/cpath.c
index ea6ba49d6d..7d63913810 100644
--- a/test/Driver/cpath.c
+++ b/test/Driver/cpath.c
@@ -1,20 +1,20 @@
-// RUN: mkdir -p %T/test1 %T/test2 %T/test3
+// RUN: mkdir -p %t/test1 %t/test2 %t/test3
-// RUN: env "CPATH=%T/test1%{pathsep}%T/test2" %clang -x c -E -v %s 2>&1 | FileCheck %s -check-prefix=CPATH
+// RUN: env "CPATH=%t/test1%{pathsep}%t/test2" %clang -x c -E -v %s 2>&1 | FileCheck %s -check-prefix=CPATH
// CPATH: -I{{.*}}/test1
// CPATH: -I{{.*}}/test2
// CPATH: search starts here
// CPATH: test1
// CPATH: test2
-// RUN: env "OBJC_INCLUDE_PATH=%T/test1%{pathsep}%T/test2" OBJCPLUS_INCLUDE_PATH=%T/test1 "CPLUS_INCLUDE_PATH=%T/test1%{pathsep}%t/test2" C_INCLUDE_PATH=%T/test3 %clang -x c -E -v %s 2>&1 | FileCheck %s -check-prefix=C_INCLUDE_PATH
+// RUN: env "OBJC_INCLUDE_PATH=%t/test1%{pathsep}%t/test2" OBJCPLUS_INCLUDE_PATH=%t/test1 "CPLUS_INCLUDE_PATH=%t/test1%{pathsep}%t/test2" C_INCLUDE_PATH=%t/test3 %clang -x c -E -v %s 2>&1 | FileCheck %s -check-prefix=C_INCLUDE_PATH
// C_INCLUDE_PATH: -c-isystem {{"?.*}}/test3{{"?}} -cxx-isystem {{"?.*}}/test1{{"?}} -cxx-isystem {{"?.*}}/test2{{"?}} -objc-isystem {{"?.*}}/test1{{"?}} -objc-isystem {{"?.*}}/test2{{"?}} -objcxx-isystem {{"?.*}}/test1{{"?}}
// C_INCLUDE_PATH: search starts here
// C_INCLUDE_PATH-NOT: test1
// C_INCLUDE_PATH: test3
// C_INCLUDE_PATH-NOT: test1
-// RUN: env OBJC_INCLUDE_PATH=%T/test1 OBJCPLUS_INCLUDE_PATH=%T/test3 CPLUS_INCLUDE_PATH=%T/test3 C_INCLUDE_PATH=%T/test1 %clang -x objective-c++ -E -v %s 2>&1 | FileCheck %s -check-prefix=OBJCPLUS_INCLUDE_PATH
+// RUN: env OBJC_INCLUDE_PATH=%t/test1 OBJCPLUS_INCLUDE_PATH=%t/test3 CPLUS_INCLUDE_PATH=%t/test3 C_INCLUDE_PATH=%t/test1 %clang -x objective-c++ -E -v %s 2>&1 | FileCheck %s -check-prefix=OBJCPLUS_INCLUDE_PATH
// OBJCPLUS_INCLUDE_PATH: -c-isystem {{"?.*}}/test1{{"?}} -cxx-isystem {{"?.*}}/test3{{"?}} -objc-isystem {{"?.*}}/test1{{"?}} -objcxx-isystem {{"?.*}}/test3{{"?}}
// OBJCPLUS_INCLUDE_PATH: search starts here
// OBJCPLUS_INCLUDE_PATH-NOT: test1
diff --git a/test/Driver/darwin-ld-lto.c b/test/Driver/darwin-ld-lto.c
index 21c2214b77..2725df4f5f 100644
--- a/test/Driver/darwin-ld-lto.c
+++ b/test/Driver/darwin-ld-lto.c
@@ -2,11 +2,11 @@
// Check that ld gets "-lto_library".
-// RUN: mkdir -p %T/bin
-// RUN: mkdir -p %T/lib
-// RUN: touch %T/lib/libLTO.dylib
+// RUN: mkdir -p %t/bin
+// RUN: mkdir -p %t/lib
+// RUN: touch %t/lib/libLTO.dylib
// RUN: %clang -target x86_64-apple-darwin10 -### %s \
-// RUN: -ccc-install-dir %T/bin -mlinker-version=133 2> %t.log
+// RUN: -ccc-install-dir %t/bin -mlinker-version=133 2> %t.log
// RUN: FileCheck -check-prefix=LINK_LTOLIB_PATH %s -input-file %t.log
//
// LINK_LTOLIB_PATH: {{ld(.exe)?"}}
diff --git a/test/Driver/linker-opts.c b/test/Driver/linker-opts.c
index 29ef136c8b..5fe29d7a13 100644
--- a/test/Driver/linker-opts.c
+++ b/test/Driver/linker-opts.c
@@ -1,7 +1,7 @@
// RUN: rm -rf %t
// RUN: mkdir %t
//
-// RUN: env LIBRARY_PATH=%T/test1 %clang -x c %s -### 2>&1 | FileCheck %s
+// RUN: env LIBRARY_PATH=%t/test1 %clang -x c %s -### 2>&1 | FileCheck %s
// CHECK: "-L{{.*}}/test1"
// GCC driver is used as linker on cygming. It should be aware of LIBRARY_PATH.
@@ -10,8 +10,8 @@
// REQUIRES: native
// Make sure that LIBRARY_PATH works for both i386 and x86_64 on Darwin.
-// RUN: env LIBRARY_PATH=%T/test1 %clang -target x86_64-apple-darwin %s -### 2>&1 | FileCheck %s
-// RUN: env LIBRARY_PATH=%T/test1 %clang -target i386-apple-darwin %s -### 2>&1 | FileCheck %s
+// RUN: env LIBRARY_PATH=%t/test1 %clang -target x86_64-apple-darwin %s -### 2>&1 | FileCheck %s
+// RUN: env LIBRARY_PATH=%t/test1 %clang -target i386-apple-darwin %s -### 2>&1 | FileCheck %s
//
// Make sure that we don't warn on unused compiler arguments.
// RUN: %clang -Xclang -I. -x c %s -c -o %t/tmp.o
diff --git a/test/Driver/output-file-cleanup.c b/test/Driver/output-file-cleanup.c
index 314af4d6d3..74d64b0c17 100644
--- a/test/Driver/output-file-cleanup.c
+++ b/test/Driver/output-file-cleanup.c
@@ -25,30 +25,34 @@
invalid C code
#endif
-// RUN: touch %t1.c
-// RUN: echo "invalid C code" > %t2.c
-// RUN: cd %T && not %clang -S %t1.c %t2.c
-// RUN: test -f %t1.s
-// RUN: test ! -f %t2.s
-
-// RUN: touch %t1.c
-// RUN: touch %t2.c
-// RUN: chmod -r %t2.c
-// RUN: cd %T && not %clang -S %t1.c %t2.c
-// RUN: test -f %t1.s
-// RUN: test ! -f %t2.s
+// RUN: rm -rf %t-dir
+// RUN: mkdir -p %t-dir
+// RUN: cd %t-dir
+
+// RUN: touch %t-dir/1.c
+// RUN: echo "invalid C code" > %t-dir/2.c
+// RUN: not %clang -S %t-dir/1.c %t-dir/2.c
+// RUN: test -f %t-dir/1.s
+// RUN: test ! -f %t-dir/2.s
+
+// RUN: touch %t-dir/1.c
+// RUN: touch %t-dir/2.c
+// RUN: chmod -r %t-dir/2.c
+// RUN: not %clang -S %t-dir/1.c %t-dir/2.c
+// RUN: test -f %t-dir/1.s
+// RUN: test ! -f %t-dir/2.s
// When given multiple .c files to compile, clang compiles them in order until
// it hits an error, at which point it stops.
//
-// RUN: touch %t1.c
-// RUN: echo "invalid C code" > %t2.c
-// RUN: touch %t3.c
-// RUN: echo "invalid C code" > %t4.c
-// RUN: touch %t5.c
-// RUN: cd %T && not %clang -S %t1.c %t2.c %t3.c %t4.c %t5.c
-// RUN: test -f %t1.s
-// RUN: test ! -f %t2.s
-// RUN: test ! -f %t3.s
-// RUN: test ! -f %t4.s
-// RUN: test ! -f %t5.s
+// RUN: touch %t-dir/1.c
+// RUN: echo "invalid C code" > %t-dir/2.c
+// RUN: touch %t-dir/3.c
+// RUN: echo "invalid C code" > %t-dir/4.c
+// RUN: touch %t-dir/5.c
+// RUN: not %clang -S %t-dir/1.c %t-dir/2.c %t-dir/3.c %t-dir/4.c %t-dir/5.c
+// RUN: test -f %t-dir/1.s
+// RUN: test ! -f %t-dir/2.s
+// RUN: test ! -f %t-dir/3.s
+// RUN: test ! -f %t-dir/4.s
+// RUN: test ! -f %t-dir/5.s
diff --git a/test/Driver/parse-progname.c b/test/Driver/parse-progname.c
index 33c6378223..c432b10e31 100644
--- a/test/Driver/parse-progname.c
+++ b/test/Driver/parse-progname.c
@@ -1,58 +1,58 @@
// REQUIRES: shell, arm-registered-target
-
-
-// RUN: ln -fs %clang %T/clang++
-// RUN: ln -fs %clang %T/clang++3.5.0
-// RUN: ln -fs %clang %T/clang++-3.5
-// RUN: ln -fs %clang %T/clang++-tot
-// RUN: ln -fs %clang %T/clang-c++
-// RUN: ln -fs %clang %T/clang-g++
-// RUN: ln -fs %clang %T/c++
-// RUN: ln -fs %clang %T/foo-clang++
-// RUN: ln -fs %clang %T/foo-clang++-3.5
-// RUN: ln -fs %clang %T/foo-clang++3.5
-// RUN: %T/clang++ -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
-// RUN: %T/clang++3.5.0 -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
-// RUN: %T/clang++-3.5 -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
-// RUN: %T/clang++-tot -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
-// RUN: %T/clang-c++ -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
-// RUN: %T/clang-g++ -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
-// RUN: %T/c++ -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
-// RUN: %T/foo-clang++ -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
-// RUN: %T/foo-clang++-3.5 -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
-// RUN: %T/foo-clang++3.5 -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
+// RUN: mkdir -p %t
+
+// RUN: ln -fs %clang %t/clang++
+// RUN: ln -fs %clang %t/clang++3.5.0
+// RUN: ln -fs %clang %t/clang++-3.5
+// RUN: ln -fs %clang %t/clang++-tot
+// RUN: ln -fs %clang %t/clang-c++
+// RUN: ln -fs %clang %t/clang-g++
+// RUN: ln -fs %clang %t/c++
+// RUN: ln -fs %clang %t/foo-clang++
+// RUN: ln -fs %clang %t/foo-clang++-3.5
+// RUN: ln -fs %clang %t/foo-clang++3.5
+// RUN: %t/clang++ -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
+// RUN: %t/clang++3.5.0 -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
+// RUN: %t/clang++-3.5 -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
+// RUN: %t/clang++-tot -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
+// RUN: %t/clang-c++ -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
+// RUN: %t/clang-g++ -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
+// RUN: %t/c++ -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
+// RUN: %t/foo-clang++ -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
+// RUN: %t/foo-clang++-3.5 -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
+// RUN: %t/foo-clang++3.5 -### %s 2>&1 | FileCheck -check-prefix=CXXMODE %s
// CXXMODE: "-x" "c++"
-// RUN: ln -fs %clang %T/clang-cl
-// RUN: ln -fs %clang %T/cl
-// RUN: ln -fs %clang %T/cl.exe
-// RUN: ln -fs %clang %T/clang-cl3.5
-// RUN: ln -fs %clang %T/clang-cl-3.5
+// RUN: ln -fs %clang %t/clang-cl
+// RUN: ln -fs %clang %t/cl
+// RUN: ln -fs %clang %t/cl.exe
+// RUN: ln -fs %clang %t/clang-cl3.5
+// RUN: ln -fs %clang %t/clang-cl-3.5
// Note: use -- in front of the filename so it's not mistaken for an option on
// filesystems that use slashes for dir separators.
-// RUN: %T/clang-cl -### -- %s 2>&1 | FileCheck -check-prefix=CLMODE %s
-// RUN: %T/cl -### -- %s 2>&1 | FileCheck -check-prefix=CLMODE %s
-// RUN: %T/cl.exe -### -- %s 2>&1 | FileCheck -check-prefix=CLMODE %s
-// RUN: %T/clang-cl3.5 -### -- %s 2>&1 | FileCheck -check-prefix=CLMODE %s
-// RUN: %T/clang-cl-3.5 -### -- %s 2>&1 | FileCheck -check-prefix=CLMODE %s
+// RUN: %t/clang-cl -### -- %s 2>&1 | FileCheck -check-prefix=CLMODE %s
+// RUN: %t/cl -### -- %s 2>&1 | FileCheck -check-prefix=CLMODE %s
+// RUN: %t/cl.exe -### -- %s 2>&1 | FileCheck -check-prefix=CLMODE %s
+// RUN: %t/clang-cl3.5 -### -- %s 2>&1 | FileCheck -check-prefix=CLMODE %s
+// RUN: %t/clang-cl-3.5 -### -- %s 2>&1 | FileCheck -check-prefix=CLMODE %s
// CLMODE: "-fdiagnostics-format" "msvc"
-// RUN: ln -fs %clang %T/clang-cpp
-// RUN: ln -fs %clang %T/cpp
-// RUN: %T/clang-cpp -### %s 2>&1 | FileCheck -check-prefix=CPPMODE %s
-// RUN: %T/cpp -### %s 2>&1 | FileCheck -check-prefix=CPPMODE %s
+// RUN: ln -fs %clang %t/clang-cpp
+// RUN: ln -fs %clang %t/cpp
+// RUN: %t/clang-cpp -### %s 2>&1 | FileCheck -check-prefix=CPPMODE %s
+// RUN: %t/cpp -### %s 2>&1 | FileCheck -check-prefix=CPPMODE %s
// CPPMODE: "-E"
-// RUN: ln -fs %clang %T/cl-clang
-// RUN: %T/cl-clang -### %s 2>&1 | FileCheck -check-prefix=CMODE %s
+// RUN: ln -fs %clang %t/cl-clang
+// RUN: %t/cl-clang -### %s 2>&1 | FileCheck -check-prefix=CMODE %s
// CMODE: "-x" "c"
// CMODE-NOT: "-fdiagnostics-format" "msvc"
-// RUN: ln -fs %clang %T/arm-linux-gnueabi-clang
-// RUN: %T/arm-linux-gnueabi-clang -### %s 2>&1 | FileCheck -check-prefix=TARGET %s
+// RUN: ln -fs %clang %t/arm-linux-gnueabi-clang
+// RUN: %t/arm-linux-gnueabi-clang -### %s 2>&1 | FileCheck -check-prefix=TARGET %s
// TARGET: Target: arm--linux-gnueabi
diff --git a/test/Driver/ps4-linker-non-win.c b/test/Driver/ps4-linker-non-win.c
index e2f8386b2c..3197292176 100644
--- a/test/Driver/ps4-linker-non-win.c
+++ b/test/Driver/ps4-linker-non-win.c
@@ -1,21 +1,21 @@
// UNSUPPORTED: system-windows
// REQUIRES: x86-registered-target
-// RUN: mkdir -p %T/Output
-// RUN: rm -f %T/Output/orbis-ld
-// RUN: touch %T/Output/orbis-ld
-// RUN: chmod +x %T/Output/orbis-ld
+// RUN: mkdir -p %t
+// RUN: rm -f %t/orbis-ld
+// RUN: touch %t/orbis-ld
+// RUN: chmod +x %t/orbis-ld
-// RUN: env "PATH=%T/Output:%PATH%" %clang -### -target x86_64-scei-ps4 %s -fuse-ld=gold 2>&1 \
+// RUN: env "PATH=%t:%PATH%" %clang -### -target x86_64-scei-ps4 %s -fuse-ld=gold 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PS4-LINKER %s
-// RUN: env "PATH=%T/Output:%PATH%" %clang -### -target x86_64-scei-ps4 %s -shared 2>&1 \
+// RUN: env "PATH=%t:%PATH%" %clang -### -target x86_64-scei-ps4 %s -shared 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PS4-LINKER %s
-// RUN: env "PATH=%T/Output:%PATH%" %clang -### -target x86_64-scei-ps4 %s 2>&1 \
+// RUN: env "PATH=%t:%PATH%" %clang -### -target x86_64-scei-ps4 %s 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PS4-LINKER %s
-// RUN: env "PATH=%T/Output:%PATH%" %clang -### -target x86_64-scei-ps4 %s -fuse-ld=ps4 2>&1 \
+// RUN: env "PATH=%t:%PATH%" %clang -### -target x86_64-scei-ps4 %s -fuse-ld=ps4 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PS4-LINKER %s
-// RUN: env "PATH=%T/Output:%PATH%" %clang -### -target x86_64-scei-ps4 %s -shared \
+// RUN: env "PATH=%t:%PATH%" %clang -### -target x86_64-scei-ps4 %s -shared \
// RUN: -fuse-ld=ps4 2>&1 | FileCheck --check-prefix=CHECK-PS4-LINKER %s
// CHECK-PS4-LINKER: /orbis-ld
diff --git a/test/Driver/ps4-linker-win.c b/test/Driver/ps4-linker-win.c
index 6fbd84bb6d..fafa579a07 100644
--- a/test/Driver/ps4-linker-win.c
+++ b/test/Driver/ps4-linker-win.c
@@ -7,19 +7,20 @@
// REQUIRES: system-windows, x86-registered-target
-// RUN: touch %T/orbis-ld.exe
-// RUN: touch %T/orbis-ld.gold.exe
+// RUN: mkdir -p %t
+// RUN: touch %t/orbis-ld.exe
+// RUN: touch %t/orbis-ld.gold.exe
-// RUN: env "PATH=%T;%PATH%;" %clang -target x86_64-scei-ps4 %s -fuse-ld=gold -### 2>&1 \
+// RUN: env "PATH=%t;%PATH%;" %clang -target x86_64-scei-ps4 %s -fuse-ld=gold -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PS4-GOLD %s
-// RUN: env "PATH=%T;%PATH%;" %clang -target x86_64-scei-ps4 %s -shared -### 2>&1 \
+// RUN: env "PATH=%t;%PATH%;" %clang -target x86_64-scei-ps4 %s -shared -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PS4-GOLD %s
-// RUN: env "PATH=%T;%PATH%;" %clang -target x86_64-scei-ps4 %s -### 2>&1 \
+// RUN: env "PATH=%t;%PATH%;" %clang -target x86_64-scei-ps4 %s -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PS4-LINKER %s
-// RUN: env "PATH=%T;%PATH%;" %clang -target x86_64-scei-ps4 %s -fuse-ld=ps4 -### 2>&1 \
+// RUN: env "PATH=%t;%PATH%;" %clang -target x86_64-scei-ps4 %s -fuse-ld=ps4 -### 2>&1 \
// RUN: | FileCheck --check-prefix=CHECK-PS4-LINKER %s
-// RUN: env "PATH=%T;%PATH%;" %clang -target x86_64-scei-ps4 %s -shared \
+// RUN: env "PATH=%t;%PATH%;" %clang -target x86_64-scei-ps4 %s -shared \
// RUN: -fuse-ld=ps4 -### 2>&1 | FileCheck --check-prefix=CHECK-PS4-LINKER %s
// CHECK-PS4-GOLD: \\orbis-ld.gold
diff --git a/test/Driver/warning-options.cpp b/test/Driver/warning-options.cpp
index 7b9d4ab53a..d836ad143a 100644
--- a/test/Driver/warning-options.cpp
+++ b/test/Driver/warning-options.cpp
@@ -4,5 +4,5 @@
// LARGE_VALUE_COPY_JOINED: -Wlarge-by-value-copy=128
// Check that -isysroot warns on nonexistent paths.
-// RUN: %clang -### -c -target i386-apple-darwin10 -isysroot %T/warning-options %s 2>&1 | FileCheck --check-prefix=CHECK-ISYSROOT %s
+// RUN: %clang -### -c -target i386-apple-darwin10 -isysroot %t/warning-options %s 2>&1 | FileCheck --check-prefix=CHECK-ISYSROOT %s
// CHECK-ISYSROOT: warning: no such sysroot directory: '{{.*}}/warning-options'
diff --git a/test/FixIt/fixit-include.c b/test/FixIt/fixit-include.c
index fd5d7a9ac1..455455687c 100644
--- a/test/FixIt/fixit-include.c
+++ b/test/FixIt/fixit-include.c
@@ -1,12 +1,13 @@
// RUN: %clang_cc1 -fsyntax-only -Wall -pedantic -verify %s
-// RUN: cp %s %t
-// RUN: cp %S/fixit-include.h %T
-// RUN: not %clang_cc1 -fsyntax-only -fixit %t
-// RUN: %clang_cc1 -Wall -pedantic %t
+// RUN: mkdir -p %t-dir
+// RUN: cp %s %t-dir/fixit-include.c
+// RUN: cp %S/fixit-include.h %t-dir/fixit-include.h
+// RUN: not %clang_cc1 -fsyntax-only -fixit %t-dir/fixit-include.c
+// RUN: %clang_cc1 -Wall -pedantic %t-dir/fixit-include.c
// RUN: not %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s 2>&1 | FileCheck %s
#include <fixit-include.h> // expected-error {{'fixit-include.h' file not found with <angled> include; use "quotes" instead}}
-// CHECK: fix-it:{{.*}}:{8:10-8:27}
+// CHECK: fix-it:{{.*}}:{9:10-9:27}
#pragma does_not_exist // expected-warning {{unknown pragma ignored}}
diff --git a/test/Format/style-on-command-line.cpp b/test/Format/style-on-command-line.cpp
index b2724353da..0e6078e2fd 100644
--- a/test/Format/style-on-command-line.cpp
+++ b/test/Format/style-on-command-line.cpp
@@ -2,20 +2,21 @@
// RUN: clang-format -style="{BasedOnStyle: LLVM, IndentWidth: 7}" %s | FileCheck -strict-whitespace -check-prefix=CHECK2 %s
// RUN: not clang-format -style="{BasedOnStyle: invalid, IndentWidth: 7}" -fallback-style=LLVM %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK3 %s
// RUN: not clang-format -style="{lsjd}" %s -fallback-style=LLVM 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK4 %s
-// RUN: printf "BasedOnStyle: google\nIndentWidth: 5\n" > %T/.clang-format
-// RUN: clang-format -style=file -assume-filename=%T/foo.cpp < %s | FileCheck -strict-whitespace -check-prefix=CHECK5 %s
-// RUN: printf "\n" > %T/.clang-format
-// RUN: not clang-format -style=file -fallback-style=webkit -assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK6 %s
-// RUN: rm %T/.clang-format
-// RUN: printf "BasedOnStyle: google\nIndentWidth: 6\n" > %T/_clang-format
-// RUN: clang-format -style=file -assume-filename=%T/foo.cpp < %s | FileCheck -strict-whitespace -check-prefix=CHECK7 %s
+// RUN: mkdir -p %t
+// RUN: printf "BasedOnStyle: google\nIndentWidth: 5\n" > %t/.clang-format
+// RUN: clang-format -style=file -assume-filename=%t/foo.cpp < %s | FileCheck -strict-whitespace -check-prefix=CHECK5 %s
+// RUN: printf "\n" > %t/.clang-format
+// RUN: not clang-format -style=file -fallback-style=webkit -assume-filename=%t/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK6 %s
+// RUN: rm %t/.clang-format
+// RUN: printf "BasedOnStyle: google\nIndentWidth: 6\n" > %t/_clang-format
+// RUN: clang-format -style=file -assume-filename=%t/foo.cpp < %s | FileCheck -strict-whitespace -check-prefix=CHECK7 %s
// RUN: clang-format -style="{BasedOnStyle: LLVM, PointerBindsToType: true}" %s | FileCheck -strict-whitespace -check-prefix=CHECK8 %s
// RUN: clang-format -style="{BasedOnStyle: WebKit, PointerBindsToType: false}" %s | FileCheck -strict-whitespace -check-prefix=CHECK9 %s
// Fallback style tests
// Test config file with no based style, and fallback style "none", formatting is applied
-// RUN: printf "IndentWidth: 6\n" > %T/_clang-format
-// RUN: clang-format -style=file -fallback-style=none -assume-filename=%T/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK10 %s
+// RUN: printf "IndentWidth: 6\n" > %t/_clang-format
+// RUN: clang-format -style=file -fallback-style=none -assume-filename=%t/foo.cpp < %s 2>&1 | FileCheck -strict-whitespace -check-prefix=CHECK10 %s
// Test yaml with no based style, and fallback style "none", LLVM formatting applied
// RUN: clang-format -style="{IndentWidth: 7}" -fallback-style=none %s | FileCheck -strict-whitespace -check-prefix=CHECK11 %s
diff --git a/test/Lexer/case-insensitive-include-ms.c b/test/Lexer/case-insensitive-include-ms.c
index 86bd8bba68..a7101544fe 100644
--- a/test/Lexer/case-insensitive-include-ms.c
+++ b/test/Lexer/case-insensitive-include-ms.c
@@ -1,10 +1,10 @@
// REQUIRES: case-insensitive-filesystem
-// RUN: mkdir -p %T/apath
-// RUN: cp %S/Inputs/case-insensitive-include.h %T
-// RUN: cd %T
-// RUN: %clang_cc1 -fsyntax-only -fms-compatibility %s -include %s -I %T -verify
-// RUN: %clang_cc1 -fsyntax-only -fms-compatibility -fdiagnostics-parseable-fixits %s -include %s -I %T 2>&1 | FileCheck %s
+// RUN: mkdir -p %t/Output/apath
+// RUN: cp %S/Inputs/case-insensitive-include.h %t/Output
+// RUN: cd %t/Output
+// RUN: %clang_cc1 -fsyntax-only -fms-compatibility %s -include %s -I %t/Output -verify
+// RUN: %clang_cc1 -fsyntax-only -fms-compatibility -fdiagnostics-parseable-fixits %s -include %s -I %t/Output 2>&1 | FileCheck %s
#include "..\Output\.\case-insensitive-include.h"
#include "..\Output\.\Case-Insensitive-Include.h" // expected-warning {{non-portable path}}
diff --git a/test/Lexer/case-insensitive-include-pr31836.sh b/test/Lexer/case-insensitive-include-pr31836.sh
index a419f26faf..e842badc7f 100644
--- a/test/Lexer/case-insensitive-include-pr31836.sh
+++ b/test/Lexer/case-insensitive-include-pr31836.sh
@@ -1,9 +1,9 @@
// REQUIRES: case-insensitive-filesystem
// UNSUPPORTED: system-windows
-// RUN: mkdir -p %T
-// RUN: touch %T/case-insensitive-include-pr31836.h
-// RUN: echo "#include \"%T/Case-Insensitive-Include-Pr31836.h\"" | %clang_cc1 -E - 2>&1 | FileCheck %s
+// RUN: mkdir -p %t
+// RUN: touch %t/case-insensitive-include-pr31836.h
+// RUN: echo "#include \"%t/Case-Insensitive-Include-Pr31836.h\"" | %clang_cc1 -E - 2>&1 | FileCheck %s
// CHECK: warning: non-portable path to file
// CHECK-SAME: /case-insensitive-include-pr31836.h
diff --git a/test/Lexer/case-insensitive-include.c b/test/Lexer/case-insensitive-include.c
index 13e5b59942..099555de5f 100644
--- a/test/Lexer/case-insensitive-include.c
+++ b/test/Lexer/case-insensitive-include.c
@@ -1,12 +1,12 @@
// REQUIRES: case-insensitive-filesystem
-// RUN: mkdir -p %T/apath
-// RUN: mkdir -p %T/asystempath
-// RUN: cp %S/Inputs/case-insensitive-include.h %T
-// RUN: cp %S/Inputs/case-insensitive-include.h %T/asystempath/case-insensitive-include2.h
-// RUN: cd %T
-// RUN: %clang_cc1 -fsyntax-only %s -include %s -I %T -isystem %T/asystempath -verify
-// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s -include %s -I %T -isystem %T/asystempath 2>&1 | FileCheck %s
+// RUN: mkdir -p %t/Output/apath
+// RUN: mkdir -p %t/Output/asystempath
+// RUN: cp %S/Inputs/case-insensitive-include.h %t/Output
+// RUN: cp %S/Inputs/case-insensitive-include.h %t/Output/asystempath/case-insensitive-include2.h
+// RUN: cd %t/Output
+// RUN: %clang_cc1 -fsyntax-only %s -include %s -I %t/Output -isystem %t/Output/asystempath -verify
+// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s -include %s -I %t/Output -isystem %t/Output/asystempath 2>&1 | FileCheck %s
// Known standard header, so warn:
#include <StdDef.h> // expected-warning {{non-portable path}}
diff --git a/test/Lexer/case-insensitive-system-include.c b/test/Lexer/case-insensitive-system-include.c
index 9d5289cda2..20e0fc6456 100644
--- a/test/Lexer/case-insensitive-system-include.c
+++ b/test/Lexer/case-insensitive-system-include.c
@@ -1,10 +1,10 @@
// REQUIRES: case-insensitive-filesystem
-// RUN: mkdir -p %T/asystempath
-// RUN: cp %S/Inputs/case-insensitive-include.h %T/asystempath/
-// RUN: cd %T
-// RUN: %clang_cc1 -fsyntax-only %s -include %s -isystem %T/asystempath -verify -Wnonportable-system-include-path
-// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s -include %s -isystem %T/asystempath -Wnonportable-system-include-path 2>&1 | FileCheck %s
+// RUN: mkdir -p %t/asystempath
+// RUN: cp %S/Inputs/case-insensitive-include.h %t/asystempath/
+// RUN: cd %t
+// RUN: %clang_cc1 -fsyntax-only %s -include %s -isystem %t/asystempath -verify -Wnonportable-system-include-path
+// RUN: %clang_cc1 -fsyntax-only -fdiagnostics-parseable-fixits %s -include %s -isystem %t/asystempath -Wnonportable-system-include-path 2>&1 | FileCheck %s
#include "CASE-INSENSITIVE-INCLUDE.H" // expected-warning {{non-portable path}}
// CHECK: fix-it:"{{.*}}":{[[@LINE-1]]:10-[[@LINE-1]]:38}:"\"case-insensitive-include.h\""
diff --git a/test/Modules/crash-typo-correction-visibility.cpp b/test/Modules/crash-typo-correction-visibility.cpp
index 518293026a..9f0ed3b7b1 100644
--- a/test/Modules/crash-typo-correction-visibility.cpp
+++ b/test/Modules/crash-typo-correction-visibility.cpp
@@ -1,5 +1,6 @@
-// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-name=module -o %T/module.pcm -emit-module %S/Inputs/crash-typo-correction-visibility/module.modulemap
-// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-file=%T/module.pcm %s -verify
+// RUN: mkdir -p %t
+// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-name=module -o %t/module.pcm -emit-module %S/Inputs/crash-typo-correction-visibility/module.modulemap
+// RUN: %clang_cc1 -x c++ -std=c++11 -fmodules -fmodule-file=%t/module.pcm %s -verify
struct S {
int member; // expected-note {{declared here}}
diff --git a/test/Modules/modules-cache-path-canonicalization.m b/test/Modules/modules-cache-path-canonicalization.m
index 9d68cb06fa..a9d3e34786 100644
--- a/test/Modules/modules-cache-path-canonicalization.m
+++ b/test/Modules/modules-cache-path-canonicalization.m
@@ -1,4 +1,4 @@
-// RUN: rm -rf %t/cache %T/rel
+// RUN: rm -rf %t/cache %t/rel
// This testcase reproduces a use-after-free after looking up a PCM in
// a non-canonical modules-cache-path.
@@ -22,7 +22,7 @@
// Unrelated to the above: Check that a relative path is resolved correctly.
//
-// RUN: %clang_cc1 -working-directory %T/rel -fmodules-cache-path=./cache \
+// RUN: %clang_cc1 -working-directory %t/rel -fmodules-cache-path=./cache \
// RUN: -fmodules -fimplicit-module-maps -I %S/Inputs/outofdate-rebuild \
// RUN: -fdisable-module-hash %t.m -fsyntax-only -Rmodule-build 2>&1 \
// RUN: | FileCheck %s
diff --git a/test/PCH/case-insensitive-include.c b/test/PCH/case-insensitive-include.c
index 1dcda273c2..c721225397 100644
--- a/test/PCH/case-insensitive-include.c
+++ b/test/PCH/case-insensitive-include.c
@@ -1,18 +1,19 @@
// REQUIRES: case-insensitive-filesystem
// Test this without pch.
-// RUN: cp %S/Inputs/case-insensitive-include.h %T
-// RUN: %clang_cc1 -Wno-nonportable-include-path -fsyntax-only %s -include %s -I %T -verify
+// RUN: mkdir -p %t-dir
+// RUN: cp %S/Inputs/case-insensitive-include.h %t-dir
+// RUN: %clang_cc1 -Wno-nonportable-include-path -fsyntax-only %s -include %s -I %t-dir -verify
// Test with pch.
-// RUN: %clang_cc1 -emit-pch -o %t.pch %s -I %T
+// RUN: %clang_cc1 -emit-pch -o %t.pch %s -I %t-dir
// Modify inode of the header.
-// RUN: cp %T/case-insensitive-include.h %t.copy
-// RUN: touch -r %T/case-insensitive-include.h %t.copy
-// RUN: mv %t.copy %T/case-insensitive-include.h
+// RUN: cp %t-dir/case-insensitive-include.h %t.copy
+// RUN: touch -r %t-dir/case-insensitive-include.h %t.copy
+// RUN: mv %t.copy %t-dir/case-insensitive-include.h
-// RUN: %clang_cc1 -fsyntax-only %s -include-pch %t.pch -I %T -verify
+// RUN: %clang_cc1 -fsyntax-only %s -include-pch %t.pch -I %t-dir -verify
// expected-no-diagnostics
diff --git a/test/PCH/include-timestamp.cpp b/test/PCH/include-timestamp.cpp
index d7d0fab13a..36b887aee8 100644
--- a/test/PCH/include-timestamp.cpp
+++ b/test/PCH/include-timestamp.cpp
@@ -1,23 +1,25 @@
// Test that the timestamp is not included in the produced pch file with
// -fno-pch-timestamp.
+// RUN: mkdir -p %t-dir
+
// Copying files allow for read-only checkouts to run this test.
-// RUN: cp %S/Inputs/pragma-once2-pch.h %T
-// RUN: cp %S/Inputs/pragma-once2.h %T
-// RUN: cp %s %t1.cpp
+// RUN: cp %S/Inputs/pragma-once2-pch.h %t-dir
+// RUN: cp %S/Inputs/pragma-once2.h %t-dir
+// RUN: cp %s %t-dir/1.cpp
// Check timestamp is included by default.
-// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %T/pragma-once2-pch.h
-// RUN: touch -m -a -t 201008011501 %T/pragma-once2.h
-// RUN: not %clang_cc1 -include-pch %t %t1.cpp 2>&1 | FileCheck -check-prefix=CHECK-TIMESTAMP %s
+// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %t-dir/pragma-once2-pch.h
+// RUN: touch -m -a -t 201008011501 %t-dir/pragma-once2.h
+// RUN: not %clang_cc1 -include-pch %t %t-dir/1.cpp 2>&1 | FileCheck -check-prefix=CHECK-TIMESTAMP %s
// Check bitcode output as well.
// RUN: llvm-bcanalyzer -dump %t | FileCheck -check-prefix=CHECK-BITCODE-TIMESTAMP-ON %s
// Check timestamp inclusion is disabled by -fno-pch-timestamp.
-// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %T/pragma-once2-pch.h -fno-pch-timestamp
-// RUN: touch -m -a -t 201008011502 %T/pragma-once2.h
-// RUN: %clang_cc1 -include-pch %t %t1.cpp 2>&1
+// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %t-dir/pragma-once2-pch.h -fno-pch-timestamp
+// RUN: touch -m -a -t 201008011502 %t-dir/pragma-once2.h
+// RUN: %clang_cc1 -include-pch %t %t-dir/1.cpp 2>&1
// Check bitcode output as well.
// RUN: llvm-bcanalyzer -dump %t | FileCheck -check-prefix=CHECK-BITCODE-TIMESTAMP-OFF %s
diff --git a/test/Preprocessor/cuda-types.cu b/test/Preprocessor/cuda-types.cu
index 5f7b91655c..4ad3e4d97a 100644
--- a/test/Preprocessor/cuda-types.cu
+++ b/test/Preprocessor/cuda-types.cu
@@ -5,42 +5,44 @@
// FIXME: We really should make __GCC_HAVE_SYNC_COMPARE_AND_SWAP identical on
// host and device, but architecturally this is difficult at the moment.
+// RUN: mkdir -p %t
+
// RUN: %clang --cuda-host-only -nocudainc -target i386-unknown-linux-gnu -x cuda -E -dM -o - /dev/null \
// RUN: | grep 'define __[^ ]*\(TYPE\|MAX\|SIZEOF|WIDTH\)\|define __GCC_ATOMIC' \
-// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %T/i386-host-defines-filtered
+// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %t/i386-host-defines-filtered
// RUN: %clang --cuda-device-only -nocudainc -nocudalib -target i386-unknown-linux-gnu -x cuda -E -dM -o - /dev/null \
// RUN: | grep 'define __[^ ]*\(TYPE\|MAX\|SIZEOF|WIDTH\)\|define __GCC_ATOMIC' \
-// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %T/i386-device-defines-filtered
-// RUN: diff %T/i386-host-defines-filtered %T/i386-device-defines-filtered
+// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %t/i386-device-defines-filtered
+// RUN: diff %t/i386-host-defines-filtered %t/i386-device-defines-filtered
// RUN: %clang --cuda-host-only -nocudainc -target x86_64-unknown-linux-gnu -x cuda -E -dM -o - /dev/null \
// RUN: | grep 'define __[^ ]*\(TYPE\|MAX\|SIZEOF|WIDTH\)\|define __GCC_ATOMIC' \
-// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %T/x86_64-host-defines-filtered
+// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %t/x86_64-host-defines-filtered
// RUN: %clang --cuda-device-only -nocudainc -nocudalib -target x86_64-unknown-linux-gnu -x cuda -E -dM -o - /dev/null \
// RUN: | grep 'define __[^ ]*\(TYPE\|MAX\|SIZEOF|WIDTH\)\|define __GCC_ATOMIC' \
-// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %T/x86_64-device-defines-filtered
-// RUN: diff %T/x86_64-host-defines-filtered %T/x86_64-device-defines-filtered
+// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %t/x86_64-device-defines-filtered
+// RUN: diff %t/x86_64-host-defines-filtered %t/x86_64-device-defines-filtered
// RUN: %clang --cuda-host-only -nocudainc -target powerpc64-unknown-linux-gnu -x cuda -E -dM -o - /dev/null \
// RUN: | grep 'define __[^ ]*\(TYPE\|MAX\|SIZEOF|WIDTH\)\|define __GCC_ATOMIC' \
-// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %T/powerpc64-host-defines-filtered
+// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %t/powerpc64-host-defines-filtered
// RUN: %clang --cuda-device-only -nocudainc -nocudalib -target powerpc64-unknown-linux-gnu -x cuda -E -dM -o - /dev/null \
// RUN: | grep 'define __[^ ]*\(TYPE\|MAX\|SIZEOF|WIDTH\)\|define __GCC_ATOMIC' \
-// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %T/powerpc64-device-defines-filtered
-// RUN: diff %T/powerpc64-host-defines-filtered %T/powerpc64-device-defines-filtered
+// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %t/powerpc64-device-defines-filtered
+// RUN: diff %t/powerpc64-host-defines-filtered %t/powerpc64-device-defines-filtered
// RUN: %clang --cuda-host-only -nocudainc -target i386-windows-msvc -x cuda -E -dM -o - /dev/null \
// RUN: | grep 'define __[^ ]*\(TYPE\|MAX\|SIZEOF|WIDTH\)\|define __GCC_ATOMIC' \
-// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %T/i386-msvc-host-defines-filtered
+// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %t/i386-msvc-host-defines-filtered
// RUN: %clang --cuda-device-only -nocudainc -nocudalib -target i386-windows-msvc -x cuda -E -dM -o - /dev/null \
// RUN: | grep 'define __[^ ]*\(TYPE\|MAX\|SIZEOF|WIDTH\)\|define __GCC_ATOMIC' \
-// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %T/i386-msvc-device-defines-filtered
-// RUN: diff %T/i386-msvc-host-defines-filtered %T/i386-msvc-device-defines-filtered
+// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %t/i386-msvc-device-defines-filtered
+// RUN: diff %t/i386-msvc-host-defines-filtered %t/i386-msvc-device-defines-filtered
// RUN: %clang --cuda-host-only -nocudainc -target x86_64-windows-msvc -x cuda -E -dM -o - /dev/null \
// RUN: | grep 'define __[^ ]*\(TYPE\|MAX\|SIZEOF|WIDTH\)\|define __GCC_ATOMIC' \
-// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %T/x86_64-msvc-host-defines-filtered
+// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %t/x86_64-msvc-host-defines-filtered
// RUN: %clang --cuda-device-only -nocudainc -nocudalib -target x86_64-windows-msvc -x cuda -E -dM -o - /dev/null \
// RUN: | grep 'define __[^ ]*\(TYPE\|MAX\|SIZEOF|WIDTH\)\|define __GCC_ATOMIC' \
-// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %T/x86_64-msvc-device-defines-filtered
-// RUN: diff %T/x86_64-msvc-host-defines-filtered %T/x86_64-msvc-device-defines-filtered
+// RUN: | grep -v '__LDBL\|_LONG_DOUBLE' > %t/x86_64-msvc-device-defines-filtered
+// RUN: diff %t/x86_64-msvc-host-defines-filtered %t/x86_64-msvc-device-defines-filtered
diff --git a/test/Tooling/clang-diff-basic.cpp b/test/Tooling/clang-diff-basic.cpp
index 1f0a2a9357..e23abbd4ce 100644
--- a/test/Tooling/clang-diff-basic.cpp
+++ b/test/Tooling/clang-diff-basic.cpp
@@ -1,6 +1,7 @@
-// RUN: %clang_cc1 -E %s > %T/src.cpp
-// RUN: %clang_cc1 -E %s > %T/dst.cpp -DDEST
-// RUN: clang-diff -no-compilation-database %T/src.cpp %T/dst.cpp | FileCheck %s
+// RUN: mkdir -p %t
+// RUN: %clang_cc1 -E %s > %t/src.cpp
+// RUN: %clang_cc1 -E %s > %t/dst.cpp -DDEST
+// RUN: clang-diff -no-compilation-database %t/src.cpp %t/dst.cpp | FileCheck %s
#ifndef DEST
namespace src {