[clang] 5619c67 - Fix clang/test/Modules/cxx20-fatal-module-loader-error.cpp (#238138)
via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 3 08:47:05 PST 2026
Author: Ariel-Burton
Date: 2026-11-03T11:46:59-05:00
New Revision: 5619c67ebfbb7ece43cc2a54c5e6f22b917d3bf2
URL: https://github.com/llvm/llvm-project/commit/5619c67ebfbb7ece43cc2a54c5e6f22b917d3bf2
DIFF: https://github.com/llvm/llvm-project/commit/5619c67ebfbb7ece43cc2a54c5e6f22b917d3bf2.diff
LOG: Fix clang/test/Modules/cxx20-fatal-module-loader-error.cpp (#238138)
On some platforms this test fails because the "2>&1" merges stdout and
stderr. This can cause the output to interleaved in unpredictable ways.
The work round is to keep the output streams separate and check each
independently
Added:
Modified:
clang/test/Modules/cxx20-fatal-module-loader-error.cpp
Removed:
################################################################################
diff --git a/clang/test/Modules/cxx20-fatal-module-loader-error.cpp b/clang/test/Modules/cxx20-fatal-module-loader-error.cpp
index ea2b3a2274fd3..f7468b530f2b2 100644
--- a/clang/test/Modules/cxx20-fatal-module-loader-error.cpp
+++ b/clang/test/Modules/cxx20-fatal-module-loader-error.cpp
@@ -1,9 +1,10 @@
// RUN: rm -rf %t
// RUN: mkdir %t
// RUN: touch %t/A.pcm
-// RUN: not %clang_cc1 -std=c++20 -fmodule-file=A=%t/A.pcm -ast-dump %s 2>&1 | FileCheck %s
+// RUN: not %clang_cc1 -std=c++20 -fmodule-file=A=%t/A.pcm -ast-dump %s 2> %t/A.stderr | FileCheck %s
+// RUN: FileCheck --check-prefix=CHECK-STDERR %s < %t/A.stderr
-// CHECK: fatal error: file '{{.*}}A.pcm' is not a valid module file
+// CHECK-STDERR: fatal error: file '{{.*}}A.pcm' is not a valid module file
// CHECK: VarDecl {{.*}} n 'int'
import A;
More information about the cfe-commits
mailing list