brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 48a82eb Raw
28 lines · c
1// RUN: rm -rf %t2// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_top %S/Inputs/module.modulemap3// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_left %S/Inputs/module.modulemap4// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_right %S/Inputs/module.modulemap5// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -emit-module -fmodules-cache-path=%t -fmodule-name=diamond_bottom %S/Inputs/module.modulemap6// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -x objective-c -fmodules-cache-path=%t -I %S/Inputs %s -verify7// FIXME: When we have a syntax for modules in C, use that.8 9@import diamond_bottom;10 11void test_diamond(int i, float f, double d, char c) {12  top(&i);13  left(&f);14  right(&d);15  bottom(&c);16  bottom(&d);17  // expected-error@-1{{incompatible pointer types passing 'double *' to parameter of type 'char *'}}18  // expected-note@Inputs/diamond_bottom.h:4{{passing argument to parameter 'x' here}}19 20  // Names in multiple places in the diamond.21  top_left(&c);22 23  left_and_right(&i);24  struct left_and_right lr;25  lr.left = 17;26}27 28