2011-08-27 07:56:07 +08:00
|
|
|
|
2012-12-12 06:11:52 +08:00
|
|
|
#define import @import
|
2011-08-27 07:56:07 +08:00
|
|
|
import lookup_left_cxx;
|
2012-01-04 03:32:59 +08:00
|
|
|
#undef import
|
2012-12-12 06:11:52 +08:00
|
|
|
#define IMPORT(X) @import X
|
2011-08-27 07:56:07 +08:00
|
|
|
IMPORT(lookup_right_cxx);
|
|
|
|
|
2013-04-17 16:06:46 +08:00
|
|
|
// expected-warning@Inputs/lookup_left.hpp:3 {{weak identifier 'weak_identifier' never declared}}
|
2012-08-10 09:06:16 +08:00
|
|
|
|
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
|
2013-02-08 03:01:24 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -x objective-c++ -emit-module -fmodules-cache-path=%t -fmodule-name=lookup_left_cxx %S/Inputs/module.map -verify
|
|
|
|
// RUN: %clang_cc1 -fmodules -x objective-c++ -emit-module -fmodules-cache-path=%t -fmodule-name=lookup_right_cxx %S/Inputs/module.map -verify
|
2014-01-23 07:19:39 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s -verify
|
|
|
|
// RUN: %clang_cc1 -fmodules -ast-print -x objective-c++ -fmodules-cache-path=%t -I %S/Inputs %s | FileCheck -check-prefix=CHECK-PRINT %s
|
2012-01-04 03:32:59 +08:00
|
|
|
// 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)
|
|
|
|
|