blob: 30177dc73c1c97515ddb9fc4cfd90b44f293273d [file] [log] [blame]
Douglas Gregor08142532011-08-26 23:56:07 +00001
Douglas Gregorca975892011-08-31 18:19:09 +00002#define import __import_module__
Douglas Gregor08142532011-08-26 23:56:07 +00003import lookup_left_cxx;
Douglas Gregorca975892011-08-31 18:19:09 +00004#define IMPORT(X) __import_module__ X
Douglas Gregor08142532011-08-26 23:56:07 +00005IMPORT(lookup_right_cxx);
6
Douglas Gregor94619c82011-08-24 19:03:07 +00007void test(int i, float f) {
8 // unqualified lookup
9 f0(&i);
10 f0(&f);
11
12 // qualified lookup into the translation unit
13 ::f0(&i);
14 ::f0(&f);
15}
16
Douglas Gregor81ac8422011-11-16 00:21:54 +000017// RUN: rm -rf %t
18// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=lookup_left_cxx -x c++ %S/Inputs/module.map -verify
19// RUN: %clang_cc1 -emit-module-from-map -fmodule-cache-path %t -fmodule-name=lookup_right_cxx -x c++ %S/Inputs/module.map -verify
20// RUN: %clang_cc1 -x c++ -fmodule-cache-path %t %s -verify
21// RUN: %clang_cc1 -ast-print -x c++ -fmodule-cache-path %t %s | FileCheck -check-prefix=CHECK-PRINT %s
Douglas Gregor1257f972011-08-24 21:27:34 +000022
23// CHECK-PRINT: int *f0(int *);
24// CHECK-PRINT: float *f0(float *);
25// CHECK-PRINT: void test(int i, float f)
26