3 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 %t/a.cppm -E -P -I%t -o %t/tmp 2>&1 | FileCheck %t/a.cppm
6 // RUN: %clang_cc1 -std=c++20 %t/a.cppm -E -P -I%t -o - 2>&1 \
7 // RUN: -Wno-include-angled-in-module-purview | FileCheck %t/a.cppm --check-prefix=CHECK-NO-WARN
8 // RUN: %clang_cc1 -std=c++20 %t/b.cpp -E -P -I%t -o - 2>&1 | FileCheck %t/a.cppm --check-prefix=CHECK-NO-WARN
15 // The headers not get included shouldn't be affected.
35 // CHECK: a.cppm:9:10: warning: '#include <filename>' attaches the declarations to the named module 'a'
36 // CHECK: a.cppm:10:10: warning: '#include <filename>' attaches the declarations to the named module 'a'
37 // CHECK: a.cppm:11:10: warning: '#include <filename>' attaches the declarations to the named module 'a'
38 // CHECK: In file included from {{.*}}/a.cppm:11
39 // CHECK-NEXT: b.h:1:10: warning: '#include <filename>' attaches the declarations to the named module 'a'
40 // CHECK: In file included from {{.*}}/a.cppm:13
41 // CHECK-NEXT: b.h:1:10: warning: '#include <filename>' attaches the declarations to the named module 'a'
50 // CHECK: a.cppm:24:10: warning: '#include <filename>' attaches the declarations to the named module 'a'
51 // CHECK: a.cppm:25:10: warning: '#include <filename>' attaches the declarations to the named module 'a'
52 // CHECK: a.cppm:26:10: warning: '#include <filename>' attaches the declarations to the named module 'a'
53 // CHECK: In file included from {{.*}}/a.cppm:26
54 // CHECK-NEXT: b.h:1:10: warning: '#include <filename>' attaches the declarations to the named module 'a'
55 // CHECK: In file included from {{.*}}/a.cppm:28
56 // CHECK-NEXT: b.h:1:10: warning: '#include <filename>' attaches the declarations to the named module 'a'
58 // We should have catched all warnings.
59 // CHECK: 10 warnings generated.
61 // CHECK-NO-WARN-NOT: warning
64 /// Don't recognize `module m);` as a module purview or report a spurious
65 /// warning for <stddef.h>.