2019-09-19 03:12:14 +08:00
|
|
|
// RUN: %clang_cc1 -E -frewrite-includes -DFIRST -I %S/Inputs -I %S/Inputs/NextIncludes %s -o - | FileCheck -strict-whitespace %s
|
|
|
|
// RUN: %clang_cc1 -E -frewrite-includes -P -DFIRST -I %S/Inputs -I %S/Inputs/NextIncludes %s -o - | FileCheck -check-prefix=CHECKNL -strict-whitespace %s
|
|
|
|
// RUN: %clang_cc1 -E -frewrite-includes -DFIRST -I %S/Inputs -I %S/Inputs/NextIncludes %s -o - | %clang_cc1 -Wall -Wextra -Wconversion -DFIRST -x c -fsyntax-only 2>&1 | FileCheck -check-prefix=COMPILE --implicit-check-not warning: %s
|
2012-06-07 02:52:13 +08:00
|
|
|
// STARTCOMPARE
|
|
|
|
#define A(a,b) a ## b
|
2019-09-19 03:12:14 +08:00
|
|
|
A(in,t) a;
|
2012-06-07 02:52:13 +08:00
|
|
|
#include "rewrite-includes1.h"
|
|
|
|
#ifdef FIRST
|
|
|
|
#define HEADER "rewrite-includes3.h"
|
|
|
|
#include HEADER
|
|
|
|
#else
|
|
|
|
#include "rewrite-includes4.h"
|
|
|
|
#endif
|
2013-07-20 22:23:27 +08:00
|
|
|
// indented
|
2012-06-07 02:52:13 +08:00
|
|
|
#/**/include /**/ "rewrite-includes5.h" /**/ \
|
|
|
|
|
|
|
|
#include "rewrite-includes6.h" // comment
|
|
|
|
|
|
|
|
#include "rewrite-includes6.h" /* comment
|
|
|
|
continues */
|
|
|
|
#include "rewrite-includes7.h"
|
|
|
|
#include "rewrite-includes7.h"
|
2013-04-17 03:08:41 +08:00
|
|
|
#include "rewrite-includes8.h"
|
2018-04-14 01:43:15 +08:00
|
|
|
#include "rewrite-includes9.h"
|
2019-09-19 03:12:14 +08:00
|
|
|
static int unused;
|
2012-06-07 02:52:13 +08:00
|
|
|
// ENDCOMPARE
|
2014-05-01 21:50:44 +08:00
|
|
|
// CHECK: {{^}}# 1 "{{.*}}rewrite-includes.c"{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK: {{^}}// STARTCOMPARE{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#define A(a,b) a ## b{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}A(in,t) a;{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#include "rewrite-includes1.h"{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 7 "{{.*}}rewrite-includes.c"{{$}}
|
2013-08-30 00:11:17 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 1{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#pragma clang system_header{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2013-08-30 00:11:17 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 2 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 3{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}int included_line1;{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#include "rewrite-includes2.h"{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2014-05-02 05:11:57 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 3 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 3{{$}}
|
2013-08-30 00:11:17 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes2.h" 1 3{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}int included_line2;{{$}}
|
2013-08-30 00:11:17 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 4 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes1.h" 2 3{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 8 "{{.*}}rewrite-includes.c" 2{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#ifdef FIRST{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#define HEADER "rewrite-includes3.h"{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#include HEADER{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 10 "{{.*}}rewrite-includes.c"{{$}}
|
2013-08-30 00:11:17 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes3.h" 1{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}unsigned int included_line3 = -10;{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}# 11 "{{.*}}rewrite-includes.c" 2{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#else{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 12 "{{.*}}rewrite-includes.c"{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#include "rewrite-includes4.h"{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 12 "{{.*}}rewrite-includes.c"{{$}}
|
2013-07-20 22:23:27 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 13 "{{.*}}rewrite-includes.c"{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}# 14 "{{.*}}rewrite-includes.c"{{$}}
|
2013-07-20 22:23:27 +08:00
|
|
|
// CHECK-NEXT: {{^}} // indented{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#/**/include /**/ "rewrite-includes5.h" /**/ {{\\}}{{$}}
|
|
|
|
// CHECK-NEXT: {{^}} {{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 16 "{{.*}}rewrite-includes.c"{{$}}
|
2013-08-30 00:11:17 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes5.h" 1{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}int included_line5;{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}# 17 "{{.*}}rewrite-includes.c" 2{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#include "rewrite-includes6.h" // comment{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 17 "{{.*}}rewrite-includes.c"{{$}}
|
2013-08-30 00:11:17 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes6.h" 1{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#pragma once{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2013-08-30 00:11:17 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 2 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes6.h"{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}int included_line6;{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}# 18 "{{.*}}rewrite-includes.c" 2{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}} {{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#include "rewrite-includes6.h" /* comment{{$}}
|
|
|
|
// CHECK-NEXT: {{^}} continues */{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2013-07-20 22:23:27 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 20 "{{.*}}rewrite-includes.c"{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 21 "{{.*}}rewrite-includes.c"{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#include "rewrite-includes7.h"{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 21 "{{.*}}rewrite-includes.c"{{$}}
|
2013-08-30 00:11:17 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes7.h" 1{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#ifndef REWRITE_INCLUDES_7{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#define REWRITE_INCLUDES_7{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}int included_line7;{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif{{$}}
|
2013-08-30 00:11:17 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 5 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes7.h"{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 22 "{{.*}}rewrite-includes.c" 2{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}#include "rewrite-includes7.h"{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2013-07-20 22:23:27 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 22 "{{.*}}rewrite-includes.c"{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 23 "{{.*}}rewrite-includes.c"{{$}}
|
2013-04-17 03:08:41 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#include "rewrite-includes8.h"{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 23 "{{.*}}rewrite-includes.c"{{$}}
|
2013-08-30 00:11:17 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h" 1{{$}}
|
2019-09-19 03:09:41 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#if __has_include_next(<rewrite-includes8.h>){{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#endif{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* evaluated by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}# 2 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h"{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#if 0{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#elif __has_include(<rewrite-includes8.hfail>){{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#endif{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#elif 0 /* evaluated by -frewrite-includes */{{$}}
|
2013-08-30 00:11:17 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 3 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h"{{$}}
|
2013-04-17 03:08:41 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif{{$}}
|
2013-08-30 00:11:17 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 4 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h"{{$}}
|
2019-09-19 03:09:41 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#if !__has_include("rewrite-includes8.h"){{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#endif{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* evaluated by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}# 5 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h"{{$}}
|
2013-04-17 03:08:41 +08:00
|
|
|
// CHECK-NEXT: {{^}}#endif{{$}}
|
2013-08-30 00:11:17 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 6 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes8.h"{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 24 "{{.*}}rewrite-includes.c" 2{{$}}
|
2018-04-14 01:43:15 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#include "rewrite-includes9.h"{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 24 "{{.*}}rewrite-includes.c"{{$}}
|
2018-04-14 01:43:15 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes9.h" 1{{$}}
|
2019-09-19 03:09:41 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#if __has_include_next(<rewrite-includes9.h>){{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#endif{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#if 1 /* evaluated by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}# 2 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes9.h"{{$}}
|
2018-04-14 01:43:15 +08:00
|
|
|
// CHECK-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#include_next <rewrite-includes9.h>{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}# 2 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes9.h"{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}# 1 "{{.*[/\\]Inputs(/|\\\\)NextIncludes(/|\\\\)}}rewrite-includes9.h" 1{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}int included_line9;{{$}}
|
2018-04-14 01:43:15 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 3 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes9.h" 2{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}#endif{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}# 4 "{{.*[/\\]Inputs(/|\\\\)}}rewrite-includes9.h"{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECK-NEXT: {{^}}# 25 "{{.*}}rewrite-includes.c" 2{{$}}
|
|
|
|
// CHECK-NEXT: {{^}}static int unused;{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECK-NEXT: {{^}}// ENDCOMPARE{{$}}
|
|
|
|
|
|
|
|
// CHECKNL: {{^}}// STARTCOMPARE{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#define A(a,b) a ## b{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}A(in,t) a;{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#include "rewrite-includes1.h"{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#pragma clang system_header{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}int included_line1;{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#include "rewrite-includes2.h"{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}int included_line2;{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#ifdef FIRST{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#define HEADER "rewrite-includes3.h"{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#include HEADER{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}unsigned int included_line3 = -10;{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#else{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#include "rewrite-includes4.h"{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif{{$}}
|
2013-07-20 22:23:27 +08:00
|
|
|
// CHECKNL-NEXT: {{^}} // indented{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#/**/include /**/ "rewrite-includes5.h" /**/ {{\\}}{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}} {{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}int included_line5;{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#include "rewrite-includes6.h" // comment{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#pragma once{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}int included_line6;{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}} {{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#include "rewrite-includes6.h" /* comment{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}} continues */{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#include "rewrite-includes7.h"{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#ifndef REWRITE_INCLUDES_7{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#define REWRITE_INCLUDES_7{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}int included_line7;{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#include "rewrite-includes7.h"{{$}}
|
2012-06-15 01:36:01 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2013-04-17 03:08:41 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#include "rewrite-includes8.h"{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:09:41 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#if __has_include_next(<rewrite-includes8.h>){{$}}
|
2013-04-17 03:08:41 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif{{$}}
|
2019-09-19 03:09:41 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* evaluated by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#if 0{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#elif __has_include(<rewrite-includes8.hfail>){{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#endif{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#elif 0 /* evaluated by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#endif{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#if !__has_include("rewrite-includes8.h"){{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#endif{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* evaluated by -frewrite-includes */{{$}}
|
2013-04-17 03:08:41 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif{{$}}
|
2018-04-14 01:43:15 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#include "rewrite-includes9.h"{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:09:41 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#if __has_include_next(<rewrite-includes9.h>){{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#endif{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* disabled by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#if 1 /* evaluated by -frewrite-includes */{{$}}
|
2018-04-14 01:43:15 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#if 0 /* expanded by -frewrite-includes */{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#include_next <rewrite-includes9.h>{{$}}
|
|
|
|
// CHECKNL-NEXT: {{^}}#endif /* expanded by -frewrite-includes */{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}int included_line9;{{$}}
|
2018-04-14 01:43:15 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}#endif{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}static int unused;{{$}}
|
2012-06-07 02:52:13 +08:00
|
|
|
// CHECKNL-NEXT: {{^}}// ENDCOMPARE{{$}}
|
2019-09-19 03:12:14 +08:00
|
|
|
|
2019-09-19 05:41:45 +08:00
|
|
|
// COMPILE: Inputs{{[/\\]}}rewrite-includes3.h:1:31: warning: implicit conversion changes signedness:
|
2019-09-19 03:12:14 +08:00
|
|
|
// COMPILE: rewrite-includes.c:25:12: warning: unused variable 'unused'
|