p3-2a.cpp
1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
// RUN: not %clang_cc1 -std=c++2a -E -I%S/Inputs %s -o - | FileCheck %s --strict-whitespace --implicit-check-not=ERROR
// Check for context-sensitive header-name token formation.
// CHECK: import <foo bar>;
import <foo bar>;
// Not at the top level: these are each 8 tokens rather than 5.
// CHECK: { import <foo bar>; }
{ import <foo bar>; }
// CHECK: ( import <foo bar>; :>
( import <foo bar>; :>
// CHECK: [ import <foo bar>; %>
[ import <foo bar>; %>
// CHECK: import <foo bar>;
import <foo bar>;
// CHECK: foo; import <foo bar>;
foo; import <foo bar>;
// CHECK: foo import <foo bar>;
foo import <foo bar>;
// CHECK: import <foo bar> {{\[\[ ]]}};
import <foo bar> [[ ]];
// CHECK: import <foo bar> import <foo bar>;
import <foo bar> import <foo bar>;
// FIXME: We do not form header-name tokens in the pp-import-suffix of a
// pp-import. Conforming programs can't tell the difference.
// CHECK: import <foo bar> {} import <foo bar>;
// FIXME: import <foo bar> {} import <foo bar>;
import <foo bar> {} import <foo bar>;
// CHECK: export import <foo bar>;
export import <foo bar>;
// CHECK: export export import <foo bar>;
export export import <foo bar>;
#define UNBALANCED_PAREN (
// CHECK: import <foo bar>;
import <foo bar>;
UNBALANCED_PAREN
// CHECK: import <foo bar>;
import <foo bar>;
)
_Pragma("clang no_such_pragma (");
// CHECK: import <foo bar>;
import <foo bar>;
#define HEADER <foo bar>
// CHECK: import <foo bar>;
import HEADER;
// CHECK: import <foo bar>;
import <
foo
bar
>;
// CHECK: import{{$}}
// CHECK: {{^}}<foo bar>;
import
<
foo
bar
>;
// CHECK: import{{$}}
// CHECK: {{^}}<foo bar>;
import
<foo bar>;
#define IMPORT import <foo bar>
// CHECK: import <foo bar>;
IMPORT;