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
|
|
|
|
2011-09-01 02:19:09 +08:00
|
|
|
__import_module__ 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-08-27 07:56:07 +08:00
|
|
|
// RUN: %clang_cc1 -emit-module -o %T/diamond_top.pcm %S/Inputs/diamond_top.h
|
2011-09-14 07:15:45 +08:00
|
|
|
// RUN: %clang_cc1 -fmodule-cache-path %T -fdisable-module-hash -emit-module -o %T/diamond_left.pcm %S/Inputs/diamond_left.h
|
|
|
|
// RUN: %clang_cc1 -fmodule-cache-path %T -fdisable-module-hash -emit-module -o %T/diamond_right.pcm %S/Inputs/diamond_right.h
|
|
|
|
// RUN: %clang_cc1 -fmodule-cache-path %T -fdisable-module-hash -emit-module -o %T/diamond_bottom.pcm %S/Inputs/diamond_bottom.h
|
|
|
|
// RUN: %clang_cc1 -fmodule-cache-path %T -fdisable-module-hash %s -verify
|