blob: d3245f2935f9134d6d4d4d2045cd9a9d650fdd92 [file] [log] [blame]
Douglas Gregor6aa52ec2011-08-26 23:56:07 +00001
Douglas Gregor65030af2011-08-31 18:19:09 +00002#define import __import_module__
Douglas Gregor6aa52ec2011-08-26 23:56:07 +00003import lookup_left_cxx;
Douglas Gregor65030af2011-08-31 18:19:09 +00004#define IMPORT(X) __import_module__ X
Douglas Gregor6aa52ec2011-08-26 23:56:07 +00005IMPORT(lookup_right_cxx);
6
Douglas Gregor0d95f772011-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 Gregor6aa52ec2011-08-26 23:56:07 +000017// RUN: %clang_cc1 -emit-module -x c++ -verify -o %T/lookup_left_cxx.pcm %S/Inputs/lookup_left.hpp
18// RUN: %clang_cc1 -emit-module -x c++ -o %T/lookup_right_cxx.pcm %S/Inputs/lookup_right.hpp
Douglas Gregor6e975c42011-09-13 23:15:45 +000019// RUN: %clang_cc1 -x c++ -fmodule-cache-path %T -fdisable-module-hash %s -verify
20// RUN: %clang_cc1 -ast-print -x c++ -fmodule-cache-path %T -fdisable-module-hash %s | FileCheck -check-prefix=CHECK-PRINT %s
Douglas Gregor851c75a2011-08-24 21:27:34 +000021
22// CHECK-PRINT: int *f0(int *);
23// CHECK-PRINT: float *f0(float *);
24// CHECK-PRINT: void test(int i, float f)
25