diamond.c revision 0c02adaa4da1d87495ca6a6d394f78740fa475c4
1// in diamond-bottom.h: expected-note{{passing argument to parameter 'x' here}}
2void test_diamond(int i, float f, double d, char c) {
3  top(&i);
4  left(&f);
5  right(&d);
6  bottom(&c);
7  bottom(&d); // expected-warning{{incompatible pointer types passing 'double *' to parameter of type 'char *'}}
8
9  // Names in multiple places in the diamond.
10  top_left(&c);
11
12  left_and_right(&i);
13  struct left_and_right lr;
14  lr.left = 17;
15}
16
17// RUN: %clang_cc1 -emit-pch -o %t_top.h.pch %S/Inputs/diamond_top.h
18// RUN: %clang_cc1 -import-module %t_top.h.pch -emit-pch -o %t_left.h.pch %S/Inputs/diamond_left.h
19// RUN: %clang_cc1 -import-module %t_top.h.pch -emit-pch -o %t_right.h.pch %S/Inputs/diamond_right.h
20// RUN: %clang_cc1 -import-module %t_left.h.pch -import-module %t_right.h.pch -emit-pch -o %t_bottom.h.pch %S/Inputs/diamond_bottom.h
21// RUN: %clang_cc1 -import-module %t_bottom.h.pch -verify %s
22