diamond.c revision 07165b9e3b78ed76a7db561f392335e4a54c9e51
1
2
3
4// in diamond-bottom.h: expected-note{{passing argument to parameter 'x' here}}
5
6__import_module__ diamond_bottom;
7
8void test_diamond(int i, float f, double d, char c) {
9  top(&i);
10  left(&f);
11  right(&d);
12  bottom(&c);
13  bottom(&d); // expected-warning{{incompatible pointer types passing 'double *' to parameter of type 'char *'}}
14
15  // Names in multiple places in the diamond.
16  top_left(&c);
17
18  left_and_right(&i);
19  struct left_and_right lr;
20  lr.left = 17;
21}
22
23// RUN: rm -rf %t
24// RUN: %clang_cc1 -emit-module -fmodule-cache-path %t -fmodule-name=diamond_top %S/Inputs/module.map
25// RUN: %clang_cc1 -emit-module -fmodule-cache-path %t -fmodule-name=diamond_left %S/Inputs/module.map
26// RUN: %clang_cc1 -emit-module -fmodule-cache-path %t -fmodule-name=diamond_right %S/Inputs/module.map
27// RUN: %clang_cc1 -emit-module -fmodule-cache-path %t -fmodule-name=diamond_bottom %S/Inputs/module.map
28// RUN: %clang_cc1 -fmodule-cache-path %t %s -verify
29