xref: /aosp_15_r20/external/clang/test/Frontend/rewrite-includes-line-markers.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // RUN: %clang_cc1 -E -frewrite-includes -I %S/Inputs %s | FileCheck %s --check-prefix=GNU
2*67e74705SXin Li // RUN: %clang_cc1 -E -frewrite-includes -fuse-line-directives -I %S/Inputs %s | FileCheck %s --check-prefix=LINE
3*67e74705SXin Li #include "test.h"
f()4*67e74705SXin Li int f() { return x; }
5*67e74705SXin Li 
6*67e74705SXin Li // GNU: {{^}}# 1 "{{.*}}rewrite-includes-line-markers.c"
7*67e74705SXin Li // GNU: {{^}}#include "test.h"
8*67e74705SXin Li // GNU: {{^}}# 1 "{{.*}}test.h"
9*67e74705SXin Li // GNU: {{^}}#include "test2.h"
10*67e74705SXin Li // GNU: {{^}}# 1 "{{.*}}test2.h"
11*67e74705SXin Li // GNU: {{^}}int x;
12*67e74705SXin Li // GNU: {{^}}# 4 "{{.*}}rewrite-includes-line-markers.c" 2
13*67e74705SXin Li // GNU: {{^}}int f() { return x; }
14*67e74705SXin Li 
15*67e74705SXin Li // LINE: {{^}}#line 1 "{{.*}}rewrite-includes-line-markers.c"
16*67e74705SXin Li // LINE: {{^}}#include "test.h"
17*67e74705SXin Li // LINE: {{^}}#line 1 "{{.*}}test.h"
18*67e74705SXin Li // LINE: {{^}}#include "test2.h"
19*67e74705SXin Li // LINE: {{^}}#line 1 "{{.*}}test2.h"
20*67e74705SXin Li // LINE: {{^}}int x;
21*67e74705SXin Li // LINE: {{^}}#line 4 "{{.*}}rewrite-includes-line-markers.c"
22*67e74705SXin Li // LINE: {{^}}int f() { return x; }
23