| 1 |
// RUN: %clang_cc1 -E -frewrite-includes -I %S/Inputs %s | FileCheck %s --check-prefix=GNU |
| 2 |
// RUN: %clang_cc1 -E -frewrite-includes -fuse-line-directives -I %S/Inputs %s | FileCheck %s --check-prefix=LINE |
| 3 |
#include "test.h" |
| 4 |
int f() { return x; } |
| 5 |
|
| 6 |
#include "empty.h" |
| 7 |
|
| 8 |
// GNU: {{^}}# 1 "{{.*}}rewrite-includes-line-markers.c" |
| 9 |
// GNU: {{^}}#include "test.h" |
| 10 |
// GNU: {{^}}# 1 "{{.*}}test.h" |
| 11 |
// GNU: {{^}}#include "test2.h" |
| 12 |
// GNU: {{^}}# 1 "{{.*}}test2.h" |
| 13 |
// GNU: {{^}}int x; |
| 14 |
// GNU: {{^}}# 4 "{{.*}}rewrite-includes-line-markers.c" 2 |
| 15 |
// GNU: {{^}}int f() { return x; } |
| 16 |
// GNU: {{^}} |
| 17 |
// GNU: {{^}}# 1 "{{.*}}empty.h" 1 |
| 18 |
// GNU: {{^}}# 7 "{{.*}}rewrite-includes-line-markers.c" 2 |
| 19 |
|
| 20 |
// LINE: {{^}}#line 1 "{{.*}}rewrite-includes-line-markers.c" |
| 21 |
// LINE: {{^}}#include "test.h" |
| 22 |
// LINE: {{^}}#line 1 "{{.*}}test.h" |
| 23 |
// LINE: {{^}}#include "test2.h" |
| 24 |
// LINE: {{^}}#line 1 "{{.*}}test2.h" |
| 25 |
// LINE: {{^}}int x; |
| 26 |
// LINE: {{^}}#line 4 "{{.*}}rewrite-includes-line-markers.c" |
| 27 |
// LINE: {{^}}int f() { return x; } |
| 28 |
// LINE: {{^}} |
| 29 |
// LINE: {{^}}#line 1 "{{.*}}empty.h" |
| 30 |
// LINE: {{^}}#line 7 "{{.*}}rewrite-includes-line-markers.c" |