1f4a2713aSLionel Sambuc // RUN: rm -rf %t 2f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_top %S/Inputs/module.map 3f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_left %S/Inputs/module.map 4f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_right %S/Inputs/module.map 5f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fmodules -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_bottom %S/Inputs/module.map 6*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fmodules -x objective-c -emit-pch -fmodules-cache-path=%t -I %S/Inputs -o %t.pch %S/Inputs/diamond.h 7*0a6a1f1dSLionel Sambuc // RUN: %clang_cc1 -fmodules -x objective-c -fmodules-cache-path=%t -include-pch %t.pch %s -I %S/Inputs -verify 8f4a2713aSLionel Sambuc // FIXME: When we have a syntax for modules in C, use that. 9f4a2713aSLionel Sambuc test_diamond(int i,float f,double d,char c)10f4a2713aSLionel Sambucvoid test_diamond(int i, float f, double d, char c) { 11f4a2713aSLionel Sambuc top(&i); 12f4a2713aSLionel Sambuc left(&f); 13f4a2713aSLionel Sambuc right(&d); 14f4a2713aSLionel Sambuc bottom(&c); 15f4a2713aSLionel Sambuc bottom(&d); 16f4a2713aSLionel Sambuc // expected-warning@-1{{incompatible pointer types passing 'double *' to parameter of type 'char *'}} 17f4a2713aSLionel Sambuc // expected-note@Inputs/diamond_bottom.h:4{{passing argument to parameter 'x' here}} 18f4a2713aSLionel Sambuc 19f4a2713aSLionel Sambuc // Names in multiple places in the diamond. 20f4a2713aSLionel Sambuc top_left(&c); 21f4a2713aSLionel Sambuc 22f4a2713aSLionel Sambuc left_and_right(&i); 23f4a2713aSLionel Sambuc struct left_and_right lr; 24f4a2713aSLionel Sambuc lr.left = 17; 25f4a2713aSLionel Sambuc } 26