annotate clang/test/Frontend/system-header-line-directive.c @ 222:81f6424ef0e3 llvm-original

LLVM original branch
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 18 Jul 2021 22:10:01 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // RUN: %clang_cc1 -Wall %s -I %S/Inputs -isystem %S/Inputs/SystemHeaderPrefix -verify
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 %s -E -o - -I %S/Inputs -isystem %S/Inputs/SystemHeaderPrefix | FileCheck %s
anatofuz
parents:
diff changeset
3 #include <noline.h>
anatofuz
parents:
diff changeset
4 #include <line-directive-in-system.h>
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 // expected-warning@line-directive.h:* {{type specifier missing, defaults to 'int'}}
anatofuz
parents:
diff changeset
7 #include "line-directive.h"
anatofuz
parents:
diff changeset
8
anatofuz
parents:
diff changeset
9 // This tests that "#line" directives in system headers preserve system
anatofuz
parents:
diff changeset
10 // header-ness just like GNU line markers that don't have filenames. This was
anatofuz
parents:
diff changeset
11 // PR30752.
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 // CHECK: # {{[0-9]+}} "{{.*}}system-header-line-directive.c" 2
anatofuz
parents:
diff changeset
14 // CHECK: # 1 "{{.*}}noline.h" 1 3
anatofuz
parents:
diff changeset
15 // CHECK: foo();
anatofuz
parents:
diff changeset
16 // CHECK: # 4 "{{.*}}system-header-line-directive.c" 2
anatofuz
parents:
diff changeset
17 // CHECK: # 1 "{{.*}}line-directive-in-system.h" 1 3
anatofuz
parents:
diff changeset
18 // The "3" below indicates that "foo.h" is considered a system header.
anatofuz
parents:
diff changeset
19 // CHECK: # 1 "foo.h" 3
anatofuz
parents:
diff changeset
20 // CHECK: foo();
anatofuz
parents:
diff changeset
21 // CHECK: # {{[0-9]+}} "{{.*}}system-header-line-directive.c" 2
anatofuz
parents:
diff changeset
22 // CHECK: # 1 "{{.*}}line-directive.h" 1
anatofuz
parents:
diff changeset
23 // CHECK: # 10 "foo.h"{{$}}