27 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir %t3// RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -E -o %t/diamond.mi -frewrite-imports4// RUN: FileCheck %s --input-file %t/diamond.mi5// RUN: %clang_cc1 -fmodules %t/diamond.mi -I. -verify6 7// CHECK: {{^}}#pragma clang module build diamond_top8// CHECK: {{^}}module diamond_top {9// CHECK: {{^}}#pragma clang module contents10 11// FIXME: @import does not work under -frewrite-includes / -frewrite-imports12// because we disable it when macro expansion is disabled.13#include "diamond_bottom.h"14 15// expected-no-diagnostics16void test_diamond(int i, float f, double d, char c) {17 top(&i);18 left(&f);19 right(&d);20 bottom(&c);21 top_left(&c);22 left_and_right(&i);23 struct left_and_right lr;24 lr.left = 17;25}26 27