[clang] [clang][nfc] Fix tests to avoid writing output to unreachable location, which might cause them to fail (PR #158698)

via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 15 10:46:31 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-clang-driver

Author: Vy Nguyen (oontvoo)

<details>
<summary>Changes</summary>

[clang][nfc] Fix tests to avoid writing output to unreachable location, which might cause them to fail

---
Full diff: https://github.com/llvm/llvm-project/pull/158698.diff


1 Files Affected:

- (modified) clang/test/Driver/clang_f_opts.c (+2-2) 


``````````diff
diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c
index eb3994ddabcd3..581b031eb7a86 100644
--- a/clang/test/Driver/clang_f_opts.c
+++ b/clang/test/Driver/clang_f_opts.c
@@ -55,8 +55,8 @@
 // RUN: %clang -### -S -fexperimental-loop-fusion %s 2>&1 | FileCheck -check-prefix=CHECK-FUSE-LOOPS %s
 // CHECK-FUSE-LOOPS: "-fexperimental-loop-fusion"
 //
-// RUN: %clang -c -fexperimental-loop-fusion -mllvm -print-pipeline-passes -O3 %s 2>&1 | FileCheck --check-prefixes=LOOP-FUSION-ON %s
-// RUN: %clang -c -mllvm -print-pipeline-passes -O3 %s 2>&1 | FileCheck --check-prefixes=LOOP-FUSION-OFF %s
+// RUN: %clang -c -fexperimental-loop-fusion -mllvm -print-pipeline-passes -O3 %s -o /dev/null 2>&1 | FileCheck --check-prefixes=LOOP-FUSION-ON %s
+// RUN: %clang -c -mllvm -print-pipeline-passes -O3 %s -o /dev/null 2>&1 | FileCheck --check-prefixes=LOOP-FUSION-OFF %s
 
 // LOOP-FUSION-ON: loop-fusion
 // LOOP-FUSION-OFF-NOT: loop-fusion

``````````

</details>


https://github.com/llvm/llvm-project/pull/158698


More information about the cfe-commits mailing list