Reid Kleckner | 1df0fea | 2015-02-26 00:17:25 +0000 | [diff] [blame] | 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 | |
Richard Smith | c7cacdc | 2017-04-29 00:54:03 +0000 | [diff] [blame] | 6 | #include "empty.h" |
| 7 | |
Reid Kleckner | 1df0fea | 2015-02-26 00:17:25 +0000 | [diff] [blame] | 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; } |
Richard Smith | c7cacdc | 2017-04-29 00:54:03 +0000 | [diff] [blame] | 16 | // GNU: {{^}} |
| 17 | // GNU: {{^}}# 1 "{{.*}}empty.h" 1 |
| 18 | // GNU: {{^}}# 7 "{{.*}}rewrite-includes-line-markers.c" 2 |
Reid Kleckner | 1df0fea | 2015-02-26 00:17:25 +0000 | [diff] [blame] | 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; } |
Richard Smith | c7cacdc | 2017-04-29 00:54:03 +0000 | [diff] [blame] | 28 | // LINE: {{^}} |
| 29 | // LINE: {{^}}#line 1 "{{.*}}empty.h" |
| 30 | // LINE: {{^}}#line 7 "{{.*}}rewrite-includes-line-markers.c" |