diff options
Diffstat (limited to 'test/Frontend/rewrite-includes-modules.c')
-rw-r--r-- | test/Frontend/rewrite-includes-modules.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/Frontend/rewrite-includes-modules.c b/test/Frontend/rewrite-includes-modules.c new file mode 100644 index 000000000000..783a96739ae6 --- /dev/null +++ b/test/Frontend/rewrite-includes-modules.c @@ -0,0 +1,20 @@ +// RUN: rm -rf %t +// RUN: %clang_cc1 -fmodules -fmodules-cache-path=%t -x objective-c %s -F %S/../Modules/Inputs -E -frewrite-includes -o - | FileCheck %s + +int bar(); +#include <Module/Module.h> +int foo(); +#include <Module/Module.h> + +// CHECK: int bar();{{$}} +// CHECK-NEXT: #if 0 /* expanded by -frewrite-includes */{{$}} +// CHECK-NEXT: #include <Module/Module.h>{{$}} +// CHECK-NEXT: #endif /* expanded by -frewrite-includes */{{$}} +// CHECK-NEXT: @import Module; /* clang -frewrite-includes: implicit import */{{$}} +// CHECK-NEXT: # 6 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}} +// CHECK-NEXT: int foo();{{$}} +// CHECK-NEXT: #if 0 /* expanded by -frewrite-includes */{{$}} +// CHECK-NEXT: #include <Module/Module.h>{{$}} +// CHECK-NEXT: #endif /* expanded by -frewrite-includes */{{$}} +// CHECK-NEXT: @import Module; /* clang -frewrite-includes: implicit import */{{$}} +// CHECK-NEXT: # 8 "{{.*[/\\]}}rewrite-includes-modules.c"{{$}} |