3 // RUN: split-file %s %t
6 // RUN: %clang_cc1 -std=c++20 M.cpp -fsyntax-only -DTEST_INTERFACE -verify
7 // RUN: %clang_cc1 -std=c++20 M.cpp -emit-module-interface -o M.pcm
8 // RUN: %clang_cc1 -std=c++20 useM.cpp -fsyntax-only -fmodule-file=M=M.pcm -verify
11 int f(); // #1, attached to the global module
12 int g(); // #2, attached to the global module
18 export
using ::f
; // OK, does not declare an entity, exports #1
20 // error: matches #2, but attached to M
21 int g(); // expected-error {{declaration of 'g' in module M follows declaration in the global module}}
22 // expected-note@decls.h:2 {{previous declaration is here}}
30 static int h(); // expected-error {{static declaration of 'h' follows non-static declaration}}
31 // expected-note@M.cpp:10 {{previous declaration is here}}
34 int k(); // expected-error {{declaration of 'k' in the global module follows declaration in module M}}
35 // expected-note@M.cpp:11 {{previous declaration is here}}