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>;
7 // Not at the top level: these are each 8 tokens rather than 5.
8 // CHECK: { 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>;
18 // CHECK: foo; import <foo bar>;
19 foo
; import
<foo bar
>;
21 // CHECK: 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>;
48 // CHECK: import <foo bar>;
52 _Pragma("clang no_such_pragma (");
53 // CHECK: import <foo bar>;
56 #define HEADER <foo bar>
57 // CHECK: import <foo bar>;
60 // CHECK: import <foo bar>;
67 // CHECK: {{^}}<foo bar>;
75 // CHECK: {{^}}<foo bar>;
79 #define IMPORT import <foo bar>
80 // CHECK: import <foo bar>;