2 // RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodules-local-submodule-visibility -I%S/Inputs/no-linkage -fmodule-map-file=%S/Inputs/no-linkage/module.modulemap %s -verify
6 namespace NS
{ int n
; } // expected-note {{candidate}}
7 struct Typedef
{ int n
; }; // expected-note {{candidate}}
8 int AliasDecl
; // expected-note {{candidate}}
9 int UsingDecl
; // expected-note {{candidate}}
10 namespace RealNS
= NS
; // expected-note {{candidate}}
11 typedef int Struct
; // expected-note {{candidate}}
12 enum { Variable
}; // expected-note {{candidate}}
13 const int AnotherNS
= 0; // expected-note {{candidate}}
14 const int Enumerator
= 0; // expected-note {{candidate}}
15 static int Overloads
; // expected-note {{candidate}}
17 // expected-note@decls.h:1 {{candidate}}
18 // expected-note@decls.h:2 {{candidate}}
19 // expected-note@decls.h:3 {{candidate}}
20 // expected-note@decls.h:4 {{candidate}}
21 // expected-note@decls.h:5 {{candidate}}
22 // expected-note@decls.h:6 {{candidate}}
23 // expected-note@decls.h:7 {{candidate}}
24 // expected-note@decls.h:8 {{candidate}}
25 // expected-note@decls.h:9 {{candidate}}
26 // expected-note@decls.h:10 {{candidate}}
27 // expected-note@decls.h:11 {{candidate}}
45 void use_things_again() {
46 use(Typedef().n
); // expected-error {{ambiguous}}
47 use(NS::n
); // expected-error {{ambiguous}}
48 use(AliasDecl
); // expected-error {{ambiguous}}
49 use(UsingDecl
); // expected-error {{ambiguous}}
50 use(RealNS::n
); // expected-error {{ambiguous}}
51 use(Struct(0)); // expected-error {{ambiguous}}
52 use(Variable
); // expected-error {{ambiguous}}
53 use(AnotherNS
); // expected-error {{ambiguous}}
54 use(Enumerator
); // expected-error {{ambiguous}}
55 use(Overloads
); // expected-error {{ambiguous}}