File tree Expand file tree Collapse file tree 8 files changed +12
-12
lines changed
dcl.dcl/dcl.module/dcl.module.interface Expand file tree Collapse file tree 8 files changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -12368,7 +12368,7 @@ def err_export_using_internal : Error<
1236812368 "using declaration referring to %1 with %select{internal|module|unknown}0 "
1236912369 "linkage cannot be exported">;
1237012370def err_export_not_in_module_interface : Error<
12371- "export declaration can only be used within a module purview ">;
12371+ "export declaration can only be used within a module interface ">;
1237212372def err_export_inline_not_defined : Error<
1237312373 "inline function not defined%select{| before the private module fragment}0">;
1237412374def err_export_partition_impl : Error<
Original file line number Diff line number Diff line change 99namespace cwg820 { // cwg820: 2.7
1010export template <class T > struct B {};
1111// cxx98-17-warning@-1 {{exported templates are unsupported}}
12- // since-cxx20-error@-2 {{export declaration can only be used within a module purview }}
12+ // since-cxx20-error@-2 {{export declaration can only be used within a module interface }}
1313export template <typename T> void f () {}
1414// cxx98-17-warning@-1 {{exported templates are unsupported}}
15- // since-cxx20-error@-2 {{export declaration can only be used within a module purview }}
15+ // since-cxx20-error@-2 {{export declaration can only be used within a module interface }}
1616} // namespace cwg820
1717
1818namespace cwg873 { // cwg873: 3.0
Original file line number Diff line number Diff line change 99
1010// --- ExportDeclNotInModulePurview.cppm
1111// expected-error@* {{missing 'export module' declaration in module interface unit}}
12- export int b; // expected-error {{export declaration can only be used within a module purview }}
12+ export int b; // expected-error {{export declaration can only be used within a module interface }}
1313
1414// --- A.cppm
1515// expected-no-diagnostics
@@ -18,7 +18,7 @@ export int a;
1818
1919// --- AddExport.cppm
2020module A; // #module-decl
21- export int b; // expected-error {{export declaration can only be used within a module purview }}
21+ export int b; // expected-error {{export declaration can only be used within a module interface }}
2222// expected-note@#module-decl {{add 'export' here}}
2323
2424// --- AddExport2.cppm
Original file line number Diff line number Diff line change 77
88// --- errors.cpp
99module ;
10- export int a; // expected-error {{export declaration can only be used within a module purview }}
10+ export int a; // expected-error {{export declaration can only be used within a module interface }}
1111export module M;
1212export int b; // #1
1313namespace N {
@@ -37,8 +37,8 @@ namespace N {
3737// --- impl.cpp
3838module M; // #M
3939
40- export int b2; // expected-error {{export declaration can only be used within a module purview }}
40+ export int b2; // expected-error {{export declaration can only be used within a module interface }}
4141namespace N {
42- export int c2; // expected-error {{export declaration can only be used within a module purview }}
42+ export int c2; // expected-error {{export declaration can only be used within a module interface }}
4343}
4444// expected-note@#M 2+{{add 'export'}}
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ export int x;
1414module ;
1515
1616#include " std-10-2-ex1.h"
17- // expected-error@std-10-2-ex1.h:* {{export declaration can only be used within a module purview }}
17+ // expected-error@std-10-2-ex1.h:* {{export declaration can only be used within a module interface }}
1818
1919export module M1;
2020export namespace {} // expected-error {{anonymous namespaces cannot be exported}}
Original file line number Diff line number Diff line change 1111export module dummy;
1212
1313// --- test.cpp
14- export import dummy; // expected-error {{export declaration can only be used within a module purview }}
14+ export import dummy; // expected-error {{export declaration can only be used within a module interface }}
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ module;
110110
111111module AOK1;
112112
113- export import C; // expected-error {{export declaration can only be used within a module purview }}
113+ export import C; // expected-error {{export declaration can only be used within a module interface }}
114114
115115int theAnswer () { return 42 ; }
116116
Original file line number Diff line number Diff line change 11// RUN: %clang_cc1 -std=c++20 %s -fsyntax-only -verify
2- export struct Unit { // expected-error {{export declaration can only be used within a module purview }}
2+ export struct Unit { // expected-error {{export declaration can only be used within a module interface }}
33 bool operator <(const Unit &);
44};
You can’t perform that action at this time.
0 commit comments