[clang] [clang][nfc] Fix tests to avoid writing output to unreachable location (PR #159138)
Vy Nguyen via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 16 10:33:46 PDT 2025
https://github.com/oontvoo created https://github.com/llvm/llvm-project/pull/159138
Note: this was originally done in (#158698) but was reverted in the pr/158844 (which re-applied the original rev)
>From a8fc11e4885aa4746fe15a783e55b6b338da7ba7 Mon Sep 17 00:00:00 2001
From: Vy Nguyen <vyng at google.com>
Date: Tue, 16 Sep 2025 13:30:42 -0400
Subject: [PATCH] [clang][nfc] Fix tests to avoid writing output to unreachable
location, which might cause them to fail
Note: this was originally done in (#158698) but was reverted in the pr/158844 (which re-applied the original rev)
---
clang/test/Driver/clang_f_opts.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/clang/test/Driver/clang_f_opts.c b/clang/test/Driver/clang_f_opts.c
index eb3994ddabcd3..7681ae73dfeb0 100644
--- a/clang/test/Driver/clang_f_opts.c
+++ b/clang/test/Driver/clang_f_opts.c
@@ -52,11 +52,11 @@
// CHECK-INTERCHANGE-LOOPS: "-floop-interchange"
// CHECK-NO-INTERCHANGE-LOOPS: "-fno-loop-interchange"
-// RUN: %clang -### -S -fexperimental-loop-fusion %s 2>&1 | FileCheck -check-prefix=CHECK-FUSE-LOOPS %s
+// RUN: %clang -### -S -fexperimental-loop-fusion %s -o /dev/null 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
More information about the cfe-commits
mailing list