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 -fmodules-cache-path=%t -I %S/Inputs %s -verify 7f4a2713aSLionel Sambuc // FIXME: When we have a syntax for modules in C, use that. 8f4a2713aSLionel Sambuc 9f4a2713aSLionel Sambuc @import diamond_bottom; 10f4a2713aSLionel Sambuc test_diamond(int i,float f,double d,char c)11f4a2713aSLionel Sambucvoid test_diamond(int i, float f, double d, char c) { 12f4a2713aSLionel Sambuc top(&i); 13f4a2713aSLionel Sambuc left(&f); 14f4a2713aSLionel Sambuc right(&d); 15f4a2713aSLionel Sambuc bottom(&c); 16f4a2713aSLionel Sambuc bottom(&d); 17f4a2713aSLionel Sambuc // expected-warning@-1{{incompatible pointer types passing 'double *' to parameter of type 'char *'}} 18f4a2713aSLionel Sambuc // expected-note@Inputs/diamond_bottom.h:4{{passing argument to parameter 'x' here}} 19f4a2713aSLionel Sambuc 20f4a2713aSLionel Sambuc // Names in multiple places in the diamond. 21f4a2713aSLionel Sambuc top_left(&c); 22f4a2713aSLionel Sambuc 23f4a2713aSLionel Sambuc left_and_right(&i); 24f4a2713aSLionel Sambuc struct left_and_right lr; 25f4a2713aSLionel Sambuc lr.left = 17; 26f4a2713aSLionel Sambuc } 27f4a2713aSLionel Sambuc 28