1 | |
2 | #define import @import |
3 | import lookup_left_cxx; |
4 | #undef import |
5 | #define IMPORT(X) @import X |
6 | IMPORT(lookup_right_cxx); |
7 | |
8 | // expected-warning@Inputs/lookup_left.hpp:3 {{weak identifier 'weak_identifier' never declared}} |
9 | |
10 | void test(int i, float f) { |
11 | // unqualified lookup |
12 | f0(&i); |
13 | f0(&f); |
14 | |
15 | // qualified lookup into the translation unit |
16 | ::f0(&i); |
17 | ::f0(&f); |
18 | } |
19 | |
20 | int import; |
21 | |
22 | void f() { |
23 | int import; |
24 | } |
25 | |
26 | // RUN: rm -rf %t |
27 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -emit-module -fmodules-cache-path=%t -fmodule-name=lookup_left_cxx %S/Inputs/module.map -verify |
28 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -emit-module -fmodules-cache-path=%t -fmodule-name=lookup_right_cxx %S/Inputs/module.map -verify |
29 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s -verify |
30 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -ast-print -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s | FileCheck -check-prefix=CHECK-PRINT %s |
31 | // FIXME: When we have a syntax for modules in C++, use that. |
32 | |
33 | // CHECK-PRINT: int *f0(int *); |
34 | // CHECK-PRINT: float *f0(float *); |
35 | // CHECK-PRINT: void test(int i, float f) |
36 | |
37 | |