Ensure clang test doesn't write out to the source directory
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 16 Dec 2022 23:39:28 +0000 (23:39 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 16 Dec 2022 23:39:28 +0000 (23:39 +0000)
clang/test/Misc/warn-not-error-Xfoo.c

index 49a594d..54d97c6 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clang -c -Xfoo %s 2>&1 | FileCheck --check-prefix=CHECK_STANDALONE_FOO %s
-// RUN: %clang -c -Xfoo=bar %s 2>&1 | FileCheck --check-prefix=CHECK_JOINED_FOO %s
+// RUN: %clang -c %s -o /dev/null -Xfoo < %s 2>&1 | FileCheck --check-prefix=CHECK_STANDALONE_FOO %s
+// RUN: %clang -c %s -o /dev/null -Xfoo=bar 2>&1 | FileCheck --check-prefix=CHECK_JOINED_FOO %s
 
 // This test ensures that we only warn on -X<unknown> and -X<unknown=value>
 // in case it is used downstream. If we error, we can't ignore it and some