Andrew Top | 61a8495 | 2019-04-30 15:07:33 -0700 | [diff] [blame] | 1 | // RUN: rm -rf %t |
| 2 | // RUN: mkdir %t |
| 3 | // RUN: %clang_cc1 -fmodules -fimplicit-module-maps -fmodules-cache-path=%t -I %S/Inputs %s -E -o %t/diamond.mi -frewrite-imports |
| 4 | // RUN: FileCheck %s --input-file %t/diamond.mi |
| 5 | // RUN: %clang_cc1 -fmodules %t/diamond.mi -I. -verify |
| 6 | |
| 7 | // CHECK: {{^}}#pragma clang module build diamond_top |
| 8 | // CHECK: {{^}}module diamond_top { |
| 9 | // CHECK: {{^}}#pragma clang module contents |
| 10 | |
| 11 | // FIXME: @import does not work under -frewrite-includes / -frewrite-imports |
| 12 | // because we disable it when macro expansion is disabled. |
| 13 | #include "diamond_bottom.h" |
| 14 | |
| 15 | // expected-no-diagnostics |
| 16 | void 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 | |