1// RUN: %clang_cc1 -std=c++1z -fmodules-ts %s -verify
2// expected-no-diagnostics
3export module M;
4
5export int external_linkage_var;
6int module_linkage_var;
7static int internal_linkage_var;
8
9export void external_linkage_fn() {}
10void module_linkage_fn() {}
11static void internal_linkage_fn() {}
12
13export struct external_linkage_class {};
14struct module_linkage_class {};
15namespace {
16  struct internal_linkage_class {};
17}
18
19void use() {
20  external_linkage_fn();
21  module_linkage_fn();
22  internal_linkage_fn();
23  (void)external_linkage_class{};
24  (void)module_linkage_class{};
25  (void)internal_linkage_class{};
26  (void)external_linkage_var;
27  (void)module_linkage_var;
28  (void)internal_linkage_var;
29}
30