Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / lex / lex.pptoken / p3-2a.cpp
blob0e0e5fec6e9d8b40ae20d327de5aebda907c5027
1 // RUN: not %clang_cc1 -std=c++2a -E -I%S/Inputs %s -o - | FileCheck %s --strict-whitespace --implicit-check-not=ERROR
3 // Check for context-sensitive header-name token formation.
4 // CHECK: import <foo bar>;
5 import <foo bar>;
7 // Not at the top level: these are each 8 tokens rather than 5.
8 // CHECK: { import <foo bar>; }
9 { import <foo bar>; }
10 // CHECK: ( import <foo bar>; :>
11 ( import <foo bar>; :>
12 // CHECK: [ import <foo bar>; %>
13 [ import <foo bar>; %>
15 // CHECK: import <foo bar>;
16 import <foo bar>;
18 // CHECK: foo; import <foo bar>;
19 foo; import <foo bar>;
21 // CHECK: foo import <foo bar>;
22 foo import <foo bar>;
24 // CHECK: import <foo bar> {{\[\[ ]]}};
25 import <foo bar> [[ ]];
27 // CHECK: import <foo bar> import <foo bar>;
28 import <foo bar> import <foo bar>;
30 // FIXME: We do not form header-name tokens in the pp-import-suffix of a
31 // pp-import. Conforming programs can't tell the difference.
32 // CHECK: import <foo bar> {} import <foo bar>;
33 // FIXME: import <foo bar> {} import <foo bar>;
34 import <foo bar> {} import <foo bar>;
37 // CHECK: export import <foo bar>;
38 export import <foo bar>;
40 // CHECK: export export import <foo bar>;
41 export export import <foo bar>;
43 #define UNBALANCED_PAREN (
44 // CHECK: import <foo bar>;
45 import <foo bar>;
47 UNBALANCED_PAREN
48 // CHECK: import <foo bar>;
49 import <foo bar>;
52 _Pragma("clang no_such_pragma (");
53 // CHECK: import <foo bar>;
54 import <foo bar>;
56 #define HEADER <foo bar>
57 // CHECK: import <foo bar>;
58 import HEADER;
60 // CHECK: import <foo bar>;
61 import <
62 foo
63 bar
66 // CHECK: import{{$}}
67 // CHECK: {{^}}<foo bar>;
68 import
70 foo
71 bar
74 // CHECK: import{{$}}
75 // CHECK: {{^}}<foo bar>;
76 import
77 <foo bar>;
79 #define IMPORT import <foo bar>
80 // CHECK: import <foo bar>;
81 IMPORT;