2011-08-27 07:56:07 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-19 10:29:29 +08:00
|
|
|
// in diamond-bottom.h: expected-note{{passing argument to parameter 'x' here}}
|
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);
|
|
|
|
bottom(&d); // expected-warning{{incompatible pointer types passing 'double *' to parameter of type 'char *'}}
|
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
|
|
|
}
|
|
|
|
|
2011-11-16 08:09:06 +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=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
|
|
|
|
// RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t %s -verify
|
2012-01-04 03:32:59 +08:00
|
|
|
// FIXME: When we have a syntax for modules in C, use that.
|