2011-08-27 07:56:07 +08:00
|
|
|
|
2011-09-01 02:19:09 +08:00
|
|
|
#define import __import_module__
|
2011-08-27 07:56:07 +08:00
|
|
|
import lookup_left_cxx;
|
2011-09-01 02:19:09 +08:00
|
|
|
#define IMPORT(X) __import_module__ X
|
2011-08-27 07:56:07 +08:00
|
|
|
IMPORT(lookup_right_cxx);
|
|
|
|
|
2011-08-25 03:03:07 +08:00
|
|
|
void test(int i, float f) {
|
|
|
|
// unqualified lookup
|
|
|
|
f0(&i);
|
|
|
|
f0(&f);
|
|
|
|
|
|
|
|
// qualified lookup into the translation unit
|
|
|
|
::f0(&i);
|
|
|
|
::f0(&f);
|
|
|
|
}
|
|
|
|
|
2011-11-16 08:21:54 +08:00
|
|
|
// RUN: rm -rf %t
|
2011-11-30 06:42:06 +08:00
|
|
|
// RUN: %clang_cc1 -emit-module -fmodule-cache-path %t -fmodule-name=lookup_left_cxx -x c++ %S/Inputs/module.map -verify
|
|
|
|
// RUN: %clang_cc1 -emit-module -fmodule-cache-path %t -fmodule-name=lookup_right_cxx -x c++ %S/Inputs/module.map -verify
|
2011-11-16 08:21:54 +08:00
|
|
|
// RUN: %clang_cc1 -x c++ -fmodule-cache-path %t %s -verify
|
|
|
|
// RUN: %clang_cc1 -ast-print -x c++ -fmodule-cache-path %t %s | FileCheck -check-prefix=CHECK-PRINT %s
|
2011-08-25 05:27:34 +08:00
|
|
|
|
|
|
|
// CHECK-PRINT: int *f0(int *);
|
|
|
|
// CHECK-PRINT: float *f0(float *);
|
|
|
|
// CHECK-PRINT: void test(int i, float f)
|
|
|
|
|