2011-08-27 07:56:07 +08:00
|
|
|
|
2012-03-02 06:07:04 +08:00
|
|
|
#define import @__experimental_modules_import
|
2011-08-27 07:56:07 +08:00
|
|
|
import lookup_left_cxx;
|
2012-01-04 03:32:59 +08:00
|
|
|
#undef import
|
2012-03-02 06:07:04 +08:00
|
|
|
#define IMPORT(X) @__experimental_modules_import 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);
|
|
|
|
}
|
|
|
|
|
2012-01-04 14:20:15 +08:00
|
|
|
int import;
|
|
|
|
|
|
|
|
void f() {
|
|
|
|
int import;
|
|
|
|
}
|
|
|
|
|
2011-11-16 08:21:54 +08:00
|
|
|
// RUN: rm -rf %t
|
2012-01-04 03:32:59 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -x objective-c++ -emit-module -fmodule-cache-path %t -fmodule-name=lookup_left_cxx %S/Inputs/module.map -verify
|
|
|
|
// RUN: %clang_cc1 -fmodules -x objective-c++ -emit-module -fmodule-cache-path %t -fmodule-name=lookup_right_cxx %S/Inputs/module.map -verify
|
|
|
|
// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodule-cache-path %t %s -verify
|
|
|
|
// RUN: %clang_cc1 -fmodules -ast-print -x objective-c++ -fmodule-cache-path %t %s | FileCheck -check-prefix=CHECK-PRINT %s
|
|
|
|
// FIXME: When we have a syntax for modules in C++, use that.
|
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)
|
|
|
|
|