blob: 5e84532e60ff5652d264a7759ca954c80fda1518 [file] [log] [blame]
Douglas Gregor08142532011-08-26 23:56:07 +00001
Douglas Gregorda82e702012-01-03 19:32:59 +00002#define import @import
Douglas Gregor08142532011-08-26 23:56:07 +00003import lookup_left_cxx;
Douglas Gregorda82e702012-01-03 19:32:59 +00004#undef import
5#define IMPORT(X) @import X
Douglas Gregor08142532011-08-26 23:56:07 +00006IMPORT(lookup_right_cxx);
7
Douglas Gregor94619c82011-08-24 19:03:07 +00008void test(int i, float f) {
9 // unqualified lookup
10 f0(&i);
11 f0(&f);
12
13 // qualified lookup into the translation unit
14 ::f0(&i);
15 ::f0(&f);
16}
17
Douglas Gregor81ac8422011-11-16 00:21:54 +000018// RUN: rm -rf %t
Douglas Gregorda82e702012-01-03 19:32:59 +000019// RUN: %clang_cc1 -fmodules -x objective-c++ -emit-module -fmodule-cache-path %t -fmodule-name=lookup_left_cxx %S/Inputs/module.map -verify
20// RUN: %clang_cc1 -fmodules -x objective-c++ -emit-module -fmodule-cache-path %t -fmodule-name=lookup_right_cxx %S/Inputs/module.map -verify
21// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodule-cache-path %t %s -verify
22// RUN: %clang_cc1 -fmodules -ast-print -x objective-c++ -fmodule-cache-path %t %s | FileCheck -check-prefix=CHECK-PRINT %s
23// FIXME: When we have a syntax for modules in C++, use that.
Douglas Gregor1257f972011-08-24 21:27:34 +000024
25// CHECK-PRINT: int *f0(int *);
26// CHECK-PRINT: float *f0(float *);
27// CHECK-PRINT: void test(int i, float f)
28