2
2
// RUN: split-file %s %t
3
3
//
4
4
// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
5
+ // RUN: -fforce-check-cxx20-modules-input-files \
5
6
// RUN: %t/a.cppm -emit-module-interface -o %t/a.pcm
6
7
//
7
8
// 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
+
13
16
// 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
18
17
//
19
18
// RUN: not %clang_cc1 -std=c++20 -triple %itanium_abi_triple \
20
19
// RUN: -fforce-check-cxx20-modules-input-files %t/a.pcm \
@@ -30,4 +29,5 @@ module;
30
29
export module a;
31
30
export using ::foo;
32
31
32
+ // CHECK-HEADER-FAILURE: fatal error:{{.*}}foo.h' has been modified since the AST file {{.*}}was built
33
33
// CHECK-FAILURE: fatal error:{{.*}}a.cppm' has been modified since the AST file {{.*}}was built
0 commit comments