22// RUN: split-file %s %t
33//
44// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
5+ // RUN: -fforce-check-cxx20-modules-input-files \
56// RUN: %t/a.cppm -emit-module-interface -o %t/a.pcm
67//
78// RUN: echo "inline int bar = 46;" >> %t/foo.h
8- // RUNX: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
9- // RUNX: %t/use.cpp -fmodule-file=a=%t/a.pcm -verify -fsyntax-only
10- // RUNX: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
11- // RUNX: %t/a.pcm -emit-llvm -o - | FileCheck %t/a.ll
12- //
9+ // RUN: not %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
10+ // RUN: -fforce-check-cxx20-modules-input-files %t/a.pcm \
11+ // RUN: -emit-llvm -o - 2>&1 | FileCheck %t/a.cppm -check-prefix=CHECK-HEADER-FAILURE
12+ // RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
13+ // RUN: -fforce-check-cxx20-modules-input-files \
14+ // RUN: %t/a.cppm -emit-module-interface -o %t/a.pcm
15+
1316// RUN: echo "export int var = 43;" >> %t/a.cppm
14- // RUNX: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
15- // RUNX: %t/use.cpp -fmodule-file=a=%t/a.pcm -verify -fsyntax-only
16- // RUNX: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
17- // RUNX: %t/a.pcm -emit-llvm -o - | FileCheck %t/a.ll
1817//
1918// RUN: not %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
2019// RUN: -fforce-check-cxx20-modules-input-files %t/a.pcm \
@@ -30,4 +29,5 @@ module;
3029export module a;
3130export using ::foo;
3231
32+ // CHECK-HEADER-FAILURE: fatal error:{{.*}}foo.h' has been modified since the AST file {{.*}}was built
3333// CHECK-FAILURE: fatal error:{{.*}}a.cppm' has been modified since the AST file {{.*}}was built
0 commit comments