Skip to content

Commit d4cf1f2

Browse files
committed
Fix test failure
Because #145220 removes the remark which is always emitted if the modules driver is enabled, some tests fail because Clang emits no output at all. FileCheck will then complain about empty stdin. We fix this by using '-v' to ensure any output.
1 parent 465e613 commit d4cf1f2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

clang/test/Driver/modules-driver-cxx20-module-usage-scanner.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -105,14 +105,14 @@ module;
105105
export module A;
106106

107107
//--- comment-line-splice.cpp
108-
// RUN: %clang -std=c++23 -ccc-print-phases -fmodules-driver -Rmodules-driver \
108+
// RUN: %clang -std=c++23 -v -ccc-print-phases -fmodules-driver -Rmodules-driver \
109109
// RUN: %t/comment-line-splice.cpp %t/empty.cpp 2>&1 | FileCheck %s --check-prefix=CHECK13
110110
// CHECK13-NOT: remark: found C++20 module usage in file '{{.*}}' [-Rmodules-driver]
111111
// My comment continues next-line!\
112112
import A;
113113

114114
//--- comment-line-splice-trailing-whitespace.cpp
115-
// RUN: %clang -std=c++23 -ccc-print-phases -fmodules-driver -Rmodules-driver \
115+
// RUN: %clang -std=c++23 -v -ccc-print-phases -fmodules-driver -Rmodules-driver \
116116
// RUN: %t/comment-line-splice-trailing-whitespace.cpp %t/empty.cpp 2>&1 | FileCheck %s --check-prefix=CHECK14
117117
// CHECK14-NOT: remark: found C++20 module usage in file '{{.*}}' [-Rmodules-driver]
118118
// My comment continues next-line! This backslash has trailing whitespace. -> \
@@ -136,31 +136,31 @@ export\
136136
A;
137137

138138
//--- no-module-usage1.cpp
139-
// RUN: %clang -std=c++23 -ccc-print-phases -fmodules-driver -Rmodules-driver -ccc-print-phases \
139+
// RUN: %clang -std=c++23 -v -ccc-print-phases -fmodules-driver -Rmodules-driver -ccc-print-phases \
140140
// RUN: %t/no-module-usage1.cpp %t/empty.cpp 2>&1 | FileCheck %s --check-prefix=CHECK17
141141
// CHECK17-NOT: remark: found C++20 module usage in file '{{.*}}' [-Rmodules-driver]
142142
auto main() -> int {}
143143

144144
//--- no-module-usage2.cpp
145-
// RUN: %clang -std=c++23 -ccc-print-phases -fmodules-driver -Rmodules-driver -ccc-print-phases \
145+
// RUN: %clang -std=c++23 -v -ccc-print-phases -fmodules-driver -Rmodules-driver -ccc-print-phases \
146146
// RUN: %t/no-module-usage2.cpp %t/empty.cpp 2>&1 | FileCheck %s --check-prefix=CHECK18
147147
// CHECK18-NOT: remark: found C++20 module usage in file '{{.*}}' [-Rmodules-driver]
148148
moduleStruct{};
149149

150150
//--- no-module-usage3.cpp
151-
// RUN: %clang -std=c++23 -ccc-print-phases -fmodules-driver -Rmodules-driver -ccc-print-phases \
151+
// RUN: %clang -std=c++23 -v -ccc-print-phases -fmodules-driver -Rmodules-driver -ccc-print-phases \
152152
// RUN: %t/no-module-usage3.cpp %t/empty.cpp 2>&1 | FileCheck %s --check-prefix=CHECK19
153153
// CHECK19-NOT: remark: found C++20 module usage in file '{{.*}}' [-Rmodules-driver]
154154
export_struct{};
155155

156156
//--- no-module-usage-namespace-import.cpp
157-
// RUN: %clang -std=c++23 -ccc-print-phases -fmodules-driver -Rmodules-driver -ccc-print-phases \
157+
// RUN: %clang -std=c++23 -v -ccc-print-phases -fmodules-driver -Rmodules-driver -ccc-print-phases \
158158
// RUN: %t/no-module-usage-namespace-import.cpp %t/empty.cpp 2>&1 | FileCheck %s --check-prefix=CHECK20
159159
// CHECK20-NOT: remark: found C++20 module usage in file '{{.*}}' [-Rmodules-driver]
160160
import::inner xi = {};
161161

162162
//--- no-module-usage-namespace-module.cpp
163-
// RUN: %clang -std=c++23 -ccc-print-phases -fmodules-driver -Rmodules-driver -ccc-print-phases \
163+
// RUN: %clang -std=c++23 -v -ccc-print-phases -fmodules-driver -Rmodules-driver -ccc-print-phases \
164164
// RUN: %t/no-module-usage-namespace-module.cpp %t/empty.cpp 2>&1 | FileCheck %s --check-prefix=CHECK21
165165
// CHECK21-NOT: remark: found C++20 module usage in file '{{.*}}' [-Rmodules-driver]
166166
module::inner yi = {};

0 commit comments

Comments
 (0)