Skip to content

Commit 0c4c078

Browse files
committed
[test/CAS] Use a different way to trigger the "warning: argument unused during compilation" diagnostic for a couple of tests
1 parent 51f3a30 commit 0c4c078

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

clang/test/CAS/depscan-with-error.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
// RUN: 2>&1 | FileCheck %s -check-prefix=ERROR
77

88
// Using normal compilation as baseline.
9-
// RUN: not %clang -target x86_64-apple-macos11 -c %s -o %t.o -fmodules-cache-path=%t/mcp --serialize-diagnostics %t/t1.diag \
9+
// RUN: not %clang -target x86_64-apple-macos11 -c %s -o %t.o -arch=nonexistent --serialize-diagnostics %t/t1.diag \
1010
// RUN: 2>&1 | FileCheck %s -check-prefix=ERROR -check-prefix=DRIVER
1111
// RUN: not env LLVM_CACHE_CAS_PATH=%t/cas %clang-cache \
12-
// RUN: %clang -target x86_64-apple-macos11 -c %s -o %t.o -fmodules-cache-path=%t/mcp --serialize-diagnostics %t/t2.diag \
12+
// RUN: %clang -target x86_64-apple-macos11 -c %s -o %t.o -arch=nonexistent --serialize-diagnostics %t/t2.diag \
1313
// RUN: 2>&1 | FileCheck %s -check-prefix=ERROR -check-prefix=DRIVER
1414
// RUN: not env LLVM_CACHE_CAS_PATH=%t/cas cache-build-session %clang-cache \
15-
// RUN: %clang -target x86_64-apple-macos11 -c %s -o %t.o -fmodules-cache-path=%t/mcp --serialize-diagnostics %t/t3.diag \
15+
// RUN: %clang -target x86_64-apple-macos11 -c %s -o %t.o -arch=nonexistent --serialize-diagnostics %t/t3.diag \
1616
// RUN: 2>&1 | FileCheck %s -check-prefix=ERROR -check-prefix=DRIVER
1717

1818
// RUN: diff %t/t1.diag %t/t2.diag

clang/test/CAS/fcache-compile-job-serialized-diagnostics.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,19 @@
3838

3939
// Make sure warnings are merged with driver ones.
4040
// Using normal compilation as baseline.
41-
// RUN: %clang -target x86_64-apple-macos11 -c %s -o %t/t.o -fmodules-cache-path=%t/mcp --serialize-diagnostics %t/t1.diag \
41+
// RUN: %clang -target x86_64-apple-macos11 -c %s -o %t/t.o -arch=nonexistent --serialize-diagnostics %t/t1.diag \
4242
// RUN: 2>&1 | FileCheck %s -check-prefix=WARN
4343
// RUN: env LLVM_CACHE_CAS_PATH=%t/cas %clang-cache \
44-
// RUN: %clang -target x86_64-apple-macos11 -c %s -o %t/t.o -fmodules-cache-path=%t/mcp --serialize-diagnostics %t/t2.diag \
44+
// RUN: %clang -target x86_64-apple-macos11 -c %s -o %t/t.o -arch=nonexistent --serialize-diagnostics %t/t2.diag \
4545
// RUN: 2>&1 | FileCheck %s -check-prefix=WARN
4646
// RUN: diff %t/t1.diag %t/t2.diag
4747

4848
// Try again with cache hit.
4949
// RUN: rm %t/t2.diag
5050
// RUN: env LLVM_CACHE_CAS_PATH=%t/cas %clang-cache \
51-
// RUN: %clang -target x86_64-apple-macos11 -c %s -o %t/t.o -fmodules-cache-path=%t/mcp --serialize-diagnostics %t/t2.diag
51+
// RUN: %clang -target x86_64-apple-macos11 -c %s -o %t/t.o -arch=nonexistent --serialize-diagnostics %t/t2.diag
5252
// RUN: env LLVM_CACHE_CAS_PATH=%t/cas %clang-cache \
53-
// RUN: %clang -target x86_64-apple-macos11 -c %s -o %t/t.o -fmodules-cache-path=%t/mcp --serialize-diagnostics %t/t2.diag \
53+
// RUN: %clang -target x86_64-apple-macos11 -c %s -o %t/t.o -arch=nonexistent --serialize-diagnostics %t/t2.diag \
5454
// RUN: 2>&1 | FileCheck %s -check-prefix=WARN
5555
// RUN: diff %t/t1.diag %t/t2.diag
5656

0 commit comments

Comments
 (0)