[flang][cuda] Adapt ExternalNameConversion to work in gpu module (#117039)
[llvm-project.git] / clang / test / AST / ast-dump-openmp-begin-declare-variant_template_3.cpp
blobad269506042c8f3316cb081ed0037285a7bfd2ad
1 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s %std_cxx11-14 | FileCheck %s --check-prefixes=CHECK,CXX11
2 // RUN: %clang_cc1 -triple x86_64-unknown-unknown -fopenmp -verify -ast-dump %s %std_cxx17- | FileCheck %s --check-prefixes=CHECK,CXX17
3 // expected-no-diagnostics
4 // PR47655
5 template <typename T> struct S {
6 S(int, T *) {}
7 };
9 template <typename T>
10 int also_before(T s) {
11 return 0;
14 #pragma omp begin declare variant match(implementation = {extension(allow_templates)})
15 template <typename T>
16 int also_before(S<T> s) {
17 // Ensure there is no error because this is never instantiated.
18 double t;
19 S<T> q(1, &t);
20 return 1;
22 template <typename T>
23 int special(S<T> s) {
24 T t;
25 S<T> q(0, &t);
26 return 0;
28 template <typename T>
29 int also_after(S<T> s) {
30 // Ensure there is no error because this is never instantiated.
31 double t;
32 S<T> q(2.0, &t);
33 return 2;
35 #pragma omp end declare variant
37 template <typename T>
38 int also_after(T s) {
39 return 0;
42 int test() {
43 // Should return 0.
44 return also_before(0) + also_after(0) + also_before(0.) + also_after(0.) + special(S<int>(0, 0));
47 // CHECK: |-ClassTemplateDecl [[ADDR_0:0x[a-z0-9]*]] <{{.*}}, line:7:1> line:5:30 S
48 // CHECK-NEXT: | |-TemplateTypeParmDecl [[ADDR_1:0x[a-z0-9]*]] <col:11, col:20> col:20 referenced typename depth 0 index 0 T
49 // CHECK-NEXT: | |-CXXRecordDecl [[ADDR_2:0x[a-z0-9]*]] <col:23, line:7:1> line:5:30 struct S definition
50 // CHECK-NEXT: | | |-DefinitionData empty standard_layout trivially_copyable has_user_declared_ctor can_const_default_init
51 // CHECK-NEXT: | | | |-DefaultConstructor defaulted_is_constexpr
52 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param needs_implicit implicit_has_const_param
53 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial needs_implicit
54 // CHECK-NEXT: | | | |-CopyAssignment simple trivial has_const_param needs_implicit implicit_has_const_param
55 // CHECK-NEXT: | | | |-MoveAssignment exists simple trivial needs_implicit
56 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial {{(constexpr )?}}needs_implicit
57 // CHECK-NEXT: | | |-CXXRecordDecl [[ADDR_3:0x[a-z0-9]*]] <col:23, col:30> col:30 implicit referenced struct S
58 // CHECK-NEXT: | | `-CXXConstructorDecl [[ADDR_4:0x[a-z0-9]*]] <line:6:3, col:16> col:3 S<T> 'void (int, T *)'
59 // CHECK-NEXT: | | |-ParmVarDecl [[ADDR_5:0x[a-z0-9]*]] <col:5> col:8 'int'
60 // CHECK-NEXT: | | |-ParmVarDecl [[ADDR_6:0x[a-z0-9]*]] <col:10, col:12> col:13 'T *'
61 // CHECK-NEXT: | | `-CompoundStmt [[ADDR_7:0x[a-z0-9]*]] <col:15, col:16>
62 // CHECK-NEXT: | |-ClassTemplateSpecializationDecl [[ADDR_8:0x[a-z0-9]*]] <line:5:1, line:7:1> line:5:30 struct S definition
63 // CHECK-NEXT: | | |-DefinitionData pass_in_registers empty standard_layout trivially_copyable has_user_declared_ctor can_const_default_init
64 // CHECK-NEXT: | | | |-DefaultConstructor defaulted_is_constexpr
65 // CHECK-NEXT: | | | |-CopyConstructor simple trivial has_const_param implicit_has_const_param
66 // CHECK-NEXT: | | | |-MoveConstructor exists simple trivial
67 // CHECK-NEXT: | | | |-CopyAssignment simple trivial has_const_param needs_implicit implicit_has_const_param
68 // CHECK-NEXT: | | | |-MoveAssignment exists simple trivial needs_implicit
69 // CHECK-NEXT: | | | `-Destructor simple irrelevant trivial
70 // CHECK-NEXT: | | |-TemplateArgument type 'int'
71 // CHECK-NEXT: | | | `-BuiltinType [[ADDR_9:0x[a-z0-9]*]] 'int'
72 // CHECK-NEXT: | | |-CXXRecordDecl [[ADDR_10:0x[a-z0-9]*]] <col:23, col:30> col:30 implicit struct S
73 // CHECK-NEXT: | | |-CXXConstructorDecl [[ADDR_11:0x[a-z0-9]*]] <line:6:3, col:16> col:3 used S 'void (int, int *)'
74 // CHECK-NEXT: | | | |-ParmVarDecl [[ADDR_12:0x[a-z0-9]*]] <col:5> col:8 'int'
75 // CHECK-NEXT: | | | |-ParmVarDecl [[ADDR_13:0x[a-z0-9]*]] <col:10, col:12> col:13 'int *'
76 // CHECK-NEXT: | | | `-CompoundStmt [[ADDR_7]] <col:15, col:16>
77 // CHECK-NEXT: | | |-CXXConstructorDecl [[ADDR_14:0x[a-z0-9]*]] <line:5:30> col:30 implicit constexpr S 'void (const S<int> &)' inline default trivial noexcept-unevaluated [[ADDR_14]]
78 // CHECK-NEXT: | | | `-ParmVarDecl [[ADDR_15:0x[a-z0-9]*]] <col:30> col:30 'const S<int> &'
79 // CXX11-NEXT: | | |-CXXConstructorDecl [[ADDR_16:0x[a-z0-9]*]] <col:30> col:30 implicit used constexpr S 'void (S<int> &&) noexcept' inline default trivial
80 // CXX11-NEXT: | | | |-ParmVarDecl [[ADDR_17:0x[a-z0-9]*]] <col:30> col:30 'S<int> &&'
81 // CXX11-NEXT: | | | `-CompoundStmt [[ADDR_18:0x[a-z0-9]*]] <col:30>
82 // CXX17-NEXT: | | |-CXXConstructorDecl [[ADDR_16:0x[a-z0-9]*]] <col:30> col:30 implicit constexpr S 'void (S<int> &&)' inline default trivial noexcept-unevaluated
83 // CXX17-NEXT: | | | `-ParmVarDecl [[ADDR_17:0x[a-z0-9]*]] <col:30> col:30 'S<int> &&'
84 // CHECK-NEXT: | | `-CXXDestructorDecl [[ADDR_19:0x[a-z0-9]*]] <col:30> col:30 implicit referenced {{(constexpr )?}}~S 'void ({{.*}}) noexcept' inline default trivial
85 // CHECK-NEXT: | `-ClassTemplateSpecializationDecl [[ADDR_20:0x[a-z0-9]*]] <col:1, line:7:1> line:5:30 struct S
86 // CHECK-NEXT: | `-TemplateArgument type 'double'
87 // CHECK-NEXT: | `-BuiltinType [[ADDR_21:0x[a-z0-9]*]] 'double'
88 // CHECK-NEXT: |-FunctionTemplateDecl [[ADDR_22:0x[a-z0-9]*]] <line:9:1, line:12:1> line:10:5 also_before
89 // CHECK-NEXT: | |-TemplateTypeParmDecl [[ADDR_23:0x[a-z0-9]*]] <line:9:11, col:20> col:20 referenced typename depth 0 index 0 T
90 // CHECK-NEXT: | |-FunctionDecl [[ADDR_24:0x[a-z0-9]*]] <line:10:1, line:12:1> line:10:5 also_before 'int (T)'
91 // CHECK-NEXT: | | |-ParmVarDecl [[ADDR_25:0x[a-z0-9]*]] <col:17, col:19> col:19 s 'T'
92 // CHECK-NEXT: | | |-CompoundStmt [[ADDR_26:0x[a-z0-9]*]] <col:22, line:12:1>
93 // CHECK-NEXT: | | | `-ReturnStmt [[ADDR_27:0x[a-z0-9]*]] <line:11:3, col:10>
94 // CHECK-NEXT: | | | `-IntegerLiteral [[ADDR_28:0x[a-z0-9]*]] <col:10> 'int' 0
95 // CHECK-NEXT: | | `-OMPDeclareVariantAttr [[ADDR_29:0x[a-z0-9]*]] <<invalid sloc>> Implicit implementation={extension(allow_templates)}
96 // CHECK-NEXT: | | `-DeclRefExpr [[ADDR_30:0x[a-z0-9]*]] <line:16:1> 'int (S<T>)' {{.*}}Function [[ADDR_31:0x[a-z0-9]*]] 'also_before[implementation={extension(allow_templates)}]' 'int (S<T>)'
97 // CHECK-NEXT: | |-FunctionDecl [[ADDR_32:0x[a-z0-9]*]] <line:10:1, line:12:1> line:10:5 used also_before 'int (int)'
98 // CHECK-NEXT: | | |-TemplateArgument type 'int'
99 // CHECK-NEXT: | | | `-BuiltinType [[ADDR_9]] 'int'
100 // CHECK-NEXT: | | |-ParmVarDecl [[ADDR_33:0x[a-z0-9]*]] <col:17, col:19> col:19 s 'int'
101 // CHECK-NEXT: | | `-CompoundStmt [[ADDR_34:0x[a-z0-9]*]] <col:22, line:12:1>
102 // CHECK-NEXT: | | `-ReturnStmt [[ADDR_35:0x[a-z0-9]*]] <line:11:3, col:10>
103 // CHECK-NEXT: | | `-IntegerLiteral [[ADDR_28]] <col:10> 'int' 0
104 // CHECK-NEXT: | `-FunctionDecl [[ADDR_36:0x[a-z0-9]*]] <line:10:1, line:12:1> line:10:5 used also_before 'int (double)'
105 // CHECK-NEXT: | |-TemplateArgument type 'double'
106 // CHECK-NEXT: | | `-BuiltinType [[ADDR_21]] 'double'
107 // CHECK-NEXT: | |-ParmVarDecl [[ADDR_37:0x[a-z0-9]*]] <col:17, col:19> col:19 s 'double'
108 // CHECK-NEXT: | `-CompoundStmt [[ADDR_38:0x[a-z0-9]*]] <col:22, line:12:1>
109 // CHECK-NEXT: | `-ReturnStmt [[ADDR_39:0x[a-z0-9]*]] <line:11:3, col:10>
110 // CHECK-NEXT: | `-IntegerLiteral [[ADDR_28]] <col:10> 'int' 0
111 // CHECK-NEXT: |-FunctionTemplateDecl [[ADDR_40:0x[a-z0-9]*]] <line:15:1, line:21:1> line:16:1 also_before[implementation={extension(allow_templates)}]
112 // CHECK-NEXT: | |-TemplateTypeParmDecl [[ADDR_41:0x[a-z0-9]*]] <line:15:11, col:20> col:20 referenced typename depth 0 index 0 T
113 // CHECK-NEXT: | |-FunctionDecl [[ADDR_31]] <line:16:1, line:21:1> line:16:1 referenced also_before[implementation={extension(allow_templates)}] 'int (S<T>)'
114 // CHECK-NEXT: | | |-ParmVarDecl [[ADDR_42:0x[a-z0-9]*]] <col:17, col:22> col:22 s 'S<T>'
115 // CHECK-NEXT: | | `-CompoundStmt [[ADDR_43:0x[a-z0-9]*]] <col:25, line:21:1>
116 // CHECK-NEXT: | | |-DeclStmt [[ADDR_44:0x[a-z0-9]*]] <line:18:3, col:11>
117 // CHECK-NEXT: | | | `-VarDecl [[ADDR_45:0x[a-z0-9]*]] <col:3, col:10> col:10 referenced t 'double'
118 // CHECK-NEXT: | | |-DeclStmt [[ADDR_46:0x[a-z0-9]*]] <line:19:3, col:16>
119 // CHECK-NEXT: | | | `-VarDecl [[ADDR_47:0x[a-z0-9]*]] <col:3, col:15> col:8 q 'S<T>' callinit
120 // CHECK-NEXT: | | | `-ParenListExpr [[ADDR_48:0x[a-z0-9]*]] <col:9, col:15> 'NULL TYPE'
121 // CHECK-NEXT: | | | |-IntegerLiteral [[ADDR_49:0x[a-z0-9]*]] <col:10> 'int' 1
122 // CHECK-NEXT: | | | `-UnaryOperator [[ADDR_50:0x[a-z0-9]*]] <col:13, col:14> 'double *' prefix '&' cannot overflow
123 // CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_51:0x[a-z0-9]*]] <col:14> 'double' {{.*}}Var [[ADDR_45]] 't' 'double'
124 // CHECK-NEXT: | | `-ReturnStmt [[ADDR_52:0x[a-z0-9]*]] <line:20:3, col:10>
125 // CHECK-NEXT: | | `-IntegerLiteral [[ADDR_53:0x[a-z0-9]*]] <col:10> 'int' 1
126 // CHECK-NEXT: | |-FunctionDecl [[ADDR_54:0x[a-z0-9]*]] <line:16:1, line:21:1> line:16:1 also_before[implementation={extension(allow_templates)}] 'int (S<int>)'
127 // CHECK-NEXT: | | |-TemplateArgument type 'int'
128 // CHECK-NEXT: | | | `-BuiltinType [[ADDR_9]] 'int'
129 // CHECK-NEXT: | | `-ParmVarDecl [[ADDR_55:0x[a-z0-9]*]] <col:17, col:22> col:22 s 'S<int>'
130 // CHECK-NEXT: | `-FunctionDecl [[ADDR_56:0x[a-z0-9]*]] <col:1, line:21:1> line:16:1 also_before[implementation={extension(allow_templates)}] 'int (S<double>)'
131 // CHECK-NEXT: | |-TemplateArgument type 'double'
132 // CHECK-NEXT: | | `-BuiltinType [[ADDR_21]] 'double'
133 // CHECK-NEXT: | `-ParmVarDecl [[ADDR_57:0x[a-z0-9]*]] <col:17, col:22> col:22 s 'S<double>'
134 // CHECK-NEXT: |-FunctionTemplateDecl [[ADDR_58:0x[a-z0-9]*]] <line:22:1, line:23:19> col:5 implicit special
135 // CHECK-NEXT: | |-TemplateTypeParmDecl [[ADDR_59:0x[a-z0-9]*]] <line:22:11, col:20> col:20 referenced typename depth 0 index 0 T
136 // CHECK-NEXT: | |-FunctionDecl [[ADDR_60:0x[a-z0-9]*]] <line:23:1, col:19> col:5 special 'int (S<T>)'
137 // CHECK-NEXT: | | |-ParmVarDecl [[ADDR_61:0x[a-z0-9]*]] <col:13, col:18> col:18 s 'S<T>'
138 // CHECK-NEXT: | | `-OMPDeclareVariantAttr [[ADDR_62:0x[a-z0-9]*]] <<invalid sloc>> Implicit implementation={extension(allow_templates)}
139 // CHECK-NEXT: | | `-DeclRefExpr [[ADDR_63:0x[a-z0-9]*]] <col:1> 'int (S<T>)' {{.*}}Function [[ADDR_64:0x[a-z0-9]*]] 'special[implementation={extension(allow_templates)}]' 'int (S<T>)'
140 // CHECK-NEXT: | `-FunctionDecl [[ADDR_65:0x[a-z0-9]*]] <col:1, col:19> col:5 used special 'int (S<int>)'
141 // CHECK-NEXT: | |-TemplateArgument type 'int'
142 // CHECK-NEXT: | | `-BuiltinType [[ADDR_9]] 'int'
143 // CHECK-NEXT: | |-ParmVarDecl [[ADDR_66:0x[a-z0-9]*]] <col:13, col:18> col:18 s 'S<int>'
144 // CHECK-NEXT: | `-OMPDeclareVariantAttr [[ADDR_67:0x[a-z0-9]*]] <<invalid sloc>> Implicit implementation={extension(allow_templates)}
145 // CHECK-NEXT: | `-DeclRefExpr [[ADDR_68:0x[a-z0-9]*]] <col:1> 'int (S<int>)' {{.*}}Function [[ADDR_69:0x[a-z0-9]*]] 'special[implementation={extension(allow_templates)}]' 'int (S<int>)'
146 // CHECK-NEXT: |-FunctionTemplateDecl [[ADDR_70:0x[a-z0-9]*]] <line:22:1, line:27:1> line:23:1 special[implementation={extension(allow_templates)}]
147 // CHECK-NEXT: | |-TemplateTypeParmDecl [[ADDR_59]] <line:22:11, col:20> col:20 referenced typename depth 0 index 0 T
148 // CHECK-NEXT: | |-FunctionDecl [[ADDR_64]] <line:23:1, line:27:1> line:23:1 referenced special[implementation={extension(allow_templates)}] 'int (S<T>)'
149 // CHECK-NEXT: | | |-ParmVarDecl [[ADDR_61]] <col:13, col:18> col:18 s 'S<T>'
150 // CHECK-NEXT: | | `-CompoundStmt [[ADDR_71:0x[a-z0-9]*]] <col:21, line:27:1>
151 // CHECK-NEXT: | | |-DeclStmt [[ADDR_72:0x[a-z0-9]*]] <line:24:3, col:6>
152 // CHECK-NEXT: | | | `-VarDecl [[ADDR_73:0x[a-z0-9]*]] <col:3, col:5> col:5 referenced t 'T'
153 // CHECK-NEXT: | | |-DeclStmt [[ADDR_74:0x[a-z0-9]*]] <line:25:3, col:16>
154 // CHECK-NEXT: | | | `-VarDecl [[ADDR_75:0x[a-z0-9]*]] <col:3, col:15> col:8 q 'S<T>' callinit
155 // CHECK-NEXT: | | | `-ParenListExpr [[ADDR_76:0x[a-z0-9]*]] <col:9, col:15> 'NULL TYPE'
156 // CHECK-NEXT: | | | |-IntegerLiteral [[ADDR_77:0x[a-z0-9]*]] <col:10> 'int' 0
157 // CHECK-NEXT: | | | `-UnaryOperator [[ADDR_78:0x[a-z0-9]*]] <col:13, col:14> '<dependent type>' prefix '&' cannot overflow
158 // CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_79:0x[a-z0-9]*]] <col:14> 'T' {{.*}}Var [[ADDR_73]] 't' 'T'
159 // CHECK-NEXT: | | `-ReturnStmt [[ADDR_80:0x[a-z0-9]*]] <line:26:3, col:10>
160 // CHECK-NEXT: | | `-IntegerLiteral [[ADDR_81:0x[a-z0-9]*]] <col:10> 'int' 0
161 // CHECK-NEXT: | `-FunctionDecl [[ADDR_69]] <line:23:1, line:27:1> line:23:1 special[implementation={extension(allow_templates)}] 'int (S<int>)'
162 // CHECK-NEXT: | |-TemplateArgument type 'int'
163 // CHECK-NEXT: | | `-BuiltinType [[ADDR_9]] 'int'
164 // CHECK-NEXT: | |-ParmVarDecl [[ADDR_82:0x[a-z0-9]*]] <col:13, col:18> col:18 s 'S<int>'
165 // CHECK-NEXT: | `-CompoundStmt [[ADDR_83:0x[a-z0-9]*]] <col:21, line:27:1>
166 // CHECK-NEXT: | |-DeclStmt [[ADDR_84:0x[a-z0-9]*]] <line:24:3, col:6>
167 // CHECK-NEXT: | | `-VarDecl [[ADDR_85:0x[a-z0-9]*]] <col:3, col:5> col:5 used t 'int'
168 // CHECK-NEXT: | |-DeclStmt [[ADDR_86:0x[a-z0-9]*]] <line:25:3, col:16>
169 // CHECK-NEXT: | | `-VarDecl [[ADDR_87:0x[a-z0-9]*]] <col:3, col:15> col:8 q 'S<int>' callinit
170 // CHECK-NEXT: | | `-CXXConstructExpr [[ADDR_88:0x[a-z0-9]*]] <col:8, col:15> 'S<int>' 'void (int, int *)'
171 // CHECK-NEXT: | | |-IntegerLiteral [[ADDR_77]] <col:10> 'int' 0
172 // CHECK-NEXT: | | `-UnaryOperator [[ADDR_89:0x[a-z0-9]*]] <col:13, col:14> 'int *' prefix '&' cannot overflow
173 // CHECK-NEXT: | | `-DeclRefExpr [[ADDR_90:0x[a-z0-9]*]] <col:14> 'int' {{.*}}Var [[ADDR_85]] 't' 'int'
174 // CHECK-NEXT: | `-ReturnStmt [[ADDR_91:0x[a-z0-9]*]] <line:26:3, col:10>
175 // CHECK-NEXT: | `-IntegerLiteral [[ADDR_81]] <col:10> 'int' 0
176 // CHECK-NEXT: |-FunctionTemplateDecl [[ADDR_92:0x[a-z0-9]*]] <line:28:1, line:29:22> col:5 implicit also_after
177 // CHECK-NEXT: | |-TemplateTypeParmDecl [[ADDR_93:0x[a-z0-9]*]] <line:28:11, col:20> col:20 referenced typename depth 0 index 0 T
178 // CHECK-NEXT: | `-FunctionDecl [[ADDR_94:0x[a-z0-9]*]] <line:29:1, col:22> col:5 also_after 'int (S<T>)'
179 // CHECK-NEXT: | |-ParmVarDecl [[ADDR_95:0x[a-z0-9]*]] <col:16, col:21> col:21 s 'S<T>'
180 // CHECK-NEXT: | `-OMPDeclareVariantAttr [[ADDR_96:0x[a-z0-9]*]] <<invalid sloc>> Implicit implementation={extension(allow_templates)}
181 // CHECK-NEXT: | `-DeclRefExpr [[ADDR_97:0x[a-z0-9]*]] <col:1> 'int (S<T>)' {{.*}}Function [[ADDR_98:0x[a-z0-9]*]] 'also_after[implementation={extension(allow_templates)}]' 'int (S<T>)'
182 // CHECK-NEXT: |-FunctionTemplateDecl [[ADDR_99:0x[a-z0-9]*]] <line:28:1, line:34:1> line:29:1 also_after[implementation={extension(allow_templates)}]
183 // CHECK-NEXT: | |-TemplateTypeParmDecl [[ADDR_93]] <line:28:11, col:20> col:20 referenced typename depth 0 index 0 T
184 // CHECK-NEXT: | `-FunctionDecl [[ADDR_98]] <line:29:1, line:34:1> line:29:1 also_after[implementation={extension(allow_templates)}] 'int (S<T>)'
185 // CHECK-NEXT: | |-ParmVarDecl [[ADDR_95]] <col:16, col:21> col:21 s 'S<T>'
186 // CHECK-NEXT: | `-CompoundStmt [[ADDR_100:0x[a-z0-9]*]] <col:24, line:34:1>
187 // CHECK-NEXT: | |-DeclStmt [[ADDR_101:0x[a-z0-9]*]] <line:31:3, col:11>
188 // CHECK-NEXT: | | `-VarDecl [[ADDR_102:0x[a-z0-9]*]] <col:3, col:10> col:10 referenced t 'double'
189 // CHECK-NEXT: | |-DeclStmt [[ADDR_103:0x[a-z0-9]*]] <line:32:3, col:18>
190 // CHECK-NEXT: | | `-VarDecl [[ADDR_104:0x[a-z0-9]*]] <col:3, col:17> col:8 q 'S<T>' callinit
191 // CHECK-NEXT: | | `-ParenListExpr [[ADDR_105:0x[a-z0-9]*]] <col:9, col:17> 'NULL TYPE'
192 // CHECK-NEXT: | | |-FloatingLiteral [[ADDR_106:0x[a-z0-9]*]] <col:10> 'double' 2.000000e+00
193 // CHECK-NEXT: | | `-UnaryOperator [[ADDR_107:0x[a-z0-9]*]] <col:15, col:16> 'double *' prefix '&' cannot overflow
194 // CHECK-NEXT: | | `-DeclRefExpr [[ADDR_108:0x[a-z0-9]*]] <col:16> 'double' {{.*}}Var [[ADDR_102]] 't' 'double'
195 // CHECK-NEXT: | `-ReturnStmt [[ADDR_109:0x[a-z0-9]*]] <line:33:3, col:10>
196 // CHECK-NEXT: | `-IntegerLiteral [[ADDR_110:0x[a-z0-9]*]] <col:10> 'int' 2
197 // CHECK-NEXT: |-FunctionTemplateDecl [[ADDR_111:0x[a-z0-9]*]] <line:37:1, line:40:1> line:38:5 also_after
198 // CHECK-NEXT: | |-TemplateTypeParmDecl [[ADDR_112:0x[a-z0-9]*]] <line:37:11, col:20> col:20 referenced typename depth 0 index 0 T
199 // CHECK-NEXT: | |-FunctionDecl [[ADDR_113:0x[a-z0-9]*]] <line:38:1, line:40:1> line:38:5 also_after 'int (T)'
200 // CHECK-NEXT: | | |-ParmVarDecl [[ADDR_114:0x[a-z0-9]*]] <col:16, col:18> col:18 s 'T'
201 // CHECK-NEXT: | | `-CompoundStmt [[ADDR_115:0x[a-z0-9]*]] <col:21, line:40:1>
202 // CHECK-NEXT: | | `-ReturnStmt [[ADDR_116:0x[a-z0-9]*]] <line:39:3, col:10>
203 // CHECK-NEXT: | | `-IntegerLiteral [[ADDR_117:0x[a-z0-9]*]] <col:10> 'int' 0
204 // CHECK-NEXT: | |-FunctionDecl [[ADDR_118:0x[a-z0-9]*]] <line:38:1, line:40:1> line:38:5 used also_after 'int (int)'
205 // CHECK-NEXT: | | |-TemplateArgument type 'int'
206 // CHECK-NEXT: | | | `-BuiltinType [[ADDR_9]] 'int'
207 // CHECK-NEXT: | | |-ParmVarDecl [[ADDR_119:0x[a-z0-9]*]] <col:16, col:18> col:18 s 'int'
208 // CHECK-NEXT: | | `-CompoundStmt [[ADDR_120:0x[a-z0-9]*]] <col:21, line:40:1>
209 // CHECK-NEXT: | | `-ReturnStmt [[ADDR_121:0x[a-z0-9]*]] <line:39:3, col:10>
210 // CHECK-NEXT: | | `-IntegerLiteral [[ADDR_117]] <col:10> 'int' 0
211 // CHECK-NEXT: | `-FunctionDecl [[ADDR_122:0x[a-z0-9]*]] <line:38:1, line:40:1> line:38:5 used also_after 'int (double)'
212 // CHECK-NEXT: | |-TemplateArgument type 'double'
213 // CHECK-NEXT: | | `-BuiltinType [[ADDR_21]] 'double'
214 // CHECK-NEXT: | |-ParmVarDecl [[ADDR_123:0x[a-z0-9]*]] <col:16, col:18> col:18 s 'double'
215 // CHECK-NEXT: | `-CompoundStmt [[ADDR_124:0x[a-z0-9]*]] <col:21, line:40:1>
216 // CHECK-NEXT: | `-ReturnStmt [[ADDR_125:0x[a-z0-9]*]] <line:39:3, col:10>
217 // CHECK-NEXT: | `-IntegerLiteral [[ADDR_117]] <col:10> 'int' 0
218 // CHECK-NEXT: `-FunctionDecl [[ADDR_126:0x[a-z0-9]*]] <line:42:1, line:45:1> line:42:5 test 'int ({{.*}})'
219 // CHECK-NEXT: `-CompoundStmt [[ADDR_127:0x[a-z0-9]*]] <col:12, line:45:1>
220 // CHECK-NEXT: `-ReturnStmt [[ADDR_128:0x[a-z0-9]*]] <line:44:3, col:98>
221 // CXX11-NEXT: `-ExprWithCleanups [[ADDR_129:0x[a-z0-9]*]] <col:10, col:98> 'int'
222 // CHECK-NEXT: `-BinaryOperator [[ADDR_130:0x[a-z0-9]*]] <col:10, col:98> 'int' '+'
223 // CHECK-NEXT: |-BinaryOperator [[ADDR_131:0x[a-z0-9]*]] <col:10, col:74> 'int' '+'
224 // CHECK-NEXT: | |-BinaryOperator [[ADDR_132:0x[a-z0-9]*]] <col:10, col:57> 'int' '+'
225 // CHECK-NEXT: | | |-BinaryOperator [[ADDR_133:0x[a-z0-9]*]] <col:10, col:39> 'int' '+'
226 // CHECK-NEXT: | | | |-CallExpr [[ADDR_134:0x[a-z0-9]*]] <col:10, col:23> 'int'
227 // CHECK-NEXT: | | | | |-ImplicitCastExpr [[ADDR_135:0x[a-z0-9]*]] <col:10> 'int (*)(int)' <FunctionToPointerDecay>
228 // CHECK-NEXT: | | | | | `-DeclRefExpr [[ADDR_136:0x[a-z0-9]*]] <col:10> 'int (int)' {{.*}}Function [[ADDR_32]] 'also_before' 'int (int)' (FunctionTemplate [[ADDR_22]] 'also_before')
229 // CHECK-NEXT: | | | | `-IntegerLiteral [[ADDR_137:0x[a-z0-9]*]] <col:22> 'int' 0
230 // CHECK-NEXT: | | | `-CallExpr [[ADDR_138:0x[a-z0-9]*]] <col:27, col:39> 'int'
231 // CHECK-NEXT: | | | |-ImplicitCastExpr [[ADDR_139:0x[a-z0-9]*]] <col:27> 'int (*)(int)' <FunctionToPointerDecay>
232 // CHECK-NEXT: | | | | `-DeclRefExpr [[ADDR_140:0x[a-z0-9]*]] <col:27> 'int (int)' {{.*}}Function [[ADDR_118]] 'also_after' 'int (int)' (FunctionTemplate [[ADDR_111]] 'also_after')
233 // CHECK-NEXT: | | | `-IntegerLiteral [[ADDR_141:0x[a-z0-9]*]] <col:38> 'int' 0
234 // CHECK-NEXT: | | `-CallExpr [[ADDR_142:0x[a-z0-9]*]] <col:43, col:57> 'int'
235 // CHECK-NEXT: | | |-ImplicitCastExpr [[ADDR_143:0x[a-z0-9]*]] <col:43> 'int (*)(double)' <FunctionToPointerDecay>
236 // CHECK-NEXT: | | | `-DeclRefExpr [[ADDR_144:0x[a-z0-9]*]] <col:43> 'int (double)' {{.*}}Function [[ADDR_36]] 'also_before' 'int (double)' (FunctionTemplate [[ADDR_22]] 'also_before')
237 // CHECK-NEXT: | | `-FloatingLiteral [[ADDR_145:0x[a-z0-9]*]] <col:55> 'double' 0.000000e+00
238 // CHECK-NEXT: | `-CallExpr [[ADDR_146:0x[a-z0-9]*]] <col:61, col:74> 'int'
239 // CHECK-NEXT: | |-ImplicitCastExpr [[ADDR_147:0x[a-z0-9]*]] <col:61> 'int (*)(double)' <FunctionToPointerDecay>
240 // CHECK-NEXT: | | `-DeclRefExpr [[ADDR_148:0x[a-z0-9]*]] <col:61> 'int (double)' {{.*}}Function [[ADDR_122]] 'also_after' 'int (double)' (FunctionTemplate [[ADDR_111]] 'also_after')
241 // CHECK-NEXT: | `-FloatingLiteral [[ADDR_149:0x[a-z0-9]*]] <col:72> 'double' 0.000000e+00
242 // CHECK-NEXT: `-PseudoObjectExpr [[ADDR_150:0x[a-z0-9]*]] <col:78, col:98> 'int'
243 // CHECK-NEXT: |-CallExpr [[ADDR_151:0x[a-z0-9]*]] <col:78, col:98> 'int'
244 // CHECK-NEXT: | |-ImplicitCastExpr [[ADDR_152:0x[a-z0-9]*]] <col:78> 'int (*)(S<int>)' <FunctionToPointerDecay>
245 // CHECK-NEXT: | | `-DeclRefExpr [[ADDR_153:0x[a-z0-9]*]] <col:78> 'int (S<int>)' {{.*}}Function [[ADDR_65]] 'special' 'int (S<int>)' (FunctionTemplate [[ADDR_58]] 'special')
246 // CXX11-NEXT: | `-CXXConstructExpr [[ADDR_154:0x[a-z0-9]*]] <col:86, col:97> 'S<int>' 'void (S<int> &&) noexcept' elidable
247 // CXX11-NEXT: | `-MaterializeTemporaryExpr [[ADDR_155:0x[a-z0-9]*]] <col:86, col:97> 'S<int>' xvalue
248 // CHECK-NEXT: | `-CXXTemporaryObjectExpr [[ADDR_156:0x[a-z0-9]*]] <col:86, col:97> 'S<int>' 'void (int, int *)'
249 // CHECK-NEXT: | |-IntegerLiteral [[ADDR_157:0x[a-z0-9]*]] <col:93> 'int' 0
250 // CHECK-NEXT: | `-ImplicitCastExpr [[ADDR_158:0x[a-z0-9]*]] <col:96> 'int *' <NullToPointer>
251 // CHECK-NEXT: | `-IntegerLiteral [[ADDR_159:0x[a-z0-9]*]] <col:96> 'int' 0
252 // CHECK-NEXT: `-CallExpr [[ADDR_160:0x[a-z0-9]*]] <line:23:1, line:44:98> 'int'
253 // CHECK-NEXT: |-ImplicitCastExpr [[ADDR_161:0x[a-z0-9]*]] <line:23:1> 'int (*)(S<int>)' <FunctionToPointerDecay>
254 // CHECK-NEXT: | `-DeclRefExpr [[ADDR_68]] <col:1> 'int (S<int>)' {{.*}}Function [[ADDR_69]] 'special[implementation={extension(allow_templates)}]' 'int (S<int>)'
255 // CXX11-NEXT: `-CXXConstructExpr [[ADDR_162:0x[a-z0-9]*]] <line:44:86, col:97> 'S<int>' 'void (S<int> &&) noexcept' elidable
256 // CXX11-NEXT: `-MaterializeTemporaryExpr [[ADDR_163:0x[a-z0-9]*]] <col:86, col:97> 'S<int>' xvalue
257 // CXX11-NEXT: `-CXXTemporaryObjectExpr [[ADDR_156]] <col:86, col:97> 'S<int>' 'void (int, int *)'
258 // CXX17-NEXT: `-CXXTemporaryObjectExpr [[ADDR_156]] <line:[[#]]:86, col:97> 'S<int>' 'void (int, int *)'
259 // CHECK-NEXT: |-IntegerLiteral [[ADDR_157]] <col:93> 'int' 0
260 // CHECK-NEXT: `-ImplicitCastExpr [[ADDR_158]] <col:96> 'int *' <NullToPointer>
261 // CHECK-NEXT: `-IntegerLiteral [[ADDR_159]] <col:96> 'int' 0