diamond.c revision 0c02adaa4da1d87495ca6a6d394f78740fa475c4
1fac4ece118d43e43e625c6d2b9a98905b1372d51Douglas Gregor// in diamond-bottom.h: expected-note{{passing argument to parameter 'x' here}} 2fac4ece118d43e43e625c6d2b9a98905b1372d51Douglas Gregorvoid test_diamond(int i, float f, double d, char c) { 3fac4ece118d43e43e625c6d2b9a98905b1372d51Douglas Gregor top(&i); 4fac4ece118d43e43e625c6d2b9a98905b1372d51Douglas Gregor left(&f); 5fac4ece118d43e43e625c6d2b9a98905b1372d51Douglas Gregor right(&d); 6fac4ece118d43e43e625c6d2b9a98905b1372d51Douglas Gregor bottom(&c); 7fac4ece118d43e43e625c6d2b9a98905b1372d51Douglas Gregor bottom(&d); // expected-warning{{incompatible pointer types passing 'double *' to parameter of type 'char *'}} 8211f6e894895f552e0a98421b2f6e931ca4a8c11Douglas Gregor 9211f6e894895f552e0a98421b2f6e931ca4a8c11Douglas Gregor // Names in multiple places in the diamond. 10211f6e894895f552e0a98421b2f6e931ca4a8c11Douglas Gregor top_left(&c); 110c02adaa4da1d87495ca6a6d394f78740fa475c4Douglas Gregor 120c02adaa4da1d87495ca6a6d394f78740fa475c4Douglas Gregor left_and_right(&i); 130c02adaa4da1d87495ca6a6d394f78740fa475c4Douglas Gregor struct left_and_right lr; 140c02adaa4da1d87495ca6a6d394f78740fa475c4Douglas Gregor lr.left = 17; 15fac4ece118d43e43e625c6d2b9a98905b1372d51Douglas Gregor} 16fac4ece118d43e43e625c6d2b9a98905b1372d51Douglas Gregor 17fac4ece118d43e43e625c6d2b9a98905b1372d51Douglas Gregor// RUN: %clang_cc1 -emit-pch -o %t_top.h.pch %S/Inputs/diamond_top.h 18fac4ece118d43e43e625c6d2b9a98905b1372d51Douglas Gregor// RUN: %clang_cc1 -import-module %t_top.h.pch -emit-pch -o %t_left.h.pch %S/Inputs/diamond_left.h 19fac4ece118d43e43e625c6d2b9a98905b1372d51Douglas Gregor// RUN: %clang_cc1 -import-module %t_top.h.pch -emit-pch -o %t_right.h.pch %S/Inputs/diamond_right.h 20fac4ece118d43e43e625c6d2b9a98905b1372d51Douglas Gregor// 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 21fac4ece118d43e43e625c6d2b9a98905b1372d51Douglas Gregor// RUN: %clang_cc1 -import-module %t_bottom.h.pch -verify %s 22