Home | History | Annotate | Download | only in Frontend
      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 // GNU: {{^}}# 1 "{{.*}}rewrite-includes-line-markers.c"
      7 // GNU: {{^}}#include "test.h"
      8 // GNU: {{^}}# 1 "{{.*}}test.h"
      9 // GNU: {{^}}#include "test2.h"
     10 // GNU: {{^}}# 1 "{{.*}}test2.h"
     11 // GNU: {{^}}int x;
     12 // GNU: {{^}}# 4 "{{.*}}rewrite-includes-line-markers.c" 2
     13 // GNU: {{^}}int f() { return x; }
     14 
     15 // LINE: {{^}}#line 1 "{{.*}}rewrite-includes-line-markers.c"
     16 // LINE: {{^}}#include "test.h"
     17 // LINE: {{^}}#line 1 "{{.*}}test.h"
     18 // LINE: {{^}}#include "test2.h"
     19 // LINE: {{^}}#line 1 "{{.*}}test2.h"
     20 // LINE: {{^}}int x;
     21 // LINE: {{^}}#line 4 "{{.*}}rewrite-includes-line-markers.c"
     22 // LINE: {{^}}int f() { return x; }
     23