| 1 |
// RUN: rm -rf %t |
| 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 |
| 3 |
|
| 4 |
#include "empty.h" |
| 5 |
|
| 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}} |
| 16 |
|
| 17 |
// [email protected]:1 {{candidate}} |
| 18 |
// [email protected]:2 {{candidate}} |
| 19 |
// [email protected]:3 {{candidate}} |
| 20 |
// [email protected]:4 {{candidate}} |
| 21 |
// [email protected]:5 {{candidate}} |
| 22 |
// [email protected]:6 {{candidate}} |
| 23 |
// [email protected]:7 {{candidate}} |
| 24 |
// [email protected]:8 {{candidate}} |
| 25 |
// [email protected]:9 {{candidate}} |
| 26 |
// [email protected]:10 {{candidate}} |
| 27 |
// [email protected]:11 {{candidate}} |
| 28 |
|
| 29 |
void use(int); |
| 30 |
void use_things() { |
| 31 |
use(Typedef().n); |
| 32 |
use(NS::n); |
| 33 |
use(AliasDecl); |
| 34 |
use(UsingDecl); |
| 35 |
use(RealNS::n); |
| 36 |
use(Struct(0)); |
| 37 |
use(Variable); |
| 38 |
use(AnotherNS); |
| 39 |
use(Enumerator); |
| 40 |
use(Overloads); |
| 41 |
} |
| 42 |
|
| 43 |
#include "decls.h" |
| 44 |
|
| 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}} |
| 56 |
} |