diff options
Diffstat (limited to 'test/SemaCXX/modules-ts.cppm')
-rw-r--r-- | test/SemaCXX/modules-ts.cppm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/test/SemaCXX/modules-ts.cppm b/test/SemaCXX/modules-ts.cppm index 29122ec7dab50..2ea4958bffda1 100644 --- a/test/SemaCXX/modules-ts.cppm +++ b/test/SemaCXX/modules-ts.cppm @@ -13,7 +13,13 @@ export module foo; // expected-note@modules-ts.cppm:* {{loaded from}} #endif -static int m; // ok, internal linkage, so no redefinition error +static int m; +#if TEST == 2 // FIXME: 'm' has internal linkage, so there should be no error here +// expected-error@-2 {{redefinition of '}} +// expected-note@-3 {{unguarded header; consider using #ifdef guards or #pragma once}} +// FIXME: We should drop the "header from" in this diagnostic. +// expected-note-re@modules-ts.cppm:1 {{'{{.*}}modules-ts.cppm' included multiple times, additional include site in header from module 'foo'}} +#endif int n; #if TEST >= 2 // expected-error@-2 {{redefinition of '}} |