2013-04-17 16:06:46 +08:00
|
|
|
// RUN: rm -rf %t
|
|
|
|
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_top %S/Inputs/module.map
|
|
|
|
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_left %S/Inputs/module.map
|
|
|
|
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_right %S/Inputs/module.map
|
|
|
|
// RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_bottom %S/Inputs/module.map
|
2014-01-23 07:19:39 +08:00
|
|
|
// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s -verify
|
2013-04-17 16:06:46 +08:00
|
|
|
// FIXME: When we have a syntax for modules in C, use that.
|
2011-08-27 07:56:07 +08:00
|
|
|
|
2012-12-12 06:11:52 +08:00
|
|
|
@import diamond_bottom;
|
2011-08-27 07:56:07 +08:00
|
|
|
|
2011-08-19 10:29:29 +08:00
|
|
|
void test_diamond(int i, float f, double d, char c) {
|
|
|
|
top(&i);
|
|
|
|
left(&f);
|
|
|
|
right(&d);
|
|
|
|
bottom(&c);
|
2013-04-17 16:06:46 +08:00
|
|
|
bottom(&d);
|
|
|
|
// expected-warning@-1{{incompatible pointer types passing 'double *' to parameter of type 'char *'}}
|
|
|
|
// expected-note@Inputs/diamond_bottom.h:4{{passing argument to parameter 'x' here}}
|
2011-08-20 12:39:52 +08:00
|
|
|
|
|
|
|
// Names in multiple places in the diamond.
|
|
|
|
top_left(&c);
|
2011-08-20 13:09:43 +08:00
|
|
|
|
|
|
|
left_and_right(&i);
|
|
|
|
struct left_and_right lr;
|
|
|
|
lr.left = 17;
|
2011-08-19 10:29:29 +08:00
|
|
|
}
|
|
|
|
|