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