1// RUN: rm -rf %t
2// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -include %S/Inputs/preprocess-prefix.h -E %s | FileCheck -strict-whitespace %s
3// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -x objective-c-header -emit-pch %S/Inputs/preprocess-prefix.h -o %t.pch
4// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -I %S/Inputs -include-pch %t.pch -E %s | FileCheck -strict-whitespace %s
5#import "diamond_right.h"
6#import "diamond_right.h" // to check that imports get their own line
7void test() {
8  top_left_before();
9  left_and_right();
10}
11
12
13// CHECK: int left_and_right(int *);{{$}}
14// CHECK-NEXT: @import diamond_left; /* clang -E: implicit import for "{{.*}}diamond_left.h" */{{$}}
15
16// CHECK: @import diamond_right; /* clang -E: implicit import for "{{.*}}diamond_right.h" */{{$}}
17// CHECK: @import diamond_right; /* clang -E: implicit import for "{{.*}}diamond_right.h" */{{$}}
18// CHECK-NEXT: void test() {{{$}}
19// CHECK-NEXT:    top_left_before();{{$}}
20// CHECK-NEXT:    left_and_right();{{$}}
21// CHECK-NEXT: }{{$}}
22