blob: e1a8d6e8b09c81cb33d031630a8ea97bf64a9205 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// RUN: rm -rf %t
// RUN: %clang_cc1 -x objective-c++ -fmodules -fmodule-cache-path %t -I %S/Inputs %s -verify
namespace N6 {
char &f(char);
}
@import namespaces_left;
@import namespaces_right;
void test() {
int &ir1 = N1::f(1);
int &ir2 = N2::f(1);
int &ir3 = N3::f(1);
float &fr1 = N1::f(1.0f);
float &fr2 = N2::f(1.0f);
double &dr1 = N2::f(1.0);
double &dr2 = N3::f(1.0);
}
// Test namespaces merged without a common first declaration.
namespace N5 {
char &f(char);
}
void testMerged() {
int &ir1 = N5::f(17);
int &ir2 = N6::f(17);
int &ir3 = N7::f(17);
double &fr1 = N5::f(1.0);
double &fr2 = N6::f(1.0);
double &fr3 = N7::f(1.0);
char &cr1 = N5::f('a');
char &cr2 = N6::f('b');
}
|