blob: 220a27903800a36c1d5d9a7e585a81e1e396b014 [file] [log] [blame]
Douglas Gregorfac4ece2011-08-19 02:29:29 +00001// 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 *'}}
Douglas Gregor211f6e82011-08-20 04:39:52 +00008
9 // Names in multiple places in the diamond.
10 top_left(&c);
Douglas Gregorfac4ece2011-08-19 02:29:29 +000011}
12
13// RUN: %clang_cc1 -emit-pch -o %t_top.h.pch %S/Inputs/diamond_top.h
14// RUN: %clang_cc1 -import-module %t_top.h.pch -emit-pch -o %t_left.h.pch %S/Inputs/diamond_left.h
15// RUN: %clang_cc1 -import-module %t_top.h.pch -emit-pch -o %t_right.h.pch %S/Inputs/diamond_right.h
16// 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
17// RUN: %clang_cc1 -import-module %t_bottom.h.pch -verify %s