File: | build/gcc/cp/tree.cc |
Warning: | line 3824, column 7 Called C++ object pointer is null |
Press '?' to see keyboard shortcuts
Keyboard shortcuts:
1 | /* Language-dependent node constructors for parse phase of GNU compiler. | |||
2 | Copyright (C) 1987-2023 Free Software Foundation, Inc. | |||
3 | Hacked by Michael Tiemann (tiemann@cygnus.com) | |||
4 | ||||
5 | This file is part of GCC. | |||
6 | ||||
7 | GCC is free software; you can redistribute it and/or modify | |||
8 | it under the terms of the GNU General Public License as published by | |||
9 | the Free Software Foundation; either version 3, or (at your option) | |||
10 | any later version. | |||
11 | ||||
12 | GCC is distributed in the hope that it will be useful, | |||
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
15 | GNU General Public License for more details. | |||
16 | ||||
17 | You should have received a copy of the GNU General Public License | |||
18 | along with GCC; see the file COPYING3. If not see | |||
19 | <http://www.gnu.org/licenses/>. */ | |||
20 | ||||
21 | #include "config.h" | |||
22 | #include "system.h" | |||
23 | #include "coretypes.h" | |||
24 | #include "tree.h" | |||
25 | #include "cp-tree.h" | |||
26 | #include "gimple-expr.h" | |||
27 | #include "cgraph.h" | |||
28 | #include "stor-layout.h" | |||
29 | #include "print-tree.h" | |||
30 | #include "tree-iterator.h" | |||
31 | #include "tree-inline.h" | |||
32 | #include "debug.h" | |||
33 | #include "convert.h" | |||
34 | #include "gimplify.h" | |||
35 | #include "stringpool.h" | |||
36 | #include "attribs.h" | |||
37 | #include "flags.h" | |||
38 | #include "selftest.h" | |||
39 | ||||
40 | static tree bot_manip (tree *, int *, void *); | |||
41 | static tree bot_replace (tree *, int *, void *); | |||
42 | static hashval_t list_hash_pieces (tree, tree, tree); | |||
43 | static tree build_target_expr (tree, tree, tsubst_flags_t); | |||
44 | static tree count_trees_r (tree *, int *, void *); | |||
45 | static tree verify_stmt_tree_r (tree *, int *, void *); | |||
46 | ||||
47 | static tree handle_init_priority_attribute (tree *, tree, tree, int, bool *); | |||
48 | static tree handle_abi_tag_attribute (tree *, tree, tree, int, bool *); | |||
49 | static tree handle_contract_attribute (tree *, tree, tree, int, bool *); | |||
50 | ||||
51 | /* If REF is an lvalue, returns the kind of lvalue that REF is. | |||
52 | Otherwise, returns clk_none. */ | |||
53 | ||||
54 | cp_lvalue_kind | |||
55 | lvalue_kind (const_tree ref) | |||
56 | { | |||
57 | cp_lvalue_kind op1_lvalue_kind = clk_none; | |||
58 | cp_lvalue_kind op2_lvalue_kind = clk_none; | |||
59 | ||||
60 | /* Expressions of reference type are sometimes wrapped in | |||
61 | INDIRECT_REFs. INDIRECT_REFs are just internal compiler | |||
62 | representation, not part of the language, so we have to look | |||
63 | through them. */ | |||
64 | if (REFERENCE_REF_P (ref)((((enum tree_code) (ref)->base.code) == INDIRECT_REF) && ((contains_struct_check (((*((const_cast<tree*> (tree_operand_check ((ref), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 64, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 64, __FUNCTION__))->typed.type) && (((enum tree_code ) (((contains_struct_check (((*((const_cast<tree*> (tree_operand_check (((ref)), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 64, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 64, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE ))) | |||
65 | return lvalue_kind (TREE_OPERAND (ref, 0)(*((const_cast<tree*> (tree_operand_check ((ref), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 65, __FUNCTION__)))))); | |||
66 | ||||
67 | if (TREE_TYPE (ref)((contains_struct_check ((ref), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 67, __FUNCTION__))->typed.type) | |||
68 | && TYPE_REF_P (TREE_TYPE (ref))(((enum tree_code) (((contains_struct_check ((ref), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 68, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE )) | |||
69 | { | |||
70 | /* unnamed rvalue references are rvalues */ | |||
71 | if (TYPE_REF_IS_RVALUE (TREE_TYPE (ref))((tree_check ((((contains_struct_check ((ref), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 71, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 71, __FUNCTION__, (REFERENCE_TYPE)))->base.private_flag) | |||
72 | && TREE_CODE (ref)((enum tree_code) (ref)->base.code) != PARM_DECL | |||
73 | && !VAR_P (ref)(((enum tree_code) (ref)->base.code) == VAR_DECL) | |||
74 | && TREE_CODE (ref)((enum tree_code) (ref)->base.code) != COMPONENT_REF | |||
75 | /* Functions are always lvalues. */ | |||
76 | && TREE_CODE (TREE_TYPE (TREE_TYPE (ref)))((enum tree_code) (((contains_struct_check ((((contains_struct_check ((ref), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 76, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 76, __FUNCTION__))->typed.type))->base.code) != FUNCTION_TYPE) | |||
77 | { | |||
78 | op1_lvalue_kind = clk_rvalueref; | |||
79 | if (implicit_rvalue_p (ref)) | |||
80 | op1_lvalue_kind |= clk_implicit_rval; | |||
81 | return op1_lvalue_kind; | |||
82 | } | |||
83 | ||||
84 | /* lvalue references and named rvalue references are lvalues. */ | |||
85 | return clk_ordinary; | |||
86 | } | |||
87 | ||||
88 | if (ref == current_class_ptr(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun + 0)->language)->x_current_class_ptr : &scope_chain ->x_current_class_ptr))) | |||
89 | return clk_none; | |||
90 | ||||
91 | /* Expressions with cv void type are prvalues. */ | |||
92 | if (TREE_TYPE (ref)((contains_struct_check ((ref), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 92, __FUNCTION__))->typed.type) && VOID_TYPE_P (TREE_TYPE (ref))(((enum tree_code) (((contains_struct_check ((ref), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 92, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE )) | |||
93 | return clk_none; | |||
94 | ||||
95 | switch (TREE_CODE (ref)((enum tree_code) (ref)->base.code)) | |||
96 | { | |||
97 | case SAVE_EXPR: | |||
98 | return clk_none; | |||
99 | ||||
100 | /* preincrements and predecrements are valid lvals, provided | |||
101 | what they refer to are valid lvals. */ | |||
102 | case PREINCREMENT_EXPR: | |||
103 | case PREDECREMENT_EXPR: | |||
104 | case TRY_CATCH_EXPR: | |||
105 | case REALPART_EXPR: | |||
106 | case IMAGPART_EXPR: | |||
107 | case VIEW_CONVERT_EXPR: | |||
108 | op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0)(*((const_cast<tree*> (tree_operand_check ((ref), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 108, __FUNCTION__)))))); | |||
109 | /* As for ARRAY_REF and COMPONENT_REF, these codes turn a class prvalue | |||
110 | into an xvalue: we need to materialize the temporary before we mess | |||
111 | with it. Except VIEW_CONVERT_EXPR that doesn't actually change the | |||
112 | type, as in location wrapper and REF_PARENTHESIZED_P. */ | |||
113 | if (op1_lvalue_kind == clk_class | |||
114 | && !(TREE_CODE (ref)((enum tree_code) (ref)->base.code) == VIEW_CONVERT_EXPR | |||
115 | && (same_type_ignoring_top_level_qualifiers_p | |||
116 | (TREE_TYPE (ref)((contains_struct_check ((ref), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 116, __FUNCTION__))->typed.type), TREE_TYPE (TREE_OPERAND (ref, 0))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check ((ref), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 116, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 116, __FUNCTION__))->typed.type))))) | |||
117 | return clk_rvalueref; | |||
118 | return op1_lvalue_kind; | |||
119 | ||||
120 | case ARRAY_REF: | |||
121 | { | |||
122 | tree op1 = TREE_OPERAND (ref, 0)(*((const_cast<tree*> (tree_operand_check ((ref), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 122, __FUNCTION__))))); | |||
123 | if (TREE_CODE (TREE_TYPE (op1))((enum tree_code) (((contains_struct_check ((op1), (TS_TYPED) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 123, __FUNCTION__))->typed.type))->base.code) == ARRAY_TYPE) | |||
124 | { | |||
125 | op1_lvalue_kind = lvalue_kind (op1); | |||
126 | if (op1_lvalue_kind == clk_class) | |||
127 | /* in the case of an array operand, the result is an lvalue if | |||
128 | that operand is an lvalue and an xvalue otherwise */ | |||
129 | op1_lvalue_kind = clk_rvalueref; | |||
130 | return op1_lvalue_kind; | |||
131 | } | |||
132 | else | |||
133 | return clk_ordinary; | |||
134 | } | |||
135 | ||||
136 | case MEMBER_REF: | |||
137 | case DOTSTAR_EXPR: | |||
138 | if (TREE_CODE (ref)((enum tree_code) (ref)->base.code) == MEMBER_REF) | |||
139 | op1_lvalue_kind = clk_ordinary; | |||
140 | else | |||
141 | op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0)(*((const_cast<tree*> (tree_operand_check ((ref), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 141, __FUNCTION__)))))); | |||
142 | if (TYPE_PTRMEMFUNC_P (TREE_TYPE (TREE_OPERAND (ref, 1)))(((enum tree_code) (((contains_struct_check (((*((const_cast< tree*> (tree_operand_check ((ref), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 142, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 142, __FUNCTION__))->typed.type))->base.code) == RECORD_TYPE && (((tree_class_check (((tree_check ((((contains_struct_check (((*((const_cast<tree*> (tree_operand_check ((ref), (1 ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 142, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 142, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 142, __FUNCTION__, (RECORD_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 142, __FUNCTION__))->type_common.lang_flag_2)))) | |||
143 | op1_lvalue_kind = clk_none; | |||
144 | else if (op1_lvalue_kind == clk_class) | |||
145 | /* The result of a .* expression whose second operand is a pointer to a | |||
146 | data member is an lvalue if the first operand is an lvalue and an | |||
147 | xvalue otherwise. */ | |||
148 | op1_lvalue_kind = clk_rvalueref; | |||
149 | return op1_lvalue_kind; | |||
150 | ||||
151 | case COMPONENT_REF: | |||
152 | if (BASELINK_P (TREE_OPERAND (ref, 1))(((enum tree_code) ((*((const_cast<tree*> (tree_operand_check ((ref), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 152, __FUNCTION__))))))->base.code) == BASELINK)) | |||
153 | { | |||
154 | tree fn = BASELINK_FUNCTIONS (TREE_OPERAND (ref, 1))(((struct tree_baselink*) (tree_check (((*((const_cast<tree *> (tree_operand_check ((ref), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 154, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 154, __FUNCTION__, (BASELINK))))->functions); | |||
155 | ||||
156 | /* For static member function recurse on the BASELINK, we can get | |||
157 | here e.g. from reference_binding. If BASELINK_FUNCTIONS is | |||
158 | OVERLOAD, the overload is resolved first if possible through | |||
159 | resolve_address_of_overloaded_function. */ | |||
160 | if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == FUNCTION_DECL && DECL_STATIC_FUNCTION_P (fn)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code) (fn)->base.code) == TEMPLATE_DECL ? ( (struct tree_template_decl *)(const_cast<union tree_node * > ((((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 160, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)) , (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 160, __FUNCTION__))->decl_common.lang_specific); if (!(( (enum tree_code) (fn)->base.code) == FUNCTION_DECL || (((enum tree_code) (fn)->base.code) == TEMPLATE_DECL && ( (struct tree_template_decl *)(const_cast<union tree_node * > ((((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 160, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree ) nullptr && ((enum tree_code) (((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 160, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->base .code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn ) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 160, __FUNCTION__); <->u.fn; })->static_function )) | |||
161 | return lvalue_kind (TREE_OPERAND (ref, 1)(*((const_cast<tree*> (tree_operand_check ((ref), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 161, __FUNCTION__)))))); | |||
162 | } | |||
163 | op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0)(*((const_cast<tree*> (tree_operand_check ((ref), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 163, __FUNCTION__)))))); | |||
164 | if (op1_lvalue_kind == clk_class) | |||
165 | /* If E1 is an lvalue, then E1.E2 is an lvalue; | |||
166 | otherwise E1.E2 is an xvalue. */ | |||
167 | op1_lvalue_kind = clk_rvalueref; | |||
168 | ||||
169 | /* Look at the member designator. */ | |||
170 | if (!op1_lvalue_kind) | |||
171 | ; | |||
172 | else if (is_overloaded_fn (TREE_OPERAND (ref, 1)(*((const_cast<tree*> (tree_operand_check ((ref), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 172, __FUNCTION__))))))) | |||
173 | /* The "field" can be a FUNCTION_DECL or an OVERLOAD in some | |||
174 | situations. If we're seeing a COMPONENT_REF, it's a non-static | |||
175 | member, so it isn't an lvalue. */ | |||
176 | op1_lvalue_kind = clk_none; | |||
177 | else if (TREE_CODE (TREE_OPERAND (ref, 1))((enum tree_code) ((*((const_cast<tree*> (tree_operand_check ((ref), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 177, __FUNCTION__))))))->base.code) != FIELD_DECL) | |||
178 | /* This can be IDENTIFIER_NODE in a template. */; | |||
179 | else if (DECL_C_BIT_FIELD (TREE_OPERAND (ref, 1))(((contains_struct_check (((tree_check (((*((const_cast<tree *> (tree_operand_check ((ref), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 179, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 179, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 179, __FUNCTION__))->decl_common.lang_flag_4) == 1)) | |||
180 | { | |||
181 | /* Clear the ordinary bit. If this object was a class | |||
182 | rvalue we want to preserve that information. */ | |||
183 | op1_lvalue_kind &= ~clk_ordinary; | |||
184 | /* The lvalue is for a bitfield. */ | |||
185 | op1_lvalue_kind |= clk_bitfield; | |||
186 | } | |||
187 | else if (DECL_PACKED (TREE_OPERAND (ref, 1))((tree_check (((*((const_cast<tree*> (tree_operand_check ((ref), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 187, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 187, __FUNCTION__, (FIELD_DECL)))->base.u.bits.packed_flag )) | |||
188 | op1_lvalue_kind |= clk_packed; | |||
189 | ||||
190 | return op1_lvalue_kind; | |||
191 | ||||
192 | case STRING_CST: | |||
193 | case COMPOUND_LITERAL_EXPR: | |||
194 | return clk_ordinary; | |||
195 | ||||
196 | case CONST_DECL: | |||
197 | /* CONST_DECL without TREE_STATIC are enumeration values and | |||
198 | thus not lvalues. With TREE_STATIC they are used by ObjC++ | |||
199 | in objc_build_string_object and need to be considered as | |||
200 | lvalues. */ | |||
201 | if (! TREE_STATIC (ref)((ref)->base.static_flag)) | |||
202 | return clk_none; | |||
203 | /* FALLTHRU */ | |||
204 | case VAR_DECL: | |||
205 | if (VAR_P (ref)(((enum tree_code) (ref)->base.code) == VAR_DECL) && DECL_HAS_VALUE_EXPR_P (ref)((tree_check3 ((ref), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 205, __FUNCTION__, (VAR_DECL), (PARM_DECL), (RESULT_DECL))) ->decl_common.decl_flag_2)) | |||
206 | return lvalue_kind (DECL_VALUE_EXPR (CONST_CAST_TREE (ref))(decl_value_expr_lookup ((contains_struct_check (((const_cast <union tree_node *> (((ref))))), (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 206, __FUNCTION__))))); | |||
207 | ||||
208 | if (TREE_READONLY (ref)((non_type_check ((ref), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 208, __FUNCTION__))->base.readonly_flag) && ! TREE_STATIC (ref)((ref)->base.static_flag) | |||
209 | && DECL_LANG_SPECIFIC (ref)((contains_struct_check ((ref), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 209, __FUNCTION__))->decl_common.lang_specific) | |||
210 | && DECL_IN_AGGR_P (ref)(((contains_struct_check ((ref), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 210, __FUNCTION__))->decl_common.lang_flag_3))) | |||
211 | return clk_none; | |||
212 | /* FALLTHRU */ | |||
213 | case INDIRECT_REF: | |||
214 | case ARROW_EXPR: | |||
215 | case PARM_DECL: | |||
216 | case RESULT_DECL: | |||
217 | case PLACEHOLDER_EXPR: | |||
218 | return clk_ordinary; | |||
219 | ||||
220 | /* A scope ref in a template, left as SCOPE_REF to support later | |||
221 | access checking. */ | |||
222 | case SCOPE_REF: | |||
223 | gcc_assert (!type_dependent_expression_p (CONST_CAST_TREE (ref)))((void)(!(!type_dependent_expression_p ((const_cast<union tree_node *> (((ref)))))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 223, __FUNCTION__), 0 : 0)); | |||
224 | { | |||
225 | tree op = TREE_OPERAND (ref, 1)(*((const_cast<tree*> (tree_operand_check ((ref), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 225, __FUNCTION__))))); | |||
226 | if (TREE_CODE (op)((enum tree_code) (op)->base.code) == FIELD_DECL) | |||
227 | return (DECL_C_BIT_FIELD (op)(((contains_struct_check (((tree_check ((op), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 227, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 227, __FUNCTION__))->decl_common.lang_flag_4) == 1) ? clk_bitfield : clk_ordinary); | |||
228 | else | |||
229 | return lvalue_kind (op); | |||
230 | } | |||
231 | ||||
232 | case MAX_EXPR: | |||
233 | case MIN_EXPR: | |||
234 | /* Disallow <? and >? as lvalues if either argument side-effects. */ | |||
235 | if (TREE_SIDE_EFFECTS (TREE_OPERAND (ref, 0))((non_type_check (((*((const_cast<tree*> (tree_operand_check ((ref), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 235, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 235, __FUNCTION__))->base.side_effects_flag) | |||
236 | || TREE_SIDE_EFFECTS (TREE_OPERAND (ref, 1))((non_type_check (((*((const_cast<tree*> (tree_operand_check ((ref), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 236, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 236, __FUNCTION__))->base.side_effects_flag)) | |||
237 | return clk_none; | |||
238 | op1_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 0)(*((const_cast<tree*> (tree_operand_check ((ref), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 238, __FUNCTION__)))))); | |||
239 | op2_lvalue_kind = lvalue_kind (TREE_OPERAND (ref, 1)(*((const_cast<tree*> (tree_operand_check ((ref), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 239, __FUNCTION__)))))); | |||
240 | break; | |||
241 | ||||
242 | case COND_EXPR: | |||
243 | if (processing_template_declscope_chain->x_processing_template_decl) | |||
244 | { | |||
245 | /* Within templates, a REFERENCE_TYPE will indicate whether | |||
246 | the COND_EXPR result is an ordinary lvalue or rvalueref. | |||
247 | Since REFERENCE_TYPEs are handled above, if we reach this | |||
248 | point, we know we got a plain rvalue. Unless we have a | |||
249 | type-dependent expr, that is, but we shouldn't be testing | |||
250 | lvalueness if we can't even tell the types yet! */ | |||
251 | gcc_assert (!type_dependent_expression_p (CONST_CAST_TREE (ref)))((void)(!(!type_dependent_expression_p ((const_cast<union tree_node *> (((ref)))))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 251, __FUNCTION__), 0 : 0)); | |||
252 | goto default_; | |||
253 | } | |||
254 | { | |||
255 | tree op1 = TREE_OPERAND (ref, 1)(*((const_cast<tree*> (tree_operand_check ((ref), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 255, __FUNCTION__))))); | |||
256 | if (!op1) op1 = TREE_OPERAND (ref, 0)(*((const_cast<tree*> (tree_operand_check ((ref), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 256, __FUNCTION__))))); | |||
257 | tree op2 = TREE_OPERAND (ref, 2)(*((const_cast<tree*> (tree_operand_check ((ref), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 257, __FUNCTION__))))); | |||
258 | op1_lvalue_kind = lvalue_kind (op1); | |||
259 | op2_lvalue_kind = lvalue_kind (op2); | |||
260 | if (!op1_lvalue_kind != !op2_lvalue_kind) | |||
261 | { | |||
262 | /* The second or the third operand (but not both) is a | |||
263 | throw-expression; the result is of the type | |||
264 | and value category of the other. */ | |||
265 | if (op1_lvalue_kind && TREE_CODE (op2)((enum tree_code) (op2)->base.code) == THROW_EXPR) | |||
266 | op2_lvalue_kind = op1_lvalue_kind; | |||
267 | else if (op2_lvalue_kind && TREE_CODE (op1)((enum tree_code) (op1)->base.code) == THROW_EXPR) | |||
268 | op1_lvalue_kind = op2_lvalue_kind; | |||
269 | } | |||
270 | } | |||
271 | break; | |||
272 | ||||
273 | case MODOP_EXPR: | |||
274 | /* We expect to see unlowered MODOP_EXPRs only during | |||
275 | template processing. */ | |||
276 | gcc_assert (processing_template_decl)((void)(!(scope_chain->x_processing_template_decl) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 276, __FUNCTION__), 0 : 0)); | |||
277 | return clk_ordinary; | |||
278 | ||||
279 | case MODIFY_EXPR: | |||
280 | case TYPEID_EXPR: | |||
281 | return clk_ordinary; | |||
282 | ||||
283 | case COMPOUND_EXPR: | |||
284 | return lvalue_kind (TREE_OPERAND (ref, 1)(*((const_cast<tree*> (tree_operand_check ((ref), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 284, __FUNCTION__)))))); | |||
285 | ||||
286 | case TARGET_EXPR: | |||
287 | return clk_class; | |||
288 | ||||
289 | case VA_ARG_EXPR: | |||
290 | return (CLASS_TYPE_P (TREE_TYPE (ref))(((((enum tree_code) (((contains_struct_check ((ref), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 290, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE || (((enum tree_code) (((contains_struct_check ((ref), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 290, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE ) && ((tree_class_check ((((contains_struct_check ((ref ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 290, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 290, __FUNCTION__))->type_common.lang_flag_5)) ? clk_class : clk_none); | |||
291 | ||||
292 | case CALL_EXPR: | |||
293 | /* We can see calls outside of TARGET_EXPR in templates. */ | |||
294 | if (CLASS_TYPE_P (TREE_TYPE (ref))(((((enum tree_code) (((contains_struct_check ((ref), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 294, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE || (((enum tree_code) (((contains_struct_check ((ref), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 294, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE ) && ((tree_class_check ((((contains_struct_check ((ref ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 294, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 294, __FUNCTION__))->type_common.lang_flag_5))) | |||
295 | return clk_class; | |||
296 | return clk_none; | |||
297 | ||||
298 | case FUNCTION_DECL: | |||
299 | /* All functions (except non-static-member functions) are | |||
300 | lvalues. */ | |||
301 | return (DECL_NONSTATIC_MEMBER_FUNCTION_P (ref)(((enum tree_code) (((contains_struct_check ((ref), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 301, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE ) | |||
302 | ? clk_none : clk_ordinary); | |||
303 | ||||
304 | case BASELINK: | |||
305 | /* We now represent a reference to a single static member function | |||
306 | with a BASELINK. */ | |||
307 | /* This CONST_CAST is okay because BASELINK_FUNCTIONS returns | |||
308 | its argument unmodified and we assign it to a const_tree. */ | |||
309 | return lvalue_kind (BASELINK_FUNCTIONS (CONST_CAST_TREE (ref))(((struct tree_baselink*) (tree_check (((const_cast<union tree_node *> (((ref))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 309, __FUNCTION__, (BASELINK))))->functions)); | |||
310 | ||||
311 | case NON_DEPENDENT_EXPR: | |||
312 | case PAREN_EXPR: | |||
313 | return lvalue_kind (TREE_OPERAND (ref, 0)(*((const_cast<tree*> (tree_operand_check ((ref), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 313, __FUNCTION__)))))); | |||
314 | ||||
315 | case TEMPLATE_PARM_INDEX: | |||
316 | if (CLASS_TYPE_P (TREE_TYPE (ref))(((((enum tree_code) (((contains_struct_check ((ref), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 316, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE || (((enum tree_code) (((contains_struct_check ((ref), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 316, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE ) && ((tree_class_check ((((contains_struct_check ((ref ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 316, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 316, __FUNCTION__))->type_common.lang_flag_5))) | |||
317 | /* A template parameter object is an lvalue. */ | |||
318 | return clk_ordinary; | |||
319 | return clk_none; | |||
320 | ||||
321 | default: | |||
322 | default_: | |||
323 | if (!TREE_TYPE (ref)((contains_struct_check ((ref), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 323, __FUNCTION__))->typed.type)) | |||
324 | return clk_none; | |||
325 | if (CLASS_TYPE_P (TREE_TYPE (ref))(((((enum tree_code) (((contains_struct_check ((ref), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 325, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE || (((enum tree_code) (((contains_struct_check ((ref), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 325, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE ) && ((tree_class_check ((((contains_struct_check ((ref ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 325, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 325, __FUNCTION__))->type_common.lang_flag_5)) | |||
326 | || TREE_CODE (TREE_TYPE (ref))((enum tree_code) (((contains_struct_check ((ref), (TS_TYPED) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 326, __FUNCTION__))->typed.type))->base.code) == ARRAY_TYPE) | |||
327 | return clk_class; | |||
328 | return clk_none; | |||
329 | } | |||
330 | ||||
331 | /* If one operand is not an lvalue at all, then this expression is | |||
332 | not an lvalue. */ | |||
333 | if (!op1_lvalue_kind || !op2_lvalue_kind) | |||
334 | return clk_none; | |||
335 | ||||
336 | /* Otherwise, it's an lvalue, and it has all the odd properties | |||
337 | contributed by either operand. */ | |||
338 | op1_lvalue_kind = op1_lvalue_kind | op2_lvalue_kind; | |||
339 | /* It's not an ordinary lvalue if it involves any other kind. */ | |||
340 | if ((op1_lvalue_kind & ~clk_ordinary) != clk_none) | |||
341 | op1_lvalue_kind &= ~clk_ordinary; | |||
342 | /* It can't be both a pseudo-lvalue and a non-addressable lvalue. | |||
343 | A COND_EXPR of those should be wrapped in a TARGET_EXPR. */ | |||
344 | if ((op1_lvalue_kind & (clk_rvalueref|clk_class)) | |||
345 | && (op1_lvalue_kind & (clk_bitfield|clk_packed))) | |||
346 | op1_lvalue_kind = clk_none; | |||
347 | return op1_lvalue_kind; | |||
348 | } | |||
349 | ||||
350 | /* Returns the kind of lvalue that REF is, in the sense of [basic.lval]. */ | |||
351 | ||||
352 | cp_lvalue_kind | |||
353 | real_lvalue_p (const_tree ref) | |||
354 | { | |||
355 | cp_lvalue_kind kind = lvalue_kind (ref); | |||
356 | if (kind & (clk_rvalueref|clk_class)) | |||
357 | return clk_none; | |||
358 | else | |||
359 | return kind; | |||
360 | } | |||
361 | ||||
362 | /* c-common wants us to return bool. */ | |||
363 | ||||
364 | bool | |||
365 | lvalue_p (const_tree t) | |||
366 | { | |||
367 | return real_lvalue_p (t); | |||
368 | } | |||
369 | ||||
370 | /* This differs from lvalue_p in that xvalues are included. */ | |||
371 | ||||
372 | bool | |||
373 | glvalue_p (const_tree ref) | |||
374 | { | |||
375 | cp_lvalue_kind kind = lvalue_kind (ref); | |||
376 | if (kind & clk_class) | |||
377 | return false; | |||
378 | else | |||
379 | return (kind != clk_none); | |||
380 | } | |||
381 | ||||
382 | /* This differs from glvalue_p in that class prvalues are included. */ | |||
383 | ||||
384 | bool | |||
385 | obvalue_p (const_tree ref) | |||
386 | { | |||
387 | return (lvalue_kind (ref) != clk_none); | |||
388 | } | |||
389 | ||||
390 | /* Returns true if REF is an xvalue (the result of dereferencing an rvalue | |||
391 | reference), false otherwise. */ | |||
392 | ||||
393 | bool | |||
394 | xvalue_p (const_tree ref) | |||
395 | { | |||
396 | return (lvalue_kind (ref) & clk_rvalueref); | |||
397 | } | |||
398 | ||||
399 | /* True if REF is a bit-field. */ | |||
400 | ||||
401 | bool | |||
402 | bitfield_p (const_tree ref) | |||
403 | { | |||
404 | return (lvalue_kind (ref) & clk_bitfield); | |||
405 | } | |||
406 | ||||
407 | /* C++-specific version of stabilize_reference. */ | |||
408 | ||||
409 | tree | |||
410 | cp_stabilize_reference (tree ref) | |||
411 | { | |||
412 | STRIP_ANY_LOCATION_WRAPPER (ref)(ref) = tree_strip_any_location_wrapper ((const_cast<union tree_node *> (((ref))))); | |||
413 | switch (TREE_CODE (ref)((enum tree_code) (ref)->base.code)) | |||
414 | { | |||
415 | case NON_DEPENDENT_EXPR: | |||
416 | /* We aren't actually evaluating this. */ | |||
417 | return ref; | |||
418 | ||||
419 | /* We need to treat specially anything stabilize_reference doesn't | |||
420 | handle specifically. */ | |||
421 | case VAR_DECL: | |||
422 | case PARM_DECL: | |||
423 | case RESULT_DECL: | |||
424 | CASE_CONVERTcase NOP_EXPR: case CONVERT_EXPR: | |||
425 | case FLOAT_EXPR: | |||
426 | case FIX_TRUNC_EXPR: | |||
427 | case INDIRECT_REF: | |||
428 | case COMPONENT_REF: | |||
429 | case BIT_FIELD_REF: | |||
430 | case ARRAY_REF: | |||
431 | case ARRAY_RANGE_REF: | |||
432 | case ERROR_MARK: | |||
433 | break; | |||
434 | default: | |||
435 | cp_lvalue_kind kind = lvalue_kind (ref); | |||
436 | if ((kind & ~clk_class) != clk_none) | |||
437 | { | |||
438 | tree type = unlowered_expr_type (ref); | |||
439 | bool rval = !!(kind & clk_rvalueref); | |||
440 | type = cp_build_reference_type (type, rval); | |||
441 | /* This inhibits warnings in, eg, cxx_mark_addressable | |||
442 | (c++/60955). */ | |||
443 | warning_sentinel s (extra_warningsglobal_options.x_extra_warnings); | |||
444 | ref = build_static_cast (input_location, type, ref, | |||
445 | tf_error); | |||
446 | } | |||
447 | } | |||
448 | ||||
449 | return stabilize_reference (ref); | |||
450 | } | |||
451 | ||||
452 | /* Test whether DECL is a builtin that may appear in a | |||
453 | constant-expression. */ | |||
454 | ||||
455 | bool | |||
456 | builtin_valid_in_constant_expr_p (const_tree decl) | |||
457 | { | |||
458 | STRIP_ANY_LOCATION_WRAPPER (decl)(decl) = tree_strip_any_location_wrapper ((const_cast<union tree_node *> (((decl))))); | |||
459 | if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) != FUNCTION_DECL) | |||
460 | /* Not a function. */ | |||
461 | return false; | |||
462 | if (DECL_BUILT_IN_CLASS (decl)((built_in_class) (tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 462, __FUNCTION__, (FUNCTION_DECL)))->function_decl.built_in_class ) != BUILT_IN_NORMAL) | |||
463 | { | |||
464 | if (fndecl_built_in_p (decl, BUILT_IN_FRONTEND)) | |||
465 | switch (DECL_FE_FUNCTION_CODE (decl)) | |||
466 | { | |||
467 | case CP_BUILT_IN_IS_CONSTANT_EVALUATED: | |||
468 | case CP_BUILT_IN_SOURCE_LOCATION: | |||
469 | case CP_BUILT_IN_IS_CORRESPONDING_MEMBER: | |||
470 | case CP_BUILT_IN_IS_POINTER_INTERCONVERTIBLE_WITH_CLASS: | |||
471 | return true; | |||
472 | default: | |||
473 | break; | |||
474 | } | |||
475 | /* Not a built-in. */ | |||
476 | return false; | |||
477 | } | |||
478 | switch (DECL_FUNCTION_CODE (decl)) | |||
479 | { | |||
480 | /* These always have constant results like the corresponding | |||
481 | macros/symbol. */ | |||
482 | case BUILT_IN_FILE: | |||
483 | case BUILT_IN_FUNCTION: | |||
484 | case BUILT_IN_LINE: | |||
485 | ||||
486 | /* The following built-ins are valid in constant expressions | |||
487 | when their arguments are. */ | |||
488 | case BUILT_IN_ADD_OVERFLOW_P: | |||
489 | case BUILT_IN_SUB_OVERFLOW_P: | |||
490 | case BUILT_IN_MUL_OVERFLOW_P: | |||
491 | ||||
492 | /* These have constant results even if their operands are | |||
493 | non-constant. */ | |||
494 | case BUILT_IN_CONSTANT_P: | |||
495 | case BUILT_IN_ATOMIC_ALWAYS_LOCK_FREE: | |||
496 | return true; | |||
497 | default: | |||
498 | return false; | |||
499 | } | |||
500 | } | |||
501 | ||||
502 | /* Build a TARGET_EXPR, initializing the DECL with the VALUE. */ | |||
503 | ||||
504 | static tree | |||
505 | build_target_expr (tree decl, tree value, tsubst_flags_t complain) | |||
506 | { | |||
507 | tree t; | |||
508 | tree type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 508, __FUNCTION__))->typed.type); | |||
509 | ||||
510 | value = mark_rvalue_use (value); | |||
511 | ||||
512 | gcc_checking_assert (VOID_TYPE_P (TREE_TYPE (value))((void)(!((((enum tree_code) (((contains_struct_check ((value ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 512, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE ) || ((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 513, __FUNCTION__))->typed.type) == ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 513, __FUNCTION__))->typed.type) || ((((enum tree_code) ( ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 515, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE ) && ((enum tree_code) (value)->base.code) == CALL_EXPR ) || useless_type_conversion_p (((contains_struct_check ((decl ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 517, __FUNCTION__))->typed.type), ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 518, __FUNCTION__))->typed.type))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 518, __FUNCTION__), 0 : 0)) | |||
513 | || TREE_TYPE (decl) == TREE_TYPE (value)((void)(!((((enum tree_code) (((contains_struct_check ((value ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 512, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE ) || ((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 513, __FUNCTION__))->typed.type) == ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 513, __FUNCTION__))->typed.type) || ((((enum tree_code) ( ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 515, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE ) && ((enum tree_code) (value)->base.code) == CALL_EXPR ) || useless_type_conversion_p (((contains_struct_check ((decl ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 517, __FUNCTION__))->typed.type), ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 518, __FUNCTION__))->typed.type))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 518, __FUNCTION__), 0 : 0)) | |||
514 | /* On ARM ctors return 'this'. */((void)(!((((enum tree_code) (((contains_struct_check ((value ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 512, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE ) || ((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 513, __FUNCTION__))->typed.type) == ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 513, __FUNCTION__))->typed.type) || ((((enum tree_code) ( ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 515, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE ) && ((enum tree_code) (value)->base.code) == CALL_EXPR ) || useless_type_conversion_p (((contains_struct_check ((decl ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 517, __FUNCTION__))->typed.type), ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 518, __FUNCTION__))->typed.type))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 518, __FUNCTION__), 0 : 0)) | |||
515 | || (TYPE_PTR_P (TREE_TYPE (value))((void)(!((((enum tree_code) (((contains_struct_check ((value ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 512, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE ) || ((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 513, __FUNCTION__))->typed.type) == ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 513, __FUNCTION__))->typed.type) || ((((enum tree_code) ( ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 515, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE ) && ((enum tree_code) (value)->base.code) == CALL_EXPR ) || useless_type_conversion_p (((contains_struct_check ((decl ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 517, __FUNCTION__))->typed.type), ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 518, __FUNCTION__))->typed.type))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 518, __FUNCTION__), 0 : 0)) | |||
516 | && TREE_CODE (value) == CALL_EXPR)((void)(!((((enum tree_code) (((contains_struct_check ((value ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 512, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE ) || ((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 513, __FUNCTION__))->typed.type) == ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 513, __FUNCTION__))->typed.type) || ((((enum tree_code) ( ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 515, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE ) && ((enum tree_code) (value)->base.code) == CALL_EXPR ) || useless_type_conversion_p (((contains_struct_check ((decl ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 517, __FUNCTION__))->typed.type), ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 518, __FUNCTION__))->typed.type))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 518, __FUNCTION__), 0 : 0)) | |||
517 | || useless_type_conversion_p (TREE_TYPE (decl),((void)(!((((enum tree_code) (((contains_struct_check ((value ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 512, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE ) || ((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 513, __FUNCTION__))->typed.type) == ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 513, __FUNCTION__))->typed.type) || ((((enum tree_code) ( ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 515, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE ) && ((enum tree_code) (value)->base.code) == CALL_EXPR ) || useless_type_conversion_p (((contains_struct_check ((decl ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 517, __FUNCTION__))->typed.type), ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 518, __FUNCTION__))->typed.type))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 518, __FUNCTION__), 0 : 0)) | |||
518 | TREE_TYPE (value)))((void)(!((((enum tree_code) (((contains_struct_check ((value ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 512, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE ) || ((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 513, __FUNCTION__))->typed.type) == ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 513, __FUNCTION__))->typed.type) || ((((enum tree_code) ( ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 515, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE ) && ((enum tree_code) (value)->base.code) == CALL_EXPR ) || useless_type_conversion_p (((contains_struct_check ((decl ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 517, __FUNCTION__))->typed.type), ((contains_struct_check ((value), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 518, __FUNCTION__))->typed.type))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 518, __FUNCTION__), 0 : 0)); | |||
519 | ||||
520 | /* Set TREE_READONLY for optimization, such as gimplify_init_constructor | |||
521 | moving a constant aggregate into .rodata. */ | |||
522 | if (CP_TYPE_CONST_NON_VOLATILE_P (type)((cp_type_quals (type) & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE )) == TYPE_QUAL_CONST) | |||
523 | && !TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)(((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 523, __FUNCTION__))->type_common.lang_flag_4)) | |||
524 | && !VOID_TYPE_P (TREE_TYPE (value))(((enum tree_code) (((contains_struct_check ((value), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 524, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE ) | |||
525 | && reduced_constant_expression_p (value)) | |||
526 | TREE_READONLY (decl)((non_type_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 526, __FUNCTION__))->base.readonly_flag) = true; | |||
527 | ||||
528 | if (complain & tf_no_cleanup) | |||
529 | /* The caller is building a new-expr and does not need a cleanup. */ | |||
530 | t = NULL_TREE(tree) nullptr; | |||
531 | else | |||
532 | { | |||
533 | t = cxx_maybe_build_cleanup (decl, complain); | |||
534 | if (t == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
535 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
536 | } | |||
537 | ||||
538 | set_target_expr_eliding (value); | |||
539 | ||||
540 | t = build4 (TARGET_EXPR, type, decl, value, t, NULL_TREE(tree) nullptr); | |||
541 | if (location_t eloc = cp_expr_location (value)) | |||
542 | SET_EXPR_LOCATION (t, eloc)(expr_check (((t)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 542, __FUNCTION__))->exp.locus = (eloc); | |||
543 | /* We always set TREE_SIDE_EFFECTS so that expand_expr does not | |||
544 | ignore the TARGET_EXPR. If there really turn out to be no | |||
545 | side-effects, then the optimizer should be able to get rid of | |||
546 | whatever code is generated anyhow. */ | |||
547 | TREE_SIDE_EFFECTS (t)((non_type_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 547, __FUNCTION__))->base.side_effects_flag) = 1; | |||
548 | ||||
549 | return t; | |||
550 | } | |||
551 | ||||
552 | /* Return an undeclared local temporary of type TYPE for use in building a | |||
553 | TARGET_EXPR. */ | |||
554 | ||||
555 | tree | |||
556 | build_local_temp (tree type) | |||
557 | { | |||
558 | tree slot = build_decl (input_location, | |||
559 | VAR_DECL, NULL_TREE(tree) nullptr, type); | |||
560 | DECL_ARTIFICIAL (slot)((contains_struct_check ((slot), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 560, __FUNCTION__))->decl_common.artificial_flag) = 1; | |||
561 | DECL_IGNORED_P (slot)((contains_struct_check ((slot), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 561, __FUNCTION__))->decl_common.ignored_flag) = 1; | |||
562 | DECL_CONTEXT (slot)((contains_struct_check ((slot), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 562, __FUNCTION__))->decl_minimal.context) = current_function_decl; | |||
563 | layout_decl (slot, 0); | |||
564 | return slot; | |||
565 | } | |||
566 | ||||
567 | /* Return whether DECL is such a local temporary (or one from | |||
568 | create_tmp_var_raw). */ | |||
569 | ||||
570 | bool | |||
571 | is_local_temp (tree decl) | |||
572 | { | |||
573 | return (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL) && DECL_ARTIFICIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 573, __FUNCTION__))->decl_common.artificial_flag) | |||
574 | && !TREE_STATIC (decl)((decl)->base.static_flag)); | |||
575 | } | |||
576 | ||||
577 | /* Set various status flags when building an AGGR_INIT_EXPR object T. */ | |||
578 | ||||
579 | static void | |||
580 | process_aggr_init_operands (tree t) | |||
581 | { | |||
582 | bool side_effects; | |||
583 | ||||
584 | side_effects = TREE_SIDE_EFFECTS (t)((non_type_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 584, __FUNCTION__))->base.side_effects_flag); | |||
585 | if (!side_effects) | |||
586 | { | |||
587 | int i, n; | |||
588 | n = TREE_OPERAND_LENGTH (t)tree_operand_length (t); | |||
589 | for (i = 1; i < n; i++) | |||
590 | { | |||
591 | tree op = TREE_OPERAND (t, i)(*((const_cast<tree*> (tree_operand_check ((t), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 591, __FUNCTION__))))); | |||
592 | if (op && TREE_SIDE_EFFECTS (op)((non_type_check ((op), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 592, __FUNCTION__))->base.side_effects_flag)) | |||
593 | { | |||
594 | side_effects = 1; | |||
595 | break; | |||
596 | } | |||
597 | } | |||
598 | } | |||
599 | TREE_SIDE_EFFECTS (t)((non_type_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 599, __FUNCTION__))->base.side_effects_flag) = side_effects; | |||
600 | } | |||
601 | ||||
602 | /* Build an AGGR_INIT_EXPR of class tcc_vl_exp with the indicated RETURN_TYPE, | |||
603 | FN, and SLOT. NARGS is the number of call arguments which are specified | |||
604 | as a tree array ARGS. */ | |||
605 | ||||
606 | static tree | |||
607 | build_aggr_init_array (tree return_type, tree fn, tree slot, int nargs, | |||
608 | tree *args) | |||
609 | { | |||
610 | tree t; | |||
611 | int i; | |||
612 | ||||
613 | t = build_vl_exp (AGGR_INIT_EXPR, nargs + 3); | |||
614 | TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 614, __FUNCTION__))->typed.type) = return_type; | |||
615 | AGGR_INIT_EXPR_FN (t)(*((const_cast<tree*> (tree_operand_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 615, __FUNCTION__, (AGGR_INIT_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 615, __FUNCTION__))))) = fn; | |||
616 | AGGR_INIT_EXPR_SLOT (t)(*((const_cast<tree*> (tree_operand_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 616, __FUNCTION__, (AGGR_INIT_EXPR)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 616, __FUNCTION__))))) = slot; | |||
617 | for (i = 0; i < nargs; i++) | |||
618 | AGGR_INIT_EXPR_ARG (t, i)(*((const_cast<tree*> (tree_operand_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 618, __FUNCTION__, (AGGR_INIT_EXPR)))), ((i) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 618, __FUNCTION__))))) = args[i]; | |||
619 | process_aggr_init_operands (t); | |||
620 | return t; | |||
621 | } | |||
622 | ||||
623 | /* INIT is a CALL_EXPR or AGGR_INIT_EXPR which needs info about its | |||
624 | target. TYPE is the type to be initialized. | |||
625 | ||||
626 | Build an AGGR_INIT_EXPR to represent the initialization. This function | |||
627 | differs from build_cplus_new in that an AGGR_INIT_EXPR can only be used | |||
628 | to initialize another object, whereas a TARGET_EXPR can either | |||
629 | initialize another object or create its own temporary object, and as a | |||
630 | result building up a TARGET_EXPR requires that the type's destructor be | |||
631 | callable. */ | |||
632 | ||||
633 | tree | |||
634 | build_aggr_init_expr (tree type, tree init) | |||
635 | { | |||
636 | tree fn; | |||
637 | tree slot; | |||
638 | tree rval; | |||
639 | int is_ctor; | |||
640 | ||||
641 | gcc_assert (!VOID_TYPE_P (type))((void)(!(!(((enum tree_code) (type)->base.code) == VOID_TYPE )) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 641, __FUNCTION__), 0 : 0)); | |||
642 | ||||
643 | /* Don't build AGGR_INIT_EXPR in a template. */ | |||
644 | if (processing_template_declscope_chain->x_processing_template_decl) | |||
645 | return init; | |||
646 | ||||
647 | fn = cp_get_callee (init); | |||
648 | if (fn == NULL_TREE(tree) nullptr) | |||
649 | return convert (type, init); | |||
650 | ||||
651 | is_ctor = (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == ADDR_EXPR | |||
652 | && TREE_CODE (TREE_OPERAND (fn, 0))((enum tree_code) ((*((const_cast<tree*> (tree_operand_check ((fn), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 652, __FUNCTION__))))))->base.code) == FUNCTION_DECL | |||
653 | && DECL_CONSTRUCTOR_P (TREE_OPERAND (fn, 0))((tree_check (((((enum tree_code) ((*((const_cast<tree*> (tree_operand_check ((fn), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 653, __FUNCTION__))))))->base.code) == TEMPLATE_DECL ? ( (struct tree_template_decl *)(const_cast<union tree_node * > ((((tree_check (((*((const_cast<tree*> (tree_operand_check ((fn), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 653, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 653, __FUNCTION__, (TEMPLATE_DECL))))))))->result : (*(( const_cast<tree*> (tree_operand_check ((fn), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 653, __FUNCTION__))))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 653, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor )); | |||
654 | ||||
655 | /* We split the CALL_EXPR into its function and its arguments here. | |||
656 | Then, in expand_expr, we put them back together. The reason for | |||
657 | this is that this expression might be a default argument | |||
658 | expression. In that case, we need a new temporary every time the | |||
659 | expression is used. That's what break_out_target_exprs does; it | |||
660 | replaces every AGGR_INIT_EXPR with a copy that uses a fresh | |||
661 | temporary slot. Then, expand_expr builds up a call-expression | |||
662 | using the new slot. */ | |||
663 | ||||
664 | /* If we don't need to use a constructor to create an object of this | |||
665 | type, don't mess with AGGR_INIT_EXPR. */ | |||
666 | if (is_ctor || TREE_ADDRESSABLE (type)((type)->base.addressable_flag)) | |||
667 | { | |||
668 | slot = build_local_temp (type); | |||
669 | ||||
670 | if (TREE_CODE (init)((enum tree_code) (init)->base.code) == CALL_EXPR) | |||
671 | { | |||
672 | rval = build_aggr_init_array (void_type_nodeglobal_trees[TI_VOID_TYPE], fn, slot, | |||
673 | call_expr_nargs (init)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check ((init), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 673, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 673, __FUNCTION__)))) - 3), | |||
674 | CALL_EXPR_ARGP (init)(&((*((const_cast<tree*> (tree_operand_check (((tree_check ((init), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 674, __FUNCTION__, (CALL_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 674, __FUNCTION__)))))) + 3)); | |||
675 | AGGR_INIT_FROM_THUNK_P (rval)((tree_check ((rval), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 675, __FUNCTION__, (AGGR_INIT_EXPR)))->base.protected_flag ) | |||
676 | = CALL_FROM_THUNK_P (init)((tree_check ((init), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 676, __FUNCTION__, (CALL_EXPR)))->base.protected_flag); | |||
677 | } | |||
678 | else | |||
679 | { | |||
680 | rval = build_aggr_init_array (void_type_nodeglobal_trees[TI_VOID_TYPE], fn, slot, | |||
681 | aggr_init_expr_nargs (init)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check ((init), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 681, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 681, __FUNCTION__)))) - 3), | |||
682 | AGGR_INIT_EXPR_ARGP (init)(&((*((const_cast<tree*> (tree_operand_check (((tree_check ((init), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 682, __FUNCTION__, (AGGR_INIT_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 682, __FUNCTION__)))))) + 3)); | |||
683 | AGGR_INIT_FROM_THUNK_P (rval)((tree_check ((rval), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 683, __FUNCTION__, (AGGR_INIT_EXPR)))->base.protected_flag ) | |||
684 | = AGGR_INIT_FROM_THUNK_P (init)((tree_check ((init), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 684, __FUNCTION__, (AGGR_INIT_EXPR)))->base.protected_flag ); | |||
685 | } | |||
686 | TREE_SIDE_EFFECTS (rval)((non_type_check ((rval), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 686, __FUNCTION__))->base.side_effects_flag) = 1; | |||
687 | AGGR_INIT_VIA_CTOR_P (rval)((tree_not_check2 (((tree_check ((rval), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 687, __FUNCTION__, (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 687, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0) = is_ctor; | |||
688 | TREE_NOTHROW (rval)((rval)->base.nothrow_flag) = TREE_NOTHROW (init)((init)->base.nothrow_flag); | |||
689 | CALL_EXPR_OPERATOR_SYNTAX (rval)((tree_not_check2 (((tree_check2 (((rval)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 689, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 689, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_6) = CALL_EXPR_OPERATOR_SYNTAX (init)((tree_not_check2 (((tree_check2 (((init)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 689, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 689, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_6); | |||
690 | CALL_EXPR_ORDERED_ARGS (rval)((tree_not_check2 (((tree_check2 (((rval)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 690, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 690, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3) = CALL_EXPR_ORDERED_ARGS (init)((tree_not_check2 (((tree_check2 (((init)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 690, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 690, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3); | |||
691 | CALL_EXPR_REVERSE_ARGS (rval)((tree_not_check2 (((tree_check2 (((rval)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 691, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 691, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5) = CALL_EXPR_REVERSE_ARGS (init)((tree_not_check2 (((tree_check2 (((init)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 691, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 691, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5); | |||
692 | } | |||
693 | else | |||
694 | rval = init; | |||
695 | ||||
696 | return rval; | |||
697 | } | |||
698 | ||||
699 | /* INIT is a CALL_EXPR or AGGR_INIT_EXPR which needs info about its | |||
700 | target. TYPE is the type that this initialization should appear to | |||
701 | have. | |||
702 | ||||
703 | Build an encapsulation of the initialization to perform | |||
704 | and return it so that it can be processed by language-independent | |||
705 | and language-specific expression expanders. */ | |||
706 | ||||
707 | tree | |||
708 | build_cplus_new (tree type, tree init, tsubst_flags_t complain) | |||
709 | { | |||
710 | /* This function should cope with what build_special_member_call | |||
711 | can produce. When performing parenthesized aggregate initialization, | |||
712 | it can produce a { }. */ | |||
713 | if (BRACE_ENCLOSED_INITIALIZER_P (init)(((enum tree_code) (init)->base.code) == CONSTRUCTOR && ((contains_struct_check ((init), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 713, __FUNCTION__))->typed.type) == cp_global_trees[CPTI_INIT_LIST_TYPE ])) | |||
714 | { | |||
715 | gcc_assert (cxx_dialect >= cxx20)((void)(!(cxx_dialect >= cxx20) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 715, __FUNCTION__), 0 : 0)); | |||
716 | return finish_compound_literal (type, init, complain); | |||
717 | } | |||
718 | ||||
719 | tree rval = build_aggr_init_expr (type, init); | |||
720 | tree slot; | |||
721 | ||||
722 | if (init == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
723 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
724 | ||||
725 | if (!complete_type_or_maybe_complain (type, init, complain)) | |||
726 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
727 | ||||
728 | /* Make sure that we're not trying to create an instance of an | |||
729 | abstract class. */ | |||
730 | if (abstract_virtuals_error (NULL_TREE(tree) nullptr, type, complain)) | |||
731 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
732 | ||||
733 | if (TREE_CODE (rval)((enum tree_code) (rval)->base.code) == AGGR_INIT_EXPR) | |||
734 | slot = AGGR_INIT_EXPR_SLOT (rval)(*((const_cast<tree*> (tree_operand_check (((tree_check ((rval), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 734, __FUNCTION__, (AGGR_INIT_EXPR)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 734, __FUNCTION__))))); | |||
735 | else if (TREE_CODE (rval)((enum tree_code) (rval)->base.code) == CALL_EXPR | |||
736 | || TREE_CODE (rval)((enum tree_code) (rval)->base.code) == CONSTRUCTOR) | |||
737 | slot = build_local_temp (type); | |||
738 | else | |||
739 | return rval; | |||
740 | ||||
741 | rval = build_target_expr (slot, rval, complain); | |||
742 | ||||
743 | if (rval != error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
744 | TARGET_EXPR_IMPLICIT_P (rval)((tree_not_check2 (((tree_check ((rval), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 744, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 744, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0) = 1; | |||
745 | ||||
746 | return rval; | |||
747 | } | |||
748 | ||||
749 | /* Subroutine of build_vec_init_expr: Build up a single element | |||
750 | intialization as a proxy for the full array initialization to get things | |||
751 | marked as used and any appropriate diagnostics. | |||
752 | ||||
753 | This used to be necessary because we were deferring building the actual | |||
754 | constructor calls until gimplification time; now we only do it to set | |||
755 | VEC_INIT_EXPR_IS_CONSTEXPR. | |||
756 | ||||
757 | We assume that init is either NULL_TREE, {}, void_type_node (indicating | |||
758 | value-initialization), or another array to copy. */ | |||
759 | ||||
760 | static tree | |||
761 | build_vec_init_elt (tree type, tree init, tsubst_flags_t complain) | |||
762 | { | |||
763 | tree inner_type = strip_array_types (type); | |||
764 | ||||
765 | if (integer_zerop (array_type_nelts_total (type)) | |||
766 | || !CLASS_TYPE_P (inner_type)(((((enum tree_code) (inner_type)->base.code)) == RECORD_TYPE || (((enum tree_code) (inner_type)->base.code)) == UNION_TYPE ) && ((tree_class_check ((inner_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 766, __FUNCTION__))->type_common.lang_flag_5))) | |||
767 | /* No interesting initialization to do. */ | |||
768 | return integer_zero_nodeglobal_trees[TI_INTEGER_ZERO]; | |||
769 | if (init && BRACE_ENCLOSED_INITIALIZER_P (init)(((enum tree_code) (init)->base.code) == CONSTRUCTOR && ((contains_struct_check ((init), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 769, __FUNCTION__))->typed.type) == cp_global_trees[CPTI_INIT_LIST_TYPE ])) | |||
770 | { | |||
771 | /* Even if init has initializers for some array elements, | |||
772 | we're interested in the {}-init of trailing elements. */ | |||
773 | if (CP_AGGREGATE_TYPE_P (inner_type)(gnu_vector_type_p (inner_type) || ((enum tree_code) (inner_type )->base.code) == ARRAY_TYPE || ((((((enum tree_code) (inner_type )->base.code)) == RECORD_TYPE || (((enum tree_code) (inner_type )->base.code)) == UNION_TYPE) && ((tree_class_check ((inner_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 773, __FUNCTION__))->type_common.lang_flag_5)) && (((tree_class_check ((inner_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 773, __FUNCTION__))->type_common.size) != (tree) nullptr ) && !((((tree_class_check ((inner_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 773, __FUNCTION__))->type_with_lang_specific.lang_specific ))->non_aggregate)))) | |||
774 | { | |||
775 | tree empty = build_constructor (init_list_type_nodecp_global_trees[CPTI_INIT_LIST_TYPE], nullptr); | |||
776 | return digest_init (inner_type, empty, complain); | |||
777 | } | |||
778 | else | |||
779 | /* It's equivalent to value-init. */ | |||
780 | init = void_type_nodeglobal_trees[TI_VOID_TYPE]; | |||
781 | } | |||
782 | if (init == void_type_nodeglobal_trees[TI_VOID_TYPE]) | |||
783 | return build_value_init (inner_type, complain); | |||
784 | ||||
785 | releasing_vec argvec; | |||
786 | if (init && !BRACE_ENCLOSED_INITIALIZER_P (init)(((enum tree_code) (init)->base.code) == CONSTRUCTOR && ((contains_struct_check ((init), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 786, __FUNCTION__))->typed.type) == cp_global_trees[CPTI_INIT_LIST_TYPE ])) | |||
787 | { | |||
788 | gcc_assert (same_type_ignoring_top_level_qualifiers_p((void)(!(same_type_ignoring_top_level_qualifiers_p (type, (( contains_struct_check ((init), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 789, __FUNCTION__))->typed.type))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 789, __FUNCTION__), 0 : 0)) | |||
789 | (type, TREE_TYPE (init)))((void)(!(same_type_ignoring_top_level_qualifiers_p (type, (( contains_struct_check ((init), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 789, __FUNCTION__))->typed.type))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 789, __FUNCTION__), 0 : 0)); | |||
790 | tree init_type = strip_array_types (TREE_TYPE (init)((contains_struct_check ((init), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 790, __FUNCTION__))->typed.type)); | |||
791 | tree dummy = build_dummy_object (init_type); | |||
792 | if (!lvalue_p (init)) | |||
793 | dummy = move (dummy); | |||
794 | argvec->quick_push (dummy); | |||
795 | } | |||
796 | init = build_special_member_call (NULL_TREE(tree) nullptr, complete_ctor_identifiercp_global_trees[CPTI_COMPLETE_CTOR_IDENTIFIER], | |||
797 | &argvec, inner_type, LOOKUP_NORMAL((1 << 0)), | |||
798 | complain); | |||
799 | ||||
800 | /* For a trivial constructor, build_over_call creates a TARGET_EXPR. But | |||
801 | we don't want one here because we aren't creating a temporary. */ | |||
802 | if (TREE_CODE (init)((enum tree_code) (init)->base.code) == TARGET_EXPR) | |||
803 | init = TARGET_EXPR_INITIAL (init)(*(tree_operand_check_code ((init), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 803, __FUNCTION__))); | |||
804 | ||||
805 | return init; | |||
806 | } | |||
807 | ||||
808 | /* Return a TARGET_EXPR which expresses the initialization of an array to | |||
809 | be named later, either default-initialization or copy-initialization | |||
810 | from another array of the same type. */ | |||
811 | ||||
812 | tree | |||
813 | build_vec_init_expr (tree type, tree init, tsubst_flags_t complain) | |||
814 | { | |||
815 | if (tree vi = get_vec_init_expr (init)) | |||
816 | return vi; | |||
817 | ||||
818 | tree elt_init; | |||
819 | if (init && TREE_CODE (init)((enum tree_code) (init)->base.code) == CONSTRUCTOR | |||
820 | && !BRACE_ENCLOSED_INITIALIZER_P (init)(((enum tree_code) (init)->base.code) == CONSTRUCTOR && ((contains_struct_check ((init), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 820, __FUNCTION__))->typed.type) == cp_global_trees[CPTI_INIT_LIST_TYPE ])) | |||
821 | /* We built any needed constructor calls in digest_init. */ | |||
822 | elt_init = init; | |||
823 | else | |||
824 | elt_init = build_vec_init_elt (type, init, complain); | |||
825 | ||||
826 | bool value_init = false; | |||
827 | if (init == void_type_nodeglobal_trees[TI_VOID_TYPE]) | |||
828 | { | |||
829 | value_init = true; | |||
830 | init = NULL_TREE(tree) nullptr; | |||
831 | } | |||
832 | ||||
833 | tree slot = build_local_temp (type); | |||
834 | init = build2 (VEC_INIT_EXPR, type, slot, init); | |||
835 | TREE_SIDE_EFFECTS (init)((non_type_check ((init), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 835, __FUNCTION__))->base.side_effects_flag) = true; | |||
836 | SET_EXPR_LOCATION (init, input_location)(expr_check (((init)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 836, __FUNCTION__))->exp.locus = (input_location); | |||
837 | ||||
838 | if (cxx_dialect >= cxx11) | |||
839 | { | |||
840 | bool cx = potential_constant_expression (elt_init); | |||
841 | if (BRACE_ENCLOSED_INITIALIZER_P (init)(((enum tree_code) (init)->base.code) == CONSTRUCTOR && ((contains_struct_check ((init), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 841, __FUNCTION__))->typed.type) == cp_global_trees[CPTI_INIT_LIST_TYPE ])) | |||
842 | cx &= potential_constant_expression (init); | |||
843 | VEC_INIT_EXPR_IS_CONSTEXPR (init)((tree_not_check2 (((tree_check ((init), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 843, __FUNCTION__, (VEC_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 843, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0) = cx; | |||
844 | } | |||
845 | VEC_INIT_EXPR_VALUE_INIT (init)((tree_not_check2 (((tree_check ((init), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 845, __FUNCTION__, (VEC_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 845, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_1) = value_init; | |||
846 | ||||
847 | return init; | |||
848 | } | |||
849 | ||||
850 | /* Call build_vec_init to expand VEC_INIT into TARGET (for which NULL_TREE | |||
851 | means VEC_INIT_EXPR_SLOT). */ | |||
852 | ||||
853 | tree | |||
854 | expand_vec_init_expr (tree target, tree vec_init, tsubst_flags_t complain, | |||
855 | vec<tree,va_gc> **flags) | |||
856 | { | |||
857 | iloc_sentinel ils = EXPR_LOCATION (vec_init)((((vec_init)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((vec_init))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((vec_init))->base.code))]) <= tcc_expression)) ? (vec_init)->exp.locus : ((location_t) 0 )); | |||
858 | ||||
859 | if (!target) | |||
860 | target = VEC_INIT_EXPR_SLOT (vec_init)(*((const_cast<tree*> (tree_operand_check (((tree_check ((vec_init), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 860, __FUNCTION__, (VEC_INIT_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 860, __FUNCTION__))))); | |||
861 | tree init = VEC_INIT_EXPR_INIT (vec_init)(*((const_cast<tree*> (tree_operand_check (((tree_check ((vec_init), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 861, __FUNCTION__, (VEC_INIT_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 861, __FUNCTION__))))); | |||
862 | int from_array = (init && TREE_CODE (TREE_TYPE (init))((enum tree_code) (((contains_struct_check ((init), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 862, __FUNCTION__))->typed.type))->base.code) == ARRAY_TYPE); | |||
863 | return build_vec_init (target, NULL_TREE(tree) nullptr, init, | |||
864 | VEC_INIT_EXPR_VALUE_INIT (vec_init)((tree_not_check2 (((tree_check ((vec_init), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 864, __FUNCTION__, (VEC_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 864, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_1), | |||
865 | from_array, complain, flags); | |||
866 | } | |||
867 | ||||
868 | /* Give a helpful diagnostic for a non-constexpr VEC_INIT_EXPR in a context | |||
869 | that requires a constant expression. */ | |||
870 | ||||
871 | void | |||
872 | diagnose_non_constexpr_vec_init (tree expr) | |||
873 | { | |||
874 | tree type = TREE_TYPE (VEC_INIT_EXPR_SLOT (expr))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check (((tree_check ((expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 874, __FUNCTION__, (VEC_INIT_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 874, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 874, __FUNCTION__))->typed.type); | |||
875 | tree init, elt_init; | |||
876 | if (VEC_INIT_EXPR_VALUE_INIT (expr)((tree_not_check2 (((tree_check ((expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 876, __FUNCTION__, (VEC_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 876, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_1)) | |||
877 | init = void_type_nodeglobal_trees[TI_VOID_TYPE]; | |||
878 | else | |||
879 | init = VEC_INIT_EXPR_INIT (expr)(*((const_cast<tree*> (tree_operand_check (((tree_check ((expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 879, __FUNCTION__, (VEC_INIT_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 879, __FUNCTION__))))); | |||
880 | ||||
881 | elt_init = build_vec_init_elt (type, init, tf_warning_or_error); | |||
882 | require_potential_constant_expression (elt_init); | |||
883 | } | |||
884 | ||||
885 | tree | |||
886 | build_array_copy (tree init) | |||
887 | { | |||
888 | return get_target_expr (build_vec_init_expr | |||
889 | (TREE_TYPE (init)((contains_struct_check ((init), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 889, __FUNCTION__))->typed.type), init, tf_warning_or_error)); | |||
890 | } | |||
891 | ||||
892 | /* Build a TARGET_EXPR using INIT to initialize a new temporary of the | |||
893 | indicated TYPE. */ | |||
894 | ||||
895 | tree | |||
896 | build_target_expr_with_type (tree init, tree type, tsubst_flags_t complain) | |||
897 | { | |||
898 | gcc_assert (!VOID_TYPE_P (type))((void)(!(!(((enum tree_code) (type)->base.code) == VOID_TYPE )) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 898, __FUNCTION__), 0 : 0)); | |||
899 | gcc_assert (!VOID_TYPE_P (TREE_TYPE (init)))((void)(!(!(((enum tree_code) (((contains_struct_check ((init ), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 899, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE )) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 899, __FUNCTION__), 0 : 0)); | |||
900 | ||||
901 | if (TREE_CODE (init)((enum tree_code) (init)->base.code) == TARGET_EXPR | |||
902 | || init == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
903 | return init; | |||
904 | else if (CLASS_TYPE_P (type)(((((enum tree_code) (type)->base.code)) == RECORD_TYPE || (((enum tree_code) (type)->base.code)) == UNION_TYPE) && ((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 904, __FUNCTION__))->type_common.lang_flag_5)) && type_has_nontrivial_copy_init (type) | |||
905 | && TREE_CODE (init)((enum tree_code) (init)->base.code) != COND_EXPR | |||
906 | && TREE_CODE (init)((enum tree_code) (init)->base.code) != CONSTRUCTOR | |||
907 | && TREE_CODE (init)((enum tree_code) (init)->base.code) != VA_ARG_EXPR | |||
908 | && TREE_CODE (init)((enum tree_code) (init)->base.code) != CALL_EXPR) | |||
909 | /* We need to build up a copy constructor call. COND_EXPR is a special | |||
910 | case because we already have copies on the arms and we don't want | |||
911 | another one here. A CONSTRUCTOR is aggregate initialization, which | |||
912 | is handled separately. A VA_ARG_EXPR is magic creation of an | |||
913 | aggregate; there's no additional work to be done. A CALL_EXPR | |||
914 | already creates a prvalue. */ | |||
915 | return force_rvalue (init, complain); | |||
916 | ||||
917 | return force_target_expr (type, init, complain); | |||
918 | } | |||
919 | ||||
920 | /* Like the above function, but without the checking. This function should | |||
921 | only be used by code which is deliberately trying to subvert the type | |||
922 | system, such as call_builtin_trap. Or build_over_call, to avoid | |||
923 | infinite recursion. */ | |||
924 | ||||
925 | tree | |||
926 | force_target_expr (tree type, tree init, tsubst_flags_t complain) | |||
927 | { | |||
928 | tree slot; | |||
929 | ||||
930 | gcc_assert (!VOID_TYPE_P (type))((void)(!(!(((enum tree_code) (type)->base.code) == VOID_TYPE )) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 930, __FUNCTION__), 0 : 0)); | |||
931 | ||||
932 | slot = build_local_temp (type); | |||
933 | return build_target_expr (slot, init, complain); | |||
934 | } | |||
935 | ||||
936 | /* Like build_target_expr_with_type, but use the type of INIT. */ | |||
937 | ||||
938 | tree | |||
939 | get_target_expr (tree init, tsubst_flags_t complain /* = tf_warning_or_error */) | |||
940 | { | |||
941 | if (TREE_CODE (init)((enum tree_code) (init)->base.code) == AGGR_INIT_EXPR) | |||
942 | return build_target_expr (AGGR_INIT_EXPR_SLOT (init)(*((const_cast<tree*> (tree_operand_check (((tree_check ((init), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 942, __FUNCTION__, (AGGR_INIT_EXPR)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 942, __FUNCTION__))))), init, complain); | |||
943 | else if (TREE_CODE (init)((enum tree_code) (init)->base.code) == VEC_INIT_EXPR) | |||
944 | return build_target_expr (VEC_INIT_EXPR_SLOT (init)(*((const_cast<tree*> (tree_operand_check (((tree_check ((init), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 944, __FUNCTION__, (VEC_INIT_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 944, __FUNCTION__))))), init, complain); | |||
945 | else | |||
946 | { | |||
947 | init = convert_bitfield_to_declared_type (init); | |||
948 | return build_target_expr_with_type (init, TREE_TYPE (init)((contains_struct_check ((init), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 948, __FUNCTION__))->typed.type), complain); | |||
949 | } | |||
950 | } | |||
951 | ||||
952 | /* If EXPR is a bitfield reference, convert it to the declared type of | |||
953 | the bitfield, and return the resulting expression. Otherwise, | |||
954 | return EXPR itself. */ | |||
955 | ||||
956 | tree | |||
957 | convert_bitfield_to_declared_type (tree expr) | |||
958 | { | |||
959 | tree bitfield_type; | |||
960 | ||||
961 | bitfield_type = is_bitfield_expr_with_lowered_type (expr); | |||
962 | if (bitfield_type) | |||
963 | expr = convert_to_integer_nofold (TYPE_MAIN_VARIANT (bitfield_type)((tree_class_check ((bitfield_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 963, __FUNCTION__))->type_common.main_variant), | |||
964 | expr); | |||
965 | return expr; | |||
966 | } | |||
967 | ||||
968 | /* EXPR is being used in an rvalue context. Return a version of EXPR | |||
969 | that is marked as an rvalue. */ | |||
970 | ||||
971 | tree | |||
972 | rvalue (tree expr) | |||
973 | { | |||
974 | tree type; | |||
975 | ||||
976 | if (error_operand_p (expr)) | |||
977 | return expr; | |||
978 | ||||
979 | expr = mark_rvalue_use (expr); | |||
980 | ||||
981 | /* [basic.lval] | |||
982 | ||||
983 | Non-class rvalues always have cv-unqualified types. */ | |||
984 | type = TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 984, __FUNCTION__))->typed.type); | |||
985 | if (!CLASS_TYPE_P (type)(((((enum tree_code) (type)->base.code)) == RECORD_TYPE || (((enum tree_code) (type)->base.code)) == UNION_TYPE) && ((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 985, __FUNCTION__))->type_common.lang_flag_5)) && cv_qualified_p (type)) | |||
986 | type = cv_unqualified (type); | |||
987 | ||||
988 | /* We need to do this for rvalue refs as well to get the right answer | |||
989 | from decltype; see c++/36628. */ | |||
990 | if (!processing_template_declscope_chain->x_processing_template_decl && glvalue_p (expr)) | |||
991 | { | |||
992 | /* But don't use this function for class lvalues; use move (to treat an | |||
993 | lvalue as an xvalue) or force_rvalue (to make a prvalue copy). */ | |||
994 | gcc_checking_assert (!CLASS_TYPE_P (type))((void)(!(!(((((enum tree_code) (type)->base.code)) == RECORD_TYPE || (((enum tree_code) (type)->base.code)) == UNION_TYPE) && ((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 994, __FUNCTION__))->type_common.lang_flag_5))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 994, __FUNCTION__), 0 : 0)); | |||
995 | expr = build1 (NON_LVALUE_EXPR, type, expr); | |||
996 | } | |||
997 | else if (type != TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 997, __FUNCTION__))->typed.type)) | |||
998 | expr = build_nop (type, expr); | |||
999 | ||||
1000 | return expr; | |||
1001 | } | |||
1002 | ||||
1003 | ||||
1004 | struct cplus_array_info | |||
1005 | { | |||
1006 | tree type; | |||
1007 | tree domain; | |||
1008 | }; | |||
1009 | ||||
1010 | struct cplus_array_hasher : ggc_ptr_hash<tree_node> | |||
1011 | { | |||
1012 | typedef cplus_array_info *compare_type; | |||
1013 | ||||
1014 | static hashval_t hash (tree t); | |||
1015 | static bool equal (tree, cplus_array_info *); | |||
1016 | }; | |||
1017 | ||||
1018 | /* Hash an ARRAY_TYPE. K is really of type `tree'. */ | |||
1019 | ||||
1020 | hashval_t | |||
1021 | cplus_array_hasher::hash (tree t) | |||
1022 | { | |||
1023 | hashval_t hash; | |||
1024 | ||||
1025 | hash = TYPE_UID (TREE_TYPE (t))((tree_class_check ((((contains_struct_check ((t), (TS_TYPED) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1025, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1025, __FUNCTION__))->type_common.uid); | |||
1026 | if (TYPE_DOMAIN (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1026, __FUNCTION__, (ARRAY_TYPE)))->type_non_common.values )) | |||
1027 | hash ^= TYPE_UID (TYPE_DOMAIN (t))((tree_class_check ((((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1027, __FUNCTION__, (ARRAY_TYPE)))->type_non_common.values )), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1027, __FUNCTION__))->type_common.uid); | |||
1028 | return hash; | |||
1029 | } | |||
1030 | ||||
1031 | /* Compare two ARRAY_TYPEs. K1 is really of type `tree', K2 is really | |||
1032 | of type `cplus_array_info*'. */ | |||
1033 | ||||
1034 | bool | |||
1035 | cplus_array_hasher::equal (tree t1, cplus_array_info *t2) | |||
1036 | { | |||
1037 | return (TREE_TYPE (t1)((contains_struct_check ((t1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1037, __FUNCTION__))->typed.type) == t2->type && TYPE_DOMAIN (t1)((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1037, __FUNCTION__, (ARRAY_TYPE)))->type_non_common.values ) == t2->domain); | |||
1038 | } | |||
1039 | ||||
1040 | /* Hash table containing dependent array types, which are unsuitable for | |||
1041 | the language-independent type hash table. */ | |||
1042 | static GTY (()) hash_table<cplus_array_hasher> *cplus_array_htab; | |||
1043 | ||||
1044 | /* Build an ARRAY_TYPE without laying it out. */ | |||
1045 | ||||
1046 | static tree | |||
1047 | build_min_array_type (tree elt_type, tree index_type) | |||
1048 | { | |||
1049 | tree t = cxx_make_type (ARRAY_TYPE); | |||
1050 | TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1050, __FUNCTION__))->typed.type) = elt_type; | |||
1051 | TYPE_DOMAIN (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1051, __FUNCTION__, (ARRAY_TYPE)))->type_non_common.values ) = index_type; | |||
1052 | return t; | |||
1053 | } | |||
1054 | ||||
1055 | /* Set TYPE_CANONICAL like build_array_type_1, but using | |||
1056 | build_cplus_array_type. */ | |||
1057 | ||||
1058 | static void | |||
1059 | set_array_type_canon (tree t, tree elt_type, tree index_type, bool dep) | |||
1060 | { | |||
1061 | /* Set the canonical type for this new node. */ | |||
1062 | if (TYPE_STRUCTURAL_EQUALITY_P (elt_type)(((tree_class_check ((elt_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1062, __FUNCTION__))->type_common.canonical) == (tree) nullptr ) | |||
1063 | || (index_type && TYPE_STRUCTURAL_EQUALITY_P (index_type)(((tree_class_check ((index_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1063, __FUNCTION__))->type_common.canonical) == (tree) nullptr ))) | |||
1064 | SET_TYPE_STRUCTURAL_EQUALITY (t)(((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1064, __FUNCTION__))->type_common.canonical) = (tree) nullptr ); | |||
1065 | else if (TYPE_CANONICAL (elt_type)((tree_class_check ((elt_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1065, __FUNCTION__))->type_common.canonical) != elt_type | |||
1066 | || (index_type && TYPE_CANONICAL (index_type)((tree_class_check ((index_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1066, __FUNCTION__))->type_common.canonical) != index_type)) | |||
1067 | TYPE_CANONICAL (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1067, __FUNCTION__))->type_common.canonical) | |||
1068 | = build_cplus_array_type (TYPE_CANONICAL (elt_type)((tree_class_check ((elt_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1068, __FUNCTION__))->type_common.canonical), | |||
1069 | index_type | |||
1070 | ? TYPE_CANONICAL (index_type)((tree_class_check ((index_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1070, __FUNCTION__))->type_common.canonical) : index_type, | |||
1071 | dep); | |||
1072 | else | |||
1073 | TYPE_CANONICAL (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1073, __FUNCTION__))->type_common.canonical) = t; | |||
1074 | } | |||
1075 | ||||
1076 | /* Like build_array_type, but handle special C++ semantics: an array of a | |||
1077 | variant element type is a variant of the array of the main variant of | |||
1078 | the element type. IS_DEPENDENT is -ve if we should determine the | |||
1079 | dependency. Otherwise its bool value indicates dependency. */ | |||
1080 | ||||
1081 | tree | |||
1082 | build_cplus_array_type (tree elt_type, tree index_type, int dependent) | |||
1083 | { | |||
1084 | tree t; | |||
1085 | ||||
1086 | if (elt_type == error_mark_nodeglobal_trees[TI_ERROR_MARK] || index_type == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
1087 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
1088 | ||||
1089 | if (dependent < 0) | |||
1090 | dependent = (uses_template_parms (elt_type) | |||
1091 | || (index_type && uses_template_parms (index_type))); | |||
1092 | ||||
1093 | if (elt_type != TYPE_MAIN_VARIANT (elt_type)((tree_class_check ((elt_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1093, __FUNCTION__))->type_common.main_variant)) | |||
1094 | /* Start with an array of the TYPE_MAIN_VARIANT. */ | |||
1095 | t = build_cplus_array_type (TYPE_MAIN_VARIANT (elt_type)((tree_class_check ((elt_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1095, __FUNCTION__))->type_common.main_variant), | |||
1096 | index_type, dependent); | |||
1097 | else if (dependent) | |||
1098 | { | |||
1099 | /* Since type_hash_canon calls layout_type, we need to use our own | |||
1100 | hash table. */ | |||
1101 | cplus_array_info cai; | |||
1102 | hashval_t hash; | |||
1103 | ||||
1104 | if (cplus_array_htab == NULLnullptr) | |||
1105 | cplus_array_htab = hash_table<cplus_array_hasher>::create_ggc (61); | |||
1106 | ||||
1107 | hash = TYPE_UID (elt_type)((tree_class_check ((elt_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1107, __FUNCTION__))->type_common.uid); | |||
1108 | if (index_type) | |||
1109 | hash ^= TYPE_UID (index_type)((tree_class_check ((index_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1109, __FUNCTION__))->type_common.uid); | |||
1110 | cai.type = elt_type; | |||
1111 | cai.domain = index_type; | |||
1112 | ||||
1113 | tree *e = cplus_array_htab->find_slot_with_hash (&cai, hash, INSERT); | |||
1114 | if (*e) | |||
1115 | /* We have found the type: we're done. */ | |||
1116 | return (tree) *e; | |||
1117 | else | |||
1118 | { | |||
1119 | /* Build a new array type. */ | |||
1120 | t = build_min_array_type (elt_type, index_type); | |||
1121 | ||||
1122 | /* Store it in the hash table. */ | |||
1123 | *e = t; | |||
1124 | ||||
1125 | /* Set the canonical type for this new node. */ | |||
1126 | set_array_type_canon (t, elt_type, index_type, dependent); | |||
1127 | ||||
1128 | /* Mark it as dependent now, this saves time later. */ | |||
1129 | TYPE_DEPENDENT_P_VALID (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1129, __FUNCTION__))->type_common.lang_flag_6) = true; | |||
1130 | TYPE_DEPENDENT_P (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1130, __FUNCTION__))->type_common.lang_flag_0) = true; | |||
1131 | } | |||
1132 | } | |||
1133 | else | |||
1134 | { | |||
1135 | bool typeless_storage = is_byte_access_type (elt_type); | |||
1136 | t = build_array_type (elt_type, index_type, typeless_storage); | |||
1137 | ||||
1138 | /* Mark as non-dependenty now, this will save time later. */ | |||
1139 | TYPE_DEPENDENT_P_VALID (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1139, __FUNCTION__))->type_common.lang_flag_6) = true; | |||
1140 | } | |||
1141 | ||||
1142 | /* Now check whether we already have this array variant. */ | |||
1143 | if (elt_type != TYPE_MAIN_VARIANT (elt_type)((tree_class_check ((elt_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1143, __FUNCTION__))->type_common.main_variant)) | |||
1144 | { | |||
1145 | tree m = t; | |||
1146 | for (t = m; t; t = TYPE_NEXT_VARIANT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1146, __FUNCTION__))->type_common.next_variant)) | |||
1147 | if (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1147, __FUNCTION__))->typed.type) == elt_type | |||
1148 | && TYPE_NAME (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1148, __FUNCTION__))->type_common.name) == NULL_TREE(tree) nullptr | |||
1149 | && TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1149, __FUNCTION__))->type_common.attributes) == NULL_TREE(tree) nullptr) | |||
1150 | break; | |||
1151 | if (!t) | |||
1152 | { | |||
1153 | t = build_min_array_type (elt_type, index_type); | |||
1154 | /* Mark dependency now, this saves time later. */ | |||
1155 | TYPE_DEPENDENT_P_VALID (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1155, __FUNCTION__))->type_common.lang_flag_6) = true; | |||
1156 | TYPE_DEPENDENT_P (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1156, __FUNCTION__))->type_common.lang_flag_0) = dependent; | |||
1157 | set_array_type_canon (t, elt_type, index_type, dependent); | |||
1158 | if (!dependent) | |||
1159 | { | |||
1160 | layout_type (t); | |||
1161 | /* Make sure sizes are shared with the main variant. | |||
1162 | layout_type can't be called after setting TYPE_NEXT_VARIANT, | |||
1163 | as it will overwrite alignment etc. of all variants. */ | |||
1164 | TYPE_SIZE (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1164, __FUNCTION__))->type_common.size) = TYPE_SIZE (m)((tree_class_check ((m), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1164, __FUNCTION__))->type_common.size); | |||
1165 | TYPE_SIZE_UNIT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1165, __FUNCTION__))->type_common.size_unit) = TYPE_SIZE_UNIT (m)((tree_class_check ((m), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1165, __FUNCTION__))->type_common.size_unit); | |||
1166 | TYPE_TYPELESS_STORAGE (t)((tree_check4 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1166, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE ), (ARRAY_TYPE)))->type_common.typeless_storage) = TYPE_TYPELESS_STORAGE (m)((tree_check4 ((m), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1166, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE ), (ARRAY_TYPE)))->type_common.typeless_storage); | |||
1167 | } | |||
1168 | ||||
1169 | TYPE_MAIN_VARIANT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1169, __FUNCTION__))->type_common.main_variant) = m; | |||
1170 | TYPE_NEXT_VARIANT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1170, __FUNCTION__))->type_common.next_variant) = TYPE_NEXT_VARIANT (m)((tree_class_check ((m), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1170, __FUNCTION__))->type_common.next_variant); | |||
1171 | TYPE_NEXT_VARIANT (m)((tree_class_check ((m), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1171, __FUNCTION__))->type_common.next_variant) = t; | |||
1172 | } | |||
1173 | } | |||
1174 | ||||
1175 | /* Avoid spurious warnings with VLAs (c++/54583). */ | |||
1176 | if (TYPE_SIZE (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1176, __FUNCTION__))->type_common.size) && EXPR_P (TYPE_SIZE (t))((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1176, __FUNCTION__))->type_common.size))->base.code)) ]) >= tcc_reference && (tree_code_type_tmpl <0> ::tree_code_type[(int) (((enum tree_code) (((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1176, __FUNCTION__))->type_common.size))->base.code)) ]) <= tcc_expression)) | |||
1177 | suppress_warning (TYPE_SIZE (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1177, __FUNCTION__))->type_common.size), OPT_Wunused); | |||
1178 | ||||
1179 | /* Push these needs up to the ARRAY_TYPE so that initialization takes | |||
1180 | place more easily. */ | |||
1181 | bool needs_ctor = (TYPE_NEEDS_CONSTRUCTING (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1181, __FUNCTION__))->type_common.needs_constructing_flag ) | |||
1182 | = TYPE_NEEDS_CONSTRUCTING (elt_type)((tree_class_check ((elt_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1182, __FUNCTION__))->type_common.needs_constructing_flag )); | |||
1183 | bool needs_dtor = (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)(((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1183, __FUNCTION__))->type_common.lang_flag_4)) | |||
1184 | = TYPE_HAS_NONTRIVIAL_DESTRUCTOR (elt_type)(((tree_class_check ((elt_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1184, __FUNCTION__))->type_common.lang_flag_4))); | |||
1185 | ||||
1186 | if (!dependent && t == TYPE_MAIN_VARIANT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1186, __FUNCTION__))->type_common.main_variant) | |||
1187 | && !COMPLETE_TYPE_P (t)(((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1187, __FUNCTION__))->type_common.size) != (tree) nullptr ) && COMPLETE_TYPE_P (elt_type)(((tree_class_check ((elt_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1187, __FUNCTION__))->type_common.size) != (tree) nullptr )) | |||
1188 | { | |||
1189 | /* The element type has been completed since the last time we saw | |||
1190 | this array type; update the layout and 'tor flags for any variants | |||
1191 | that need it. */ | |||
1192 | layout_type (t); | |||
1193 | for (tree v = TYPE_NEXT_VARIANT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1193, __FUNCTION__))->type_common.next_variant); v; v = TYPE_NEXT_VARIANT (v)((tree_class_check ((v), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1193, __FUNCTION__))->type_common.next_variant)) | |||
1194 | { | |||
1195 | TYPE_NEEDS_CONSTRUCTING (v)((tree_class_check ((v), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1195, __FUNCTION__))->type_common.needs_constructing_flag ) = needs_ctor; | |||
1196 | TYPE_HAS_NONTRIVIAL_DESTRUCTOR (v)(((tree_class_check ((v), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1196, __FUNCTION__))->type_common.lang_flag_4)) = needs_dtor; | |||
1197 | } | |||
1198 | } | |||
1199 | ||||
1200 | return t; | |||
1201 | } | |||
1202 | ||||
1203 | /* Return an ARRAY_TYPE with element type ELT and length N. */ | |||
1204 | ||||
1205 | tree | |||
1206 | build_array_of_n_type (tree elt, int n) | |||
1207 | { | |||
1208 | return build_cplus_array_type (elt, build_index_type (size_int (n - 1)size_int_kind (n - 1, stk_sizetype))); | |||
1209 | } | |||
1210 | ||||
1211 | /* True iff T is an array of unknown bound. */ | |||
1212 | ||||
1213 | bool | |||
1214 | array_of_unknown_bound_p (const_tree t) | |||
1215 | { | |||
1216 | return (TREE_CODE (t)((enum tree_code) (t)->base.code) == ARRAY_TYPE | |||
1217 | && !TYPE_DOMAIN (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1217, __FUNCTION__, (ARRAY_TYPE)))->type_non_common.values )); | |||
1218 | } | |||
1219 | ||||
1220 | /* True iff T is an N3639 array of runtime bound (VLA). These were approved | |||
1221 | for C++14 but then removed. This should only be used for N3639 | |||
1222 | specifically; code wondering more generally if something is a VLA should use | |||
1223 | vla_type_p. */ | |||
1224 | ||||
1225 | bool | |||
1226 | array_of_runtime_bound_p (tree t) | |||
1227 | { | |||
1228 | if (!t || TREE_CODE (t)((enum tree_code) (t)->base.code) != ARRAY_TYPE) | |||
1229 | return false; | |||
1230 | if (variably_modified_type_p (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1230, __FUNCTION__))->typed.type), NULL_TREE(tree) nullptr)) | |||
1231 | return false; | |||
1232 | tree dom = TYPE_DOMAIN (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1232, __FUNCTION__, (ARRAY_TYPE)))->type_non_common.values ); | |||
1233 | if (!dom) | |||
1234 | return false; | |||
1235 | tree max = TYPE_MAX_VALUE (dom)((tree_check5 ((dom), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1235, __FUNCTION__, (INTEGER_TYPE), (ENUMERAL_TYPE), (BOOLEAN_TYPE ), (REAL_TYPE), (FIXED_POINT_TYPE)))->type_non_common.maxval ); | |||
1236 | return (!potential_rvalue_constant_expression (max) | |||
1237 | || (!value_dependent_expression_p (max) && !TREE_CONSTANT (max)((non_type_check ((max), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1237, __FUNCTION__))->base.constant_flag))); | |||
1238 | } | |||
1239 | ||||
1240 | /* True iff T is a variable length array. */ | |||
1241 | ||||
1242 | bool | |||
1243 | vla_type_p (tree t) | |||
1244 | { | |||
1245 | for (; t && TREE_CODE (t)((enum tree_code) (t)->base.code) == ARRAY_TYPE; | |||
1246 | t = TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1246, __FUNCTION__))->typed.type)) | |||
1247 | if (tree dom = TYPE_DOMAIN (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1247, __FUNCTION__, (ARRAY_TYPE)))->type_non_common.values )) | |||
1248 | { | |||
1249 | tree max = TYPE_MAX_VALUE (dom)((tree_check5 ((dom), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1249, __FUNCTION__, (INTEGER_TYPE), (ENUMERAL_TYPE), (BOOLEAN_TYPE ), (REAL_TYPE), (FIXED_POINT_TYPE)))->type_non_common.maxval ); | |||
1250 | if (!potential_rvalue_constant_expression (max) | |||
1251 | || (!value_dependent_expression_p (max) && !TREE_CONSTANT (max)((non_type_check ((max), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1251, __FUNCTION__))->base.constant_flag))) | |||
1252 | return true; | |||
1253 | } | |||
1254 | return false; | |||
1255 | } | |||
1256 | ||||
1257 | ||||
1258 | /* Return a reference type node of MODE referring to TO_TYPE. If MODE | |||
1259 | is VOIDmode the standard pointer mode will be picked. If RVAL is | |||
1260 | true, return an rvalue reference type, otherwise return an lvalue | |||
1261 | reference type. If a type node exists, reuse it, otherwise create | |||
1262 | a new one. */ | |||
1263 | tree | |||
1264 | cp_build_reference_type_for_mode (tree to_type, machine_mode mode, bool rval) | |||
1265 | { | |||
1266 | tree lvalue_ref, t; | |||
1267 | ||||
1268 | if (to_type == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
1269 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
1270 | ||||
1271 | if (TYPE_REF_P (to_type)(((enum tree_code) (to_type)->base.code) == REFERENCE_TYPE )) | |||
1272 | { | |||
1273 | rval = rval && TYPE_REF_IS_RVALUE (to_type)((tree_check ((to_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1273, __FUNCTION__, (REFERENCE_TYPE)))->base.private_flag ); | |||
1274 | to_type = TREE_TYPE (to_type)((contains_struct_check ((to_type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1274, __FUNCTION__))->typed.type); | |||
1275 | } | |||
1276 | ||||
1277 | lvalue_ref = build_reference_type_for_mode (to_type, mode, false); | |||
1278 | ||||
1279 | if (!rval) | |||
1280 | return lvalue_ref; | |||
1281 | ||||
1282 | /* This code to create rvalue reference types is based on and tied | |||
1283 | to the code creating lvalue reference types in the middle-end | |||
1284 | functions build_reference_type_for_mode and build_reference_type. | |||
1285 | ||||
1286 | It works by putting the rvalue reference type nodes after the | |||
1287 | lvalue reference nodes in the TYPE_NEXT_REF_TO linked list, so | |||
1288 | they will effectively be ignored by the middle end. */ | |||
1289 | ||||
1290 | for (t = lvalue_ref; (t = TYPE_NEXT_REF_TO (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1290, __FUNCTION__, (REFERENCE_TYPE)))->type_non_common. minval)); ) | |||
1291 | if (TYPE_REF_IS_RVALUE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1291, __FUNCTION__, (REFERENCE_TYPE)))->base.private_flag )) | |||
1292 | return t; | |||
1293 | ||||
1294 | t = build_distinct_type_copy (lvalue_ref); | |||
1295 | ||||
1296 | TYPE_REF_IS_RVALUE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1296, __FUNCTION__, (REFERENCE_TYPE)))->base.private_flag ) = true; | |||
1297 | TYPE_NEXT_REF_TO (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1297, __FUNCTION__, (REFERENCE_TYPE)))->type_non_common. minval) = TYPE_NEXT_REF_TO (lvalue_ref)((tree_check ((lvalue_ref), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1297, __FUNCTION__, (REFERENCE_TYPE)))->type_non_common. minval); | |||
1298 | TYPE_NEXT_REF_TO (lvalue_ref)((tree_check ((lvalue_ref), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1298, __FUNCTION__, (REFERENCE_TYPE)))->type_non_common. minval) = t; | |||
1299 | ||||
1300 | if (TYPE_STRUCTURAL_EQUALITY_P (to_type)(((tree_class_check ((to_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1300, __FUNCTION__))->type_common.canonical) == (tree) nullptr )) | |||
1301 | SET_TYPE_STRUCTURAL_EQUALITY (t)(((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1301, __FUNCTION__))->type_common.canonical) = (tree) nullptr ); | |||
1302 | else if (TYPE_CANONICAL (to_type)((tree_class_check ((to_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1302, __FUNCTION__))->type_common.canonical) != to_type) | |||
1303 | TYPE_CANONICAL (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1303, __FUNCTION__))->type_common.canonical) | |||
1304 | = cp_build_reference_type_for_mode (TYPE_CANONICAL (to_type)((tree_class_check ((to_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1304, __FUNCTION__))->type_common.canonical), mode, rval); | |||
1305 | else | |||
1306 | TYPE_CANONICAL (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1306, __FUNCTION__))->type_common.canonical) = t; | |||
1307 | ||||
1308 | layout_type (t); | |||
1309 | ||||
1310 | return t; | |||
1311 | ||||
1312 | } | |||
1313 | ||||
1314 | /* Return a reference type node referring to TO_TYPE. If RVAL is | |||
1315 | true, return an rvalue reference type, otherwise return an lvalue | |||
1316 | reference type. If a type node exists, reuse it, otherwise create | |||
1317 | a new one. */ | |||
1318 | tree | |||
1319 | cp_build_reference_type (tree to_type, bool rval) | |||
1320 | { | |||
1321 | return cp_build_reference_type_for_mode (to_type, VOIDmode((void) 0, E_VOIDmode), rval); | |||
1322 | } | |||
1323 | ||||
1324 | /* Returns EXPR cast to rvalue reference type, like std::move. */ | |||
1325 | ||||
1326 | tree | |||
1327 | move (tree expr) | |||
1328 | { | |||
1329 | tree type = TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1329, __FUNCTION__))->typed.type); | |||
1330 | gcc_assert (!TYPE_REF_P (type))((void)(!(!(((enum tree_code) (type)->base.code) == REFERENCE_TYPE )) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1330, __FUNCTION__), 0 : 0)); | |||
1331 | if (xvalue_p (expr)) | |||
1332 | return expr; | |||
1333 | type = cp_build_reference_type (type, /*rval*/true); | |||
1334 | return build_static_cast (input_location, type, expr, | |||
1335 | tf_warning_or_error); | |||
1336 | } | |||
1337 | ||||
1338 | /* Used by the C++ front end to build qualified array types. However, | |||
1339 | the C version of this function does not properly maintain canonical | |||
1340 | types (which are not used in C). */ | |||
1341 | tree | |||
1342 | c_build_qualified_type (tree type, int type_quals, tree /* orig_qual_type */, | |||
1343 | size_t /* orig_qual_indirect */) | |||
1344 | { | |||
1345 | return cp_build_qualified_type (type, type_quals); | |||
1346 | } | |||
1347 | ||||
1348 | ||||
1349 | /* Make a variant of TYPE, qualified with the TYPE_QUALS. Handles | |||
1350 | arrays correctly. In particular, if TYPE is an array of T's, and | |||
1351 | TYPE_QUALS is non-empty, returns an array of qualified T's. | |||
1352 | ||||
1353 | FLAGS determines how to deal with ill-formed qualifications. If | |||
1354 | tf_ignore_bad_quals is set, then bad qualifications are dropped | |||
1355 | (this is permitted if TYPE was introduced via a typedef or template | |||
1356 | type parameter). If bad qualifications are dropped and tf_warning | |||
1357 | is set, then a warning is issued for non-const qualifications. If | |||
1358 | tf_ignore_bad_quals is not set and tf_error is not set, we | |||
1359 | return error_mark_node. Otherwise, we issue an error, and ignore | |||
1360 | the qualifications. | |||
1361 | ||||
1362 | Qualification of a reference type is valid when the reference came | |||
1363 | via a typedef or template type argument. [dcl.ref] No such | |||
1364 | dispensation is provided for qualifying a function type. [dcl.fct] | |||
1365 | DR 295 queries this and the proposed resolution brings it into line | |||
1366 | with qualifying a reference. We implement the DR. We also behave | |||
1367 | in a similar manner for restricting non-pointer types. */ | |||
1368 | ||||
1369 | tree | |||
1370 | cp_build_qualified_type (tree type, int type_quals, | |||
1371 | tsubst_flags_t complain /* = tf_warning_or_error */) | |||
1372 | { | |||
1373 | tree result; | |||
1374 | int bad_quals = TYPE_UNQUALIFIED; | |||
1375 | ||||
1376 | if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
1377 | return type; | |||
1378 | ||||
1379 | if (type_quals == cp_type_quals (type)) | |||
1380 | return type; | |||
1381 | ||||
1382 | if (TREE_CODE (type)((enum tree_code) (type)->base.code) == ARRAY_TYPE) | |||
1383 | { | |||
1384 | /* In C++, the qualification really applies to the array element | |||
1385 | type. Obtain the appropriately qualified element type. */ | |||
1386 | tree t; | |||
1387 | tree element_type | |||
1388 | = cp_build_qualified_type (TREE_TYPE (type)((contains_struct_check ((type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1388, __FUNCTION__))->typed.type), type_quals, complain); | |||
1389 | ||||
1390 | if (element_type == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
1391 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
1392 | ||||
1393 | /* See if we already have an identically qualified type. Tests | |||
1394 | should be equivalent to those in check_qualified_type. */ | |||
1395 | for (t = TYPE_MAIN_VARIANT (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1395, __FUNCTION__))->type_common.main_variant); t; t = TYPE_NEXT_VARIANT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1395, __FUNCTION__))->type_common.next_variant)) | |||
1396 | if (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1396, __FUNCTION__))->typed.type) == element_type | |||
1397 | && TYPE_NAME (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1397, __FUNCTION__))->type_common.name) == TYPE_NAME (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1397, __FUNCTION__))->type_common.name) | |||
1398 | && TYPE_CONTEXT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1398, __FUNCTION__))->type_common.context) == TYPE_CONTEXT (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1398, __FUNCTION__))->type_common.context) | |||
1399 | && attribute_list_equal (TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1399, __FUNCTION__))->type_common.attributes), | |||
1400 | TYPE_ATTRIBUTES (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1400, __FUNCTION__))->type_common.attributes))) | |||
1401 | break; | |||
1402 | ||||
1403 | if (!t) | |||
1404 | { | |||
1405 | /* If we already know the dependentness, tell the array type | |||
1406 | constructor. This is important for module streaming, as we cannot | |||
1407 | dynamically determine that on read in. */ | |||
1408 | t = build_cplus_array_type (element_type, TYPE_DOMAIN (type)((tree_check ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1408, __FUNCTION__, (ARRAY_TYPE)))->type_non_common.values ), | |||
1409 | TYPE_DEPENDENT_P_VALID (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1409, __FUNCTION__))->type_common.lang_flag_6) | |||
1410 | ? int (TYPE_DEPENDENT_P (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1410, __FUNCTION__))->type_common.lang_flag_0)) : -1); | |||
1411 | ||||
1412 | /* Keep the typedef name. */ | |||
1413 | if (TYPE_NAME (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1413, __FUNCTION__))->type_common.name) != TYPE_NAME (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1413, __FUNCTION__))->type_common.name)) | |||
1414 | { | |||
1415 | t = build_variant_type_copy (t); | |||
1416 | TYPE_NAME (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1416, __FUNCTION__))->type_common.name) = TYPE_NAME (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1416, __FUNCTION__))->type_common.name); | |||
1417 | SET_TYPE_ALIGN (t, TYPE_ALIGN (type))((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1417, __FUNCTION__))->type_common.align = ffs_hwi ((((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1417, __FUNCTION__))->type_common.align) ? ((unsigned)1) << (((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1417, __FUNCTION__))->type_common.align) - 1) : 0))); | |||
1418 | TYPE_USER_ALIGN (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1418, __FUNCTION__))->base.u.bits.user_align) = TYPE_USER_ALIGN (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1418, __FUNCTION__))->base.u.bits.user_align); | |||
1419 | } | |||
1420 | } | |||
1421 | ||||
1422 | /* Even if we already had this variant, we update | |||
1423 | TYPE_NEEDS_CONSTRUCTING and TYPE_HAS_NONTRIVIAL_DESTRUCTOR in case | |||
1424 | they changed since the variant was originally created. | |||
1425 | ||||
1426 | This seems hokey; if there is some way to use a previous | |||
1427 | variant *without* coming through here, | |||
1428 | TYPE_NEEDS_CONSTRUCTING will never be updated. */ | |||
1429 | TYPE_NEEDS_CONSTRUCTING (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1429, __FUNCTION__))->type_common.needs_constructing_flag ) | |||
1430 | = TYPE_NEEDS_CONSTRUCTING (TYPE_MAIN_VARIANT (element_type))((tree_class_check ((((tree_class_check ((element_type), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1430, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1430, __FUNCTION__))->type_common.needs_constructing_flag ); | |||
1431 | TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)(((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1431, __FUNCTION__))->type_common.lang_flag_4)) | |||
1432 | = TYPE_HAS_NONTRIVIAL_DESTRUCTOR (TYPE_MAIN_VARIANT (element_type))(((tree_class_check ((((tree_class_check ((element_type), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1432, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1432, __FUNCTION__))->type_common.lang_flag_4)); | |||
1433 | return t; | |||
1434 | } | |||
1435 | else if (TREE_CODE (type)((enum tree_code) (type)->base.code) == TYPE_PACK_EXPANSION) | |||
1436 | { | |||
1437 | tree t = PACK_EXPANSION_PATTERN (type)(((enum tree_code) ((tree_check2 ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1437, __FUNCTION__, (TYPE_PACK_EXPANSION), (EXPR_PACK_EXPANSION ))))->base.code) == TYPE_PACK_EXPANSION ? ((contains_struct_check ((type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1437, __FUNCTION__))->typed.type) : (*((const_cast<tree *> (tree_operand_check ((type), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1437, __FUNCTION__)))))); | |||
1438 | ||||
1439 | t = cp_build_qualified_type (t, type_quals, complain); | |||
1440 | return make_pack_expansion (t, complain); | |||
1441 | } | |||
1442 | ||||
1443 | /* A reference or method type shall not be cv-qualified. | |||
1444 | [dcl.ref], [dcl.fct]. This used to be an error, but as of DR 295 | |||
1445 | (in CD1) we always ignore extra cv-quals on functions. */ | |||
1446 | ||||
1447 | /* [dcl.ref/1] Cv-qualified references are ill-formed except when | |||
1448 | the cv-qualifiers are introduced through the use of a typedef-name | |||
1449 | ([dcl.typedef], [temp.param]) or decltype-specifier | |||
1450 | ([dcl.type.decltype]),in which case the cv-qualifiers are | |||
1451 | ignored. */ | |||
1452 | if (type_quals & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE) | |||
1453 | && (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE) | |||
1454 | || FUNC_OR_METHOD_TYPE_P (type)(((enum tree_code) (type)->base.code) == FUNCTION_TYPE || ( (enum tree_code) (type)->base.code) == METHOD_TYPE))) | |||
1455 | { | |||
1456 | if (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE) | |||
1457 | && (!typedef_variant_p (type) || FUNC_OR_METHOD_TYPE_P (type)(((enum tree_code) (type)->base.code) == FUNCTION_TYPE || ( (enum tree_code) (type)->base.code) == METHOD_TYPE))) | |||
1458 | bad_quals |= type_quals & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE); | |||
1459 | type_quals &= ~(TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE); | |||
1460 | } | |||
1461 | ||||
1462 | /* But preserve any function-cv-quals on a FUNCTION_TYPE. */ | |||
1463 | if (TREE_CODE (type)((enum tree_code) (type)->base.code) == FUNCTION_TYPE) | |||
1464 | type_quals |= type_memfn_quals (type); | |||
1465 | ||||
1466 | /* A restrict-qualified type must be a pointer (or reference) | |||
1467 | to object or incomplete type. */ | |||
1468 | if ((type_quals & TYPE_QUAL_RESTRICT) | |||
1469 | && TREE_CODE (type)((enum tree_code) (type)->base.code) != TEMPLATE_TYPE_PARM | |||
1470 | && TREE_CODE (type)((enum tree_code) (type)->base.code) != TYPENAME_TYPE | |||
1471 | && !INDIRECT_TYPE_P (type)((((enum tree_code) (type)->base.code) == POINTER_TYPE) || (((enum tree_code) (type)->base.code) == REFERENCE_TYPE))) | |||
1472 | { | |||
1473 | bad_quals |= TYPE_QUAL_RESTRICT; | |||
1474 | type_quals &= ~TYPE_QUAL_RESTRICT; | |||
1475 | } | |||
1476 | ||||
1477 | if (bad_quals == TYPE_UNQUALIFIED | |||
1478 | || (complain & tf_ignore_bad_quals)) | |||
1479 | /*OK*/; | |||
1480 | else if (!(complain & tf_error)) | |||
1481 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
1482 | else | |||
1483 | { | |||
1484 | tree bad_type = build_qualified_type (ptr_type_nodeglobal_trees[TI_PTR_TYPE], bad_quals); | |||
1485 | error ("%qV qualifiers cannot be applied to %qT", | |||
1486 | bad_type, type); | |||
1487 | } | |||
1488 | ||||
1489 | /* Retrieve (or create) the appropriately qualified variant. */ | |||
1490 | result = build_qualified_type (type, type_quals); | |||
1491 | ||||
1492 | return result; | |||
1493 | } | |||
1494 | ||||
1495 | /* Return TYPE with const and volatile removed. */ | |||
1496 | ||||
1497 | tree | |||
1498 | cv_unqualified (tree type) | |||
1499 | { | |||
1500 | int quals; | |||
1501 | ||||
1502 | if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
1503 | return type; | |||
1504 | ||||
1505 | quals = cp_type_quals (type); | |||
1506 | quals &= ~(TYPE_QUAL_CONST|TYPE_QUAL_VOLATILE); | |||
1507 | return cp_build_qualified_type (type, quals); | |||
1508 | } | |||
1509 | ||||
1510 | /* Subroutine of strip_typedefs. We want to apply to RESULT the attributes | |||
1511 | from ATTRIBS that affect type identity, and no others. If any are not | |||
1512 | applied, set *remove_attributes to true. */ | |||
1513 | ||||
1514 | static tree | |||
1515 | apply_identity_attributes (tree result, tree attribs, bool *remove_attributes) | |||
1516 | { | |||
1517 | tree first_ident = NULL_TREE(tree) nullptr; | |||
1518 | tree new_attribs = NULL_TREE(tree) nullptr; | |||
1519 | tree *p = &new_attribs; | |||
1520 | ||||
1521 | if (OVERLOAD_TYPE_P (result)((((((enum tree_code) (result)->base.code)) == RECORD_TYPE || (((enum tree_code) (result)->base.code)) == UNION_TYPE ) && ((tree_class_check ((result), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1521, __FUNCTION__))->type_common.lang_flag_5)) || ((enum tree_code) (result)->base.code) == ENUMERAL_TYPE)) | |||
1522 | { | |||
1523 | /* On classes and enums all attributes are ingrained. */ | |||
1524 | gcc_assert (attribs == TYPE_ATTRIBUTES (result))((void)(!(attribs == ((tree_class_check ((result), (tcc_type) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1524, __FUNCTION__))->type_common.attributes)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1524, __FUNCTION__), 0 : 0)); | |||
1525 | return result; | |||
1526 | } | |||
1527 | ||||
1528 | for (tree a = attribs; a; a = TREE_CHAIN (a)((contains_struct_check ((a), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1528, __FUNCTION__))->common.chain)) | |||
1529 | { | |||
1530 | const attribute_spec *as | |||
1531 | = lookup_attribute_spec (get_attribute_name (a)); | |||
1532 | if (as && as->affects_type_identity) | |||
1533 | { | |||
1534 | if (!first_ident) | |||
1535 | first_ident = a; | |||
1536 | else if (first_ident == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
1537 | { | |||
1538 | *p = tree_cons (TREE_PURPOSE (a)((tree_check ((a), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1538, __FUNCTION__, (TREE_LIST)))->list.purpose), TREE_VALUE (a)((tree_check ((a), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1538, __FUNCTION__, (TREE_LIST)))->list.value), NULL_TREE(tree) nullptr); | |||
1539 | p = &TREE_CHAIN (*p)((contains_struct_check ((*p), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1539, __FUNCTION__))->common.chain); | |||
1540 | } | |||
1541 | } | |||
1542 | else if (first_ident && first_ident != error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
1543 | { | |||
1544 | for (tree a2 = first_ident; a2 != a; a2 = TREE_CHAIN (a2)((contains_struct_check ((a2), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1544, __FUNCTION__))->common.chain)) | |||
1545 | { | |||
1546 | *p = tree_cons (TREE_PURPOSE (a2)((tree_check ((a2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1546, __FUNCTION__, (TREE_LIST)))->list.purpose), TREE_VALUE (a2)((tree_check ((a2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1546, __FUNCTION__, (TREE_LIST)))->list.value), NULL_TREE(tree) nullptr); | |||
1547 | p = &TREE_CHAIN (*p)((contains_struct_check ((*p), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1547, __FUNCTION__))->common.chain); | |||
1548 | } | |||
1549 | first_ident = error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
1550 | } | |||
1551 | } | |||
1552 | if (first_ident != error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
1553 | new_attribs = first_ident; | |||
1554 | ||||
1555 | if (first_ident == attribs) | |||
1556 | /* All attributes affected type identity. */; | |||
1557 | else | |||
1558 | *remove_attributes = true; | |||
1559 | ||||
1560 | return cp_build_type_attribute_variant (result, new_attribs); | |||
1561 | } | |||
1562 | ||||
1563 | /* Builds a qualified variant of T that is either not a typedef variant | |||
1564 | (the default behavior) or not a typedef variant of a user-facing type | |||
1565 | (if FLAGS contains STF_USER_FACING). | |||
1566 | ||||
1567 | E.g. consider the following declarations: | |||
1568 | typedef const int ConstInt; | |||
1569 | typedef ConstInt* PtrConstInt; | |||
1570 | If T is PtrConstInt, this function returns a type representing | |||
1571 | const int*. | |||
1572 | In other words, if T is a typedef, the function returns the underlying type. | |||
1573 | The cv-qualification and attributes of the type returned match the | |||
1574 | input type. | |||
1575 | They will always be compatible types. | |||
1576 | The returned type is built so that all of its subtypes | |||
1577 | recursively have their typedefs stripped as well. | |||
1578 | ||||
1579 | This is different from just returning TYPE_CANONICAL (T) | |||
1580 | Because of several reasons: | |||
1581 | * If T is a type that needs structural equality | |||
1582 | its TYPE_CANONICAL (T) will be NULL. | |||
1583 | * TYPE_CANONICAL (T) desn't carry type attributes | |||
1584 | and loses template parameter names. | |||
1585 | ||||
1586 | If REMOVE_ATTRIBUTES is non-null, also strip attributes that don't | |||
1587 | affect type identity, and set the referent to true if any were | |||
1588 | stripped. */ | |||
1589 | ||||
1590 | tree | |||
1591 | strip_typedefs (tree t, bool *remove_attributes /* = NULL */, | |||
1592 | unsigned int flags /* = 0 */) | |||
1593 | { | |||
1594 | tree result = NULLnullptr, type = NULLnullptr, t0 = NULLnullptr; | |||
1595 | ||||
1596 | if (!t || t == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
1597 | return t; | |||
1598 | ||||
1599 | if (TREE_CODE (t)((enum tree_code) (t)->base.code) == TREE_LIST) | |||
1600 | { | |||
1601 | bool changed = false; | |||
1602 | releasing_vec vec; | |||
1603 | tree r = t; | |||
1604 | for (; t; t = TREE_CHAIN (t)((contains_struct_check ((t), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1604, __FUNCTION__))->common.chain)) | |||
1605 | { | |||
1606 | gcc_assert (!TREE_PURPOSE (t))((void)(!(!((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1606, __FUNCTION__, (TREE_LIST)))->list.purpose)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1606, __FUNCTION__), 0 : 0)); | |||
1607 | tree elt = strip_typedefs (TREE_VALUE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1607, __FUNCTION__, (TREE_LIST)))->list.value), remove_attributes, flags); | |||
1608 | if (elt != TREE_VALUE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1608, __FUNCTION__, (TREE_LIST)))->list.value)) | |||
1609 | changed = true; | |||
1610 | vec_safe_push (vec, elt); | |||
1611 | } | |||
1612 | if (changed) | |||
1613 | r = build_tree_list_vec (vec); | |||
1614 | return r; | |||
1615 | } | |||
1616 | ||||
1617 | gcc_assert (TYPE_P (t))((void)(!((tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) (t)->base.code))] == tcc_type)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1617, __FUNCTION__), 0 : 0)); | |||
1618 | ||||
1619 | if (t == TYPE_CANONICAL (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1619, __FUNCTION__))->type_common.canonical)) | |||
1620 | return t; | |||
1621 | ||||
1622 | if (!(flags & STF_STRIP_DEPENDENT) | |||
1623 | && dependent_alias_template_spec_p (t, nt_opaque)) | |||
1624 | /* DR 1558: However, if the template-id is dependent, subsequent | |||
1625 | template argument substitution still applies to the template-id. */ | |||
1626 | return t; | |||
1627 | ||||
1628 | switch (TREE_CODE (t)((enum tree_code) (t)->base.code)) | |||
1629 | { | |||
1630 | case POINTER_TYPE: | |||
1631 | type = strip_typedefs (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1631, __FUNCTION__))->typed.type), remove_attributes, flags); | |||
1632 | result = build_pointer_type_for_mode (type, TYPE_MODE (t)((((enum tree_code) ((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1632, __FUNCTION__)))->base.code) == VECTOR_TYPE) ? vector_type_mode (t) : (t)->type_common.mode), false); | |||
1633 | break; | |||
1634 | case REFERENCE_TYPE: | |||
1635 | type = strip_typedefs (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1635, __FUNCTION__))->typed.type), remove_attributes, flags); | |||
1636 | result = cp_build_reference_type_for_mode (type, TYPE_MODE (t)((((enum tree_code) ((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1636, __FUNCTION__)))->base.code) == VECTOR_TYPE) ? vector_type_mode (t) : (t)->type_common.mode), TYPE_REF_IS_RVALUE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1636, __FUNCTION__, (REFERENCE_TYPE)))->base.private_flag )); | |||
1637 | break; | |||
1638 | case OFFSET_TYPE: | |||
1639 | t0 = strip_typedefs (TYPE_OFFSET_BASETYPE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1639, __FUNCTION__, (OFFSET_TYPE)))->type_non_common.maxval ), remove_attributes, flags); | |||
1640 | type = strip_typedefs (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1640, __FUNCTION__))->typed.type), remove_attributes, flags); | |||
1641 | result = build_offset_type (t0, type); | |||
1642 | break; | |||
1643 | case RECORD_TYPE: | |||
1644 | if (TYPE_PTRMEMFUNC_P (t)(((enum tree_code) (t)->base.code) == RECORD_TYPE && (((tree_class_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1644, __FUNCTION__, (RECORD_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1644, __FUNCTION__))->type_common.lang_flag_2)))) | |||
1645 | { | |||
1646 | t0 = strip_typedefs (TYPE_PTRMEMFUNC_FN_TYPE (t)(cp_build_qualified_type (((contains_struct_check ((((tree_check3 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1646, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE )))->type_non_common.values)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1646, __FUNCTION__))->typed.type), cp_type_quals (t))), | |||
1647 | remove_attributes, flags); | |||
1648 | result = build_ptrmemfunc_type (t0); | |||
1649 | } | |||
1650 | break; | |||
1651 | case ARRAY_TYPE: | |||
1652 | type = strip_typedefs (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1652, __FUNCTION__))->typed.type), remove_attributes, flags); | |||
1653 | t0 = strip_typedefs (TYPE_DOMAIN (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1653, __FUNCTION__, (ARRAY_TYPE)))->type_non_common.values ), remove_attributes, flags); | |||
1654 | gcc_checking_assert (TYPE_DEPENDENT_P_VALID (t)((void)(!(((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1654, __FUNCTION__))->type_common.lang_flag_6) || !dependent_type_p (t)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1655, __FUNCTION__), 0 : 0)) | |||
1655 | || !dependent_type_p (t))((void)(!(((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1654, __FUNCTION__))->type_common.lang_flag_6) || !dependent_type_p (t)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1655, __FUNCTION__), 0 : 0)); | |||
1656 | result = build_cplus_array_type (type, t0, TYPE_DEPENDENT_P (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1656, __FUNCTION__))->type_common.lang_flag_0)); | |||
1657 | break; | |||
1658 | case FUNCTION_TYPE: | |||
1659 | case METHOD_TYPE: | |||
1660 | { | |||
1661 | tree arg_types = NULLnullptr, arg_node, arg_node2, arg_type; | |||
1662 | bool changed; | |||
1663 | ||||
1664 | /* Because we stomp on TREE_PURPOSE of TYPE_ARG_TYPES in many places | |||
1665 | around the compiler (e.g. cp_parser_late_parsing_default_args), we | |||
1666 | can't expect that re-hashing a function type will find a previous | |||
1667 | equivalent type, so try to reuse the input type if nothing has | |||
1668 | changed. If the type is itself a variant, that will change. */ | |||
1669 | bool is_variant = typedef_variant_p (t); | |||
1670 | if (remove_attributes | |||
1671 | && (TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1671, __FUNCTION__))->type_common.attributes) || TYPE_USER_ALIGN (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1671, __FUNCTION__))->base.u.bits.user_align))) | |||
1672 | is_variant = true; | |||
1673 | ||||
1674 | type = strip_typedefs (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1674, __FUNCTION__))->typed.type), remove_attributes, flags); | |||
1675 | tree canon_spec = (flag_noexcept_type | |||
1676 | ? canonical_eh_spec (TYPE_RAISES_EXCEPTIONS (t)((tree_class_check (((tree_check2 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1676, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1676, __FUNCTION__))->type_non_common.lang_1)) | |||
1677 | : NULL_TREE(tree) nullptr); | |||
1678 | changed = (type != TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1678, __FUNCTION__))->typed.type) || is_variant | |||
1679 | || TYPE_RAISES_EXCEPTIONS (t)((tree_class_check (((tree_check2 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1679, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1679, __FUNCTION__))->type_non_common.lang_1) != canon_spec); | |||
1680 | ||||
1681 | for (arg_node = TYPE_ARG_TYPES (t)((tree_check2 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1681, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common .values); | |||
1682 | arg_node; | |||
1683 | arg_node = TREE_CHAIN (arg_node)((contains_struct_check ((arg_node), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1683, __FUNCTION__))->common.chain)) | |||
1684 | { | |||
1685 | if (arg_node == void_list_nodeglobal_trees[TI_VOID_LIST_NODE]) | |||
1686 | break; | |||
1687 | arg_type = strip_typedefs (TREE_VALUE (arg_node)((tree_check ((arg_node), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1687, __FUNCTION__, (TREE_LIST)))->list.value), | |||
1688 | remove_attributes, flags); | |||
1689 | gcc_assert (arg_type)((void)(!(arg_type) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1689, __FUNCTION__), 0 : 0)); | |||
1690 | if (arg_type == TREE_VALUE (arg_node)((tree_check ((arg_node), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1690, __FUNCTION__, (TREE_LIST)))->list.value) && !changed) | |||
1691 | continue; | |||
1692 | ||||
1693 | if (!changed) | |||
1694 | { | |||
1695 | changed = true; | |||
1696 | for (arg_node2 = TYPE_ARG_TYPES (t)((tree_check2 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1696, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common .values); | |||
1697 | arg_node2 != arg_node; | |||
1698 | arg_node2 = TREE_CHAIN (arg_node2)((contains_struct_check ((arg_node2), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1698, __FUNCTION__))->common.chain)) | |||
1699 | arg_types | |||
1700 | = tree_cons (TREE_PURPOSE (arg_node2)((tree_check ((arg_node2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1700, __FUNCTION__, (TREE_LIST)))->list.purpose), | |||
1701 | TREE_VALUE (arg_node2)((tree_check ((arg_node2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1701, __FUNCTION__, (TREE_LIST)))->list.value), arg_types); | |||
1702 | } | |||
1703 | ||||
1704 | arg_types | |||
1705 | = tree_cons (TREE_PURPOSE (arg_node)((tree_check ((arg_node), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1705, __FUNCTION__, (TREE_LIST)))->list.purpose), arg_type, arg_types); | |||
1706 | } | |||
1707 | ||||
1708 | if (!changed) | |||
1709 | return t; | |||
1710 | ||||
1711 | if (arg_types) | |||
1712 | arg_types = nreverse (arg_types); | |||
1713 | ||||
1714 | /* A list of parameters not ending with an ellipsis | |||
1715 | must end with void_list_node. */ | |||
1716 | if (arg_node) | |||
1717 | arg_types = chainon (arg_types, void_list_nodeglobal_trees[TI_VOID_LIST_NODE]); | |||
1718 | ||||
1719 | if (TREE_CODE (t)((enum tree_code) (t)->base.code) == METHOD_TYPE) | |||
1720 | { | |||
1721 | tree class_type = TREE_TYPE (TREE_VALUE (arg_types))((contains_struct_check ((((tree_check ((arg_types), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1721, __FUNCTION__, (TREE_LIST)))->list.value)), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1721, __FUNCTION__))->typed.type); | |||
1722 | gcc_assert (class_type)((void)(!(class_type) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1722, __FUNCTION__), 0 : 0)); | |||
1723 | result = | |||
1724 | build_method_type_directly (class_type, type, | |||
1725 | TREE_CHAIN (arg_types)((contains_struct_check ((arg_types), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1725, __FUNCTION__))->common.chain)); | |||
1726 | } | |||
1727 | else | |||
1728 | { | |||
1729 | result = build_function_type (type, arg_types); | |||
1730 | result = apply_memfn_quals (result, type_memfn_quals (t)); | |||
1731 | } | |||
1732 | ||||
1733 | result = build_cp_fntype_variant (result, | |||
1734 | type_memfn_rqual (t), canon_spec, | |||
1735 | TYPE_HAS_LATE_RETURN_TYPE (t)(((tree_class_check (((tree_check2 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1735, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1735, __FUNCTION__))->type_common.lang_flag_2))); | |||
1736 | } | |||
1737 | break; | |||
1738 | case TYPENAME_TYPE: | |||
1739 | { | |||
1740 | bool changed = false; | |||
1741 | tree fullname = TYPENAME_TYPE_FULLNAME (t)(((tree_class_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1741, __FUNCTION__, (TYPENAME_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1741, __FUNCTION__))->type_non_common.values)); | |||
1742 | if (TREE_CODE (fullname)((enum tree_code) (fullname)->base.code) == TEMPLATE_ID_EXPR | |||
1743 | && TREE_OPERAND (fullname, 1)(*((const_cast<tree*> (tree_operand_check ((fullname), ( 1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1743, __FUNCTION__)))))) | |||
1744 | { | |||
1745 | tree args = TREE_OPERAND (fullname, 1)(*((const_cast<tree*> (tree_operand_check ((fullname), ( 1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1745, __FUNCTION__))))); | |||
1746 | tree new_args = copy_node (args); | |||
1747 | for (int i = 0; i < TREE_VEC_LENGTH (args)((tree_check ((args), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1747, __FUNCTION__, (TREE_VEC)))->base.u.length); ++i) | |||
1748 | { | |||
1749 | tree arg = TREE_VEC_ELT (args, i)(*((const_cast<tree *> (tree_vec_elt_check ((args), (i) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1749, __FUNCTION__))))); | |||
1750 | tree strip_arg; | |||
1751 | if (TYPE_P (arg)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (arg)->base.code))] == tcc_type)) | |||
1752 | strip_arg = strip_typedefs (arg, remove_attributes, flags); | |||
1753 | else | |||
1754 | strip_arg = strip_typedefs_expr (arg, remove_attributes, | |||
1755 | flags); | |||
1756 | TREE_VEC_ELT (new_args, i)(*((const_cast<tree *> (tree_vec_elt_check ((new_args), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1756, __FUNCTION__))))) = strip_arg; | |||
1757 | if (strip_arg != arg) | |||
1758 | changed = true; | |||
1759 | } | |||
1760 | if (changed) | |||
1761 | { | |||
1762 | NON_DEFAULT_TEMPLATE_ARGS_COUNT (new_args)((contains_struct_check (((tree_check ((new_args), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1762, __FUNCTION__, (TREE_VEC)))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1762, __FUNCTION__))->common.chain) | |||
1763 | = NON_DEFAULT_TEMPLATE_ARGS_COUNT (args)((contains_struct_check (((tree_check ((args), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1763, __FUNCTION__, (TREE_VEC)))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1763, __FUNCTION__))->common.chain); | |||
1764 | fullname | |||
1765 | = lookup_template_function (TREE_OPERAND (fullname, 0)(*((const_cast<tree*> (tree_operand_check ((fullname), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1765, __FUNCTION__))))), | |||
1766 | new_args); | |||
1767 | } | |||
1768 | else | |||
1769 | ggc_free (new_args); | |||
1770 | } | |||
1771 | tree ctx = strip_typedefs (TYPE_CONTEXT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1771, __FUNCTION__))->type_common.context), remove_attributes, flags); | |||
1772 | if (!changed && ctx == TYPE_CONTEXT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1772, __FUNCTION__))->type_common.context) && !typedef_variant_p (t)) | |||
1773 | return t; | |||
1774 | tree name = fullname; | |||
1775 | if (TREE_CODE (fullname)((enum tree_code) (fullname)->base.code) == TEMPLATE_ID_EXPR) | |||
1776 | name = TREE_OPERAND (fullname, 0)(*((const_cast<tree*> (tree_operand_check ((fullname), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1776, __FUNCTION__))))); | |||
1777 | /* Use build_typename_type rather than make_typename_type because we | |||
1778 | don't want to resolve it here, just strip typedefs. */ | |||
1779 | result = build_typename_type (ctx, name, fullname, typename_type); | |||
1780 | } | |||
1781 | break; | |||
1782 | case DECLTYPE_TYPE: | |||
1783 | result = strip_typedefs_expr (DECLTYPE_TYPE_EXPR (t)(((tree_class_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1783, __FUNCTION__, (DECLTYPE_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1783, __FUNCTION__))->type_non_common.values)), | |||
1784 | remove_attributes, flags); | |||
1785 | if (result == DECLTYPE_TYPE_EXPR (t)(((tree_class_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1785, __FUNCTION__, (DECLTYPE_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1785, __FUNCTION__))->type_non_common.values))) | |||
1786 | result = NULL_TREE(tree) nullptr; | |||
1787 | else | |||
1788 | result = (finish_decltype_type | |||
1789 | (result, | |||
1790 | DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1790, __FUNCTION__, (DECLTYPE_TYPE))))->type_common.string_flag, | |||
1791 | tf_none)); | |||
1792 | break; | |||
1793 | case TRAIT_TYPE: | |||
1794 | { | |||
1795 | tree type1 = strip_typedefs (TRAIT_TYPE_TYPE1 (t)((tree_class_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1795, __FUNCTION__, (TRAIT_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1795, __FUNCTION__))->type_non_common.minval), | |||
1796 | remove_attributes, flags); | |||
1797 | tree type2 = strip_typedefs (TRAIT_TYPE_TYPE2 (t)((tree_class_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1797, __FUNCTION__, (TRAIT_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1797, __FUNCTION__))->type_non_common.maxval), | |||
1798 | remove_attributes, flags); | |||
1799 | if (type1 == TRAIT_TYPE_TYPE1 (t)((tree_class_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1799, __FUNCTION__, (TRAIT_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1799, __FUNCTION__))->type_non_common.minval) && type2 == TRAIT_TYPE_TYPE2 (t)((tree_class_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1799, __FUNCTION__, (TRAIT_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1799, __FUNCTION__))->type_non_common.maxval)) | |||
1800 | result = NULL_TREE(tree) nullptr; | |||
1801 | else | |||
1802 | result = finish_trait_type (TRAIT_TYPE_KIND (t)((enum cp_trait_kind) ((unsigned long) (*tree_int_cst_elt_check ((((tree_class_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1802, __FUNCTION__, (TRAIT_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1802, __FUNCTION__))->type_non_common.values)), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1802, __FUNCTION__)))), type1, type2); | |||
1803 | } | |||
1804 | break; | |||
1805 | case TYPE_PACK_EXPANSION: | |||
1806 | { | |||
1807 | tree pat = PACK_EXPANSION_PATTERN (t)(((enum tree_code) ((tree_check2 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1807, __FUNCTION__, (TYPE_PACK_EXPANSION), (EXPR_PACK_EXPANSION ))))->base.code) == TYPE_PACK_EXPANSION ? ((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1807, __FUNCTION__))->typed.type) : (*((const_cast<tree *> (tree_operand_check ((t), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1807, __FUNCTION__)))))); | |||
1808 | if (TYPE_P (pat)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (pat)->base.code))] == tcc_type)) | |||
1809 | { | |||
1810 | type = strip_typedefs (pat, remove_attributes, flags); | |||
1811 | if (type != pat) | |||
1812 | { | |||
1813 | result = build_distinct_type_copy (t); | |||
1814 | PACK_EXPANSION_PATTERN (result)(((enum tree_code) ((tree_check2 ((result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1814, __FUNCTION__, (TYPE_PACK_EXPANSION), (EXPR_PACK_EXPANSION ))))->base.code) == TYPE_PACK_EXPANSION ? ((contains_struct_check ((result), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1814, __FUNCTION__))->typed.type) : (*((const_cast<tree *> (tree_operand_check ((result), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1814, __FUNCTION__)))))) = type; | |||
1815 | } | |||
1816 | } | |||
1817 | } | |||
1818 | break; | |||
1819 | default: | |||
1820 | break; | |||
1821 | } | |||
1822 | ||||
1823 | if (!result) | |||
1824 | { | |||
1825 | if (typedef_variant_p (t)) | |||
1826 | { | |||
1827 | if ((flags & STF_USER_VISIBLE) | |||
1828 | && !user_facing_original_type_p (t)) | |||
1829 | return t; | |||
1830 | /* If T is a non-template alias or typedef, we can assume that | |||
1831 | instantiating its definition will hit any substitution failure, | |||
1832 | so we don't need to retain it here as well. */ | |||
1833 | if (!alias_template_specialization_p (t, nt_opaque)) | |||
1834 | flags |= STF_STRIP_DEPENDENT; | |||
1835 | result = strip_typedefs (DECL_ORIGINAL_TYPE (TYPE_NAME (t))((tree_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1835, __FUNCTION__))->type_common.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1835, __FUNCTION__, (TYPE_DECL)))->decl_non_common.result ), | |||
1836 | remove_attributes, flags); | |||
1837 | } | |||
1838 | else | |||
1839 | result = TYPE_MAIN_VARIANT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1839, __FUNCTION__))->type_common.main_variant); | |||
1840 | } | |||
1841 | /*gcc_assert (!typedef_variant_p (result) | |||
1842 | || dependent_alias_template_spec_p (result, nt_opaque) | |||
1843 | || ((flags & STF_USER_VISIBLE) | |||
1844 | && !user_facing_original_type_p (result)));*/ | |||
1845 | ||||
1846 | if (COMPLETE_TYPE_P (result)(((tree_class_check ((result), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1846, __FUNCTION__))->type_common.size) != (tree) nullptr ) && !COMPLETE_TYPE_P (t)(((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1846, __FUNCTION__))->type_common.size) != (tree) nullptr )) | |||
1847 | /* If RESULT is complete and T isn't, it's likely the case that T | |||
1848 | is a variant of RESULT which hasn't been updated yet. Skip the | |||
1849 | attribute handling. */; | |||
1850 | else | |||
1851 | { | |||
1852 | if (TYPE_USER_ALIGN (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1852, __FUNCTION__))->base.u.bits.user_align) != TYPE_USER_ALIGN (result)((tree_class_check ((result), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1852, __FUNCTION__))->base.u.bits.user_align) | |||
1853 | || TYPE_ALIGN (t)(((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1853, __FUNCTION__))->type_common.align) ? ((unsigned)1) << (((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1853, __FUNCTION__))->type_common.align) - 1) : 0) != TYPE_ALIGN (result)(((tree_class_check ((result), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1853, __FUNCTION__))->type_common.align) ? ((unsigned)1) << (((tree_class_check ((result), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1853, __FUNCTION__))->type_common.align) - 1) : 0)) | |||
1854 | { | |||
1855 | gcc_assert (TYPE_USER_ALIGN (t))((void)(!(((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1855, __FUNCTION__))->base.u.bits.user_align)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1855, __FUNCTION__), 0 : 0)); | |||
1856 | if (remove_attributes) | |||
1857 | *remove_attributes = true; | |||
1858 | else | |||
1859 | { | |||
1860 | if (TYPE_ALIGN (t)(((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1860, __FUNCTION__))->type_common.align) ? ((unsigned)1) << (((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1860, __FUNCTION__))->type_common.align) - 1) : 0) == TYPE_ALIGN (result)(((tree_class_check ((result), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1860, __FUNCTION__))->type_common.align) ? ((unsigned)1) << (((tree_class_check ((result), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1860, __FUNCTION__))->type_common.align) - 1) : 0)) | |||
1861 | result = build_variant_type_copy (result); | |||
1862 | else | |||
1863 | result = build_aligned_type (result, TYPE_ALIGN (t)(((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1863, __FUNCTION__))->type_common.align) ? ((unsigned)1) << (((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1863, __FUNCTION__))->type_common.align) - 1) : 0)); | |||
1864 | TYPE_USER_ALIGN (result)((tree_class_check ((result), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1864, __FUNCTION__))->base.u.bits.user_align) = true; | |||
1865 | } | |||
1866 | } | |||
1867 | ||||
1868 | if (TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1868, __FUNCTION__))->type_common.attributes)) | |||
1869 | { | |||
1870 | if (remove_attributes) | |||
1871 | result = apply_identity_attributes (result, TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1871, __FUNCTION__))->type_common.attributes), | |||
1872 | remove_attributes); | |||
1873 | else | |||
1874 | result = cp_build_type_attribute_variant (result, | |||
1875 | TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1875, __FUNCTION__))->type_common.attributes)); | |||
1876 | } | |||
1877 | } | |||
1878 | ||||
1879 | return cp_build_qualified_type (result, cp_type_quals (t)); | |||
1880 | } | |||
1881 | ||||
1882 | /* Like strip_typedefs above, but works on expressions, so that in | |||
1883 | ||||
1884 | template<class T> struct A | |||
1885 | { | |||
1886 | typedef T TT; | |||
1887 | B<sizeof(TT)> b; | |||
1888 | }; | |||
1889 | ||||
1890 | sizeof(TT) is replaced by sizeof(T). */ | |||
1891 | ||||
1892 | tree | |||
1893 | strip_typedefs_expr (tree t, bool *remove_attributes, unsigned int flags) | |||
1894 | { | |||
1895 | unsigned i,n; | |||
1896 | tree r, type, *ops; | |||
1897 | enum tree_code code; | |||
1898 | ||||
1899 | if (t == NULL_TREE(tree) nullptr || t == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
1900 | return t; | |||
1901 | ||||
1902 | STRIP_ANY_LOCATION_WRAPPER (t)(t) = tree_strip_any_location_wrapper ((const_cast<union tree_node *> (((t))))); | |||
1903 | ||||
1904 | if (DECL_P (t)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (t)->base.code))] == tcc_declaration) || CONSTANT_CLASS_P (t)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (t)->base.code))] == tcc_constant)) | |||
1905 | return t; | |||
1906 | ||||
1907 | /* Some expressions have type operands, so let's handle types here rather | |||
1908 | than check TYPE_P in multiple places below. */ | |||
1909 | if (TYPE_P (t)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (t)->base.code))] == tcc_type)) | |||
1910 | return strip_typedefs (t, remove_attributes, flags); | |||
1911 | ||||
1912 | code = TREE_CODE (t)((enum tree_code) (t)->base.code); | |||
1913 | switch (code) | |||
1914 | { | |||
1915 | case IDENTIFIER_NODE: | |||
1916 | case TEMPLATE_PARM_INDEX: | |||
1917 | case OVERLOAD: | |||
1918 | case BASELINK: | |||
1919 | case ARGUMENT_PACK_SELECT: | |||
1920 | return t; | |||
1921 | ||||
1922 | case TRAIT_EXPR: | |||
1923 | { | |||
1924 | tree type1 = strip_typedefs (TRAIT_EXPR_TYPE1 (t)(((struct tree_trait_expr *)(tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1924, __FUNCTION__, (TRAIT_EXPR))))->type1), | |||
1925 | remove_attributes, flags); | |||
1926 | tree type2 = strip_typedefs (TRAIT_EXPR_TYPE2 (t)(((struct tree_trait_expr *)(tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1926, __FUNCTION__, (TRAIT_EXPR))))->type2), | |||
1927 | remove_attributes, flags); | |||
1928 | if (type1 == TRAIT_EXPR_TYPE1 (t)(((struct tree_trait_expr *)(tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1928, __FUNCTION__, (TRAIT_EXPR))))->type1) | |||
1929 | && type2 == TRAIT_EXPR_TYPE2 (t)(((struct tree_trait_expr *)(tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1929, __FUNCTION__, (TRAIT_EXPR))))->type2)) | |||
1930 | return t; | |||
1931 | r = copy_node (t); | |||
1932 | TRAIT_EXPR_TYPE1 (r)(((struct tree_trait_expr *)(tree_check ((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1932, __FUNCTION__, (TRAIT_EXPR))))->type1) = type1; | |||
1933 | TRAIT_EXPR_TYPE2 (r)(((struct tree_trait_expr *)(tree_check ((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1933, __FUNCTION__, (TRAIT_EXPR))))->type2) = type2; | |||
1934 | return r; | |||
1935 | } | |||
1936 | ||||
1937 | case TREE_LIST: | |||
1938 | { | |||
1939 | releasing_vec vec; | |||
1940 | bool changed = false; | |||
1941 | tree it; | |||
1942 | for (it = t; it; it = TREE_CHAIN (it)((contains_struct_check ((it), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1942, __FUNCTION__))->common.chain)) | |||
1943 | { | |||
1944 | tree val = strip_typedefs_expr (TREE_VALUE (it)((tree_check ((it), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1944, __FUNCTION__, (TREE_LIST)))->list.value), | |||
1945 | remove_attributes, flags); | |||
1946 | vec_safe_push (vec, val); | |||
1947 | if (val != TREE_VALUE (it)((tree_check ((it), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1947, __FUNCTION__, (TREE_LIST)))->list.value)) | |||
1948 | changed = true; | |||
1949 | gcc_assert (TREE_PURPOSE (it) == NULL_TREE)((void)(!(((tree_check ((it), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1949, __FUNCTION__, (TREE_LIST)))->list.purpose) == (tree ) nullptr) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1949, __FUNCTION__), 0 : 0)); | |||
1950 | } | |||
1951 | if (changed) | |||
1952 | { | |||
1953 | r = NULL_TREE(tree) nullptr; | |||
1954 | FOR_EACH_VEC_ELT_REVERSE (*vec, i, it)for (i = (*vec).length () - 1; (*vec).iterate ((i), &(it) ); (i)--) | |||
1955 | r = tree_cons (NULL_TREE(tree) nullptr, it, r); | |||
1956 | } | |||
1957 | else | |||
1958 | r = t; | |||
1959 | return r; | |||
1960 | } | |||
1961 | ||||
1962 | case TREE_VEC: | |||
1963 | { | |||
1964 | bool changed = false; | |||
1965 | releasing_vec vec; | |||
1966 | n = TREE_VEC_LENGTH (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1966, __FUNCTION__, (TREE_VEC)))->base.u.length); | |||
1967 | vec_safe_reserve (vec, n); | |||
1968 | for (i = 0; i < n; ++i) | |||
1969 | { | |||
1970 | tree op = strip_typedefs_expr (TREE_VEC_ELT (t, i)(*((const_cast<tree *> (tree_vec_elt_check ((t), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1970, __FUNCTION__))))), | |||
1971 | remove_attributes, flags); | |||
1972 | vec->quick_push (op); | |||
1973 | if (op != TREE_VEC_ELT (t, i)(*((const_cast<tree *> (tree_vec_elt_check ((t), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1973, __FUNCTION__)))))) | |||
1974 | changed = true; | |||
1975 | } | |||
1976 | if (changed) | |||
1977 | { | |||
1978 | r = copy_node (t); | |||
1979 | for (i = 0; i < n; ++i) | |||
1980 | TREE_VEC_ELT (r, i)(*((const_cast<tree *> (tree_vec_elt_check ((r), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1980, __FUNCTION__))))) = (*vec)[i]; | |||
1981 | NON_DEFAULT_TEMPLATE_ARGS_COUNT (r)((contains_struct_check (((tree_check ((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1981, __FUNCTION__, (TREE_VEC)))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1981, __FUNCTION__))->common.chain) | |||
1982 | = NON_DEFAULT_TEMPLATE_ARGS_COUNT (t)((contains_struct_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1982, __FUNCTION__, (TREE_VEC)))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1982, __FUNCTION__))->common.chain); | |||
1983 | } | |||
1984 | else | |||
1985 | r = t; | |||
1986 | return r; | |||
1987 | } | |||
1988 | ||||
1989 | case CONSTRUCTOR: | |||
1990 | { | |||
1991 | bool changed = false; | |||
1992 | vec<constructor_elt, va_gc> *vec | |||
1993 | = vec_safe_copy (CONSTRUCTOR_ELTS (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1993, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts)); | |||
1994 | n = CONSTRUCTOR_NELTS (t)(vec_safe_length (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1994, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts))); | |||
1995 | type = strip_typedefs (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 1995, __FUNCTION__))->typed.type), remove_attributes, flags); | |||
1996 | for (i = 0; i < n; ++i) | |||
1997 | { | |||
1998 | constructor_elt *e = &(*vec)[i]; | |||
1999 | tree op = strip_typedefs_expr (e->value, remove_attributes, flags); | |||
2000 | if (op != e->value) | |||
2001 | { | |||
2002 | changed = true; | |||
2003 | e->value = op; | |||
2004 | } | |||
2005 | gcc_checking_assert((void)(!(e->index == strip_typedefs_expr (e->index, remove_attributes , flags)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2007, __FUNCTION__), 0 : 0)) | |||
2006 | (e->index == strip_typedefs_expr (e->index, remove_attributes,((void)(!(e->index == strip_typedefs_expr (e->index, remove_attributes , flags)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2007, __FUNCTION__), 0 : 0)) | |||
2007 | flags))((void)(!(e->index == strip_typedefs_expr (e->index, remove_attributes , flags)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2007, __FUNCTION__), 0 : 0)); | |||
2008 | } | |||
2009 | ||||
2010 | if (!changed && type == TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2010, __FUNCTION__))->typed.type)) | |||
2011 | { | |||
2012 | vec_free (vec); | |||
2013 | return t; | |||
2014 | } | |||
2015 | else | |||
2016 | { | |||
2017 | r = copy_node (t); | |||
2018 | TREE_TYPE (r)((contains_struct_check ((r), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2018, __FUNCTION__))->typed.type) = type; | |||
2019 | CONSTRUCTOR_ELTS (r)((tree_check ((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2019, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts) = vec; | |||
2020 | return r; | |||
2021 | } | |||
2022 | } | |||
2023 | ||||
2024 | case LAMBDA_EXPR: | |||
2025 | return t; | |||
2026 | ||||
2027 | case STATEMENT_LIST: | |||
2028 | error ("statement-expression in a constant expression"); | |||
2029 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
2030 | ||||
2031 | default: | |||
2032 | break; | |||
2033 | } | |||
2034 | ||||
2035 | gcc_assert (EXPR_P (t))((void)(!(((tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) (t)->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) (t)->base.code))]) <= tcc_expression )) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2035, __FUNCTION__), 0 : 0)); | |||
2036 | ||||
2037 | n = cp_tree_operand_length (t); | |||
2038 | ops = XALLOCAVEC (tree, n)((tree *) __builtin_alloca(sizeof (tree) * (n))); | |||
2039 | type = TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2039, __FUNCTION__))->typed.type); | |||
2040 | ||||
2041 | switch (code) | |||
2042 | { | |||
2043 | CASE_CONVERTcase NOP_EXPR: case CONVERT_EXPR: | |||
2044 | case IMPLICIT_CONV_EXPR: | |||
2045 | case DYNAMIC_CAST_EXPR: | |||
2046 | case STATIC_CAST_EXPR: | |||
2047 | case CONST_CAST_EXPR: | |||
2048 | case REINTERPRET_CAST_EXPR: | |||
2049 | case CAST_EXPR: | |||
2050 | case NEW_EXPR: | |||
2051 | type = strip_typedefs (type, remove_attributes, flags); | |||
2052 | /* fallthrough */ | |||
2053 | ||||
2054 | default: | |||
2055 | for (i = 0; i < n; ++i) | |||
2056 | ops[i] = strip_typedefs_expr (TREE_OPERAND (t, i)(*((const_cast<tree*> (tree_operand_check ((t), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2056, __FUNCTION__))))), | |||
2057 | remove_attributes, flags); | |||
2058 | break; | |||
2059 | } | |||
2060 | ||||
2061 | /* If nothing changed, return t. */ | |||
2062 | for (i = 0; i < n; ++i) | |||
2063 | if (ops[i] != TREE_OPERAND (t, i)(*((const_cast<tree*> (tree_operand_check ((t), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2063, __FUNCTION__)))))) | |||
2064 | break; | |||
2065 | if (i == n && type == TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2065, __FUNCTION__))->typed.type)) | |||
2066 | return t; | |||
2067 | ||||
2068 | r = copy_node (t); | |||
2069 | TREE_TYPE (r)((contains_struct_check ((r), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2069, __FUNCTION__))->typed.type) = type; | |||
2070 | for (i = 0; i < n; ++i) | |||
2071 | TREE_OPERAND (r, i)(*((const_cast<tree*> (tree_operand_check ((r), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2071, __FUNCTION__))))) = ops[i]; | |||
2072 | return r; | |||
2073 | } | |||
2074 | ||||
2075 | /* Makes a copy of BINFO and TYPE, which is to be inherited into a | |||
2076 | graph dominated by T. If BINFO is NULL, TYPE is a dependent base, | |||
2077 | and we do a shallow copy. If BINFO is non-NULL, we do a deep copy. | |||
2078 | VIRT indicates whether TYPE is inherited virtually or not. | |||
2079 | IGO_PREV points at the previous binfo of the inheritance graph | |||
2080 | order chain. The newly copied binfo's TREE_CHAIN forms this | |||
2081 | ordering. | |||
2082 | ||||
2083 | The CLASSTYPE_VBASECLASSES vector of T is constructed in the | |||
2084 | correct order. That is in the order the bases themselves should be | |||
2085 | constructed in. | |||
2086 | ||||
2087 | The BINFO_INHERITANCE of a virtual base class points to the binfo | |||
2088 | of the most derived type. ??? We could probably change this so that | |||
2089 | BINFO_INHERITANCE becomes synonymous with BINFO_PRIMARY, and hence | |||
2090 | remove a field. They currently can only differ for primary virtual | |||
2091 | virtual bases. */ | |||
2092 | ||||
2093 | tree | |||
2094 | copy_binfo (tree binfo, tree type, tree t, tree *igo_prev, int virt) | |||
2095 | { | |||
2096 | tree new_binfo; | |||
2097 | ||||
2098 | if (virt) | |||
2099 | { | |||
2100 | /* See if we've already made this virtual base. */ | |||
2101 | new_binfo = binfo_for_vbase (type, t); | |||
2102 | if (new_binfo) | |||
2103 | return new_binfo; | |||
2104 | } | |||
2105 | ||||
2106 | new_binfo = make_tree_binfo (binfo ? BINFO_N_BASE_BINFOS (binfo)((&(tree_check ((binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2106, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)-> length ()) : 0); | |||
2107 | BINFO_TYPE (new_binfo)((contains_struct_check (((tree_check ((new_binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2107, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2107, __FUNCTION__))->typed.type) = type; | |||
2108 | ||||
2109 | /* Chain it into the inheritance graph. */ | |||
2110 | TREE_CHAIN (*igo_prev)((contains_struct_check ((*igo_prev), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2110, __FUNCTION__))->common.chain) = new_binfo; | |||
2111 | *igo_prev = new_binfo; | |||
2112 | ||||
2113 | if (binfo && !BINFO_DEPENDENT_BASE_P (binfo)((tree_not_check2 (((tree_check ((binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2113, __FUNCTION__, (TREE_BINFO)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2113, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3)) | |||
2114 | { | |||
2115 | int ix; | |||
2116 | tree base_binfo; | |||
2117 | ||||
2118 | gcc_assert (SAME_BINFO_TYPE_P (BINFO_TYPE (binfo), type))((void)(!(((((contains_struct_check (((tree_check ((binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2118, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2118, __FUNCTION__))->typed.type)) == (type))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2118, __FUNCTION__), 0 : 0)); | |||
2119 | ||||
2120 | BINFO_OFFSET (new_binfo)((tree_check ((new_binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2120, __FUNCTION__, (TREE_BINFO)))->binfo.offset) = BINFO_OFFSET (binfo)((tree_check ((binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2120, __FUNCTION__, (TREE_BINFO)))->binfo.offset); | |||
2121 | BINFO_VIRTUALS (new_binfo)((tree_check ((new_binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2121, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals) = BINFO_VIRTUALS (binfo)((tree_check ((binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2121, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals); | |||
2122 | ||||
2123 | /* We do not need to copy the accesses, as they are read only. */ | |||
2124 | BINFO_BASE_ACCESSES (new_binfo)((tree_check ((new_binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2124, __FUNCTION__, (TREE_BINFO)))->binfo.base_accesses) = BINFO_BASE_ACCESSES (binfo)((tree_check ((binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2124, __FUNCTION__, (TREE_BINFO)))->binfo.base_accesses); | |||
2125 | ||||
2126 | /* Recursively copy base binfos of BINFO. */ | |||
2127 | for (ix = 0; BINFO_BASE_ITERATE (binfo, ix, base_binfo)((&(tree_check ((binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2127, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)-> iterate ((ix), &(base_binfo))); ix++) | |||
2128 | { | |||
2129 | tree new_base_binfo; | |||
2130 | new_base_binfo = copy_binfo (base_binfo, BINFO_TYPE (base_binfo)((contains_struct_check (((tree_check ((base_binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2130, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2130, __FUNCTION__))->typed.type), | |||
2131 | t, igo_prev, | |||
2132 | BINFO_VIRTUAL_P (base_binfo)((tree_check ((base_binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2132, __FUNCTION__, (TREE_BINFO)))->base.static_flag)); | |||
2133 | ||||
2134 | if (!BINFO_INHERITANCE_CHAIN (new_base_binfo)((tree_check ((new_base_binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2134, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)) | |||
2135 | BINFO_INHERITANCE_CHAIN (new_base_binfo)((tree_check ((new_base_binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2135, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance) = new_binfo; | |||
2136 | BINFO_BASE_APPEND (new_binfo, new_base_binfo)((&(tree_check ((new_binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2136, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)-> quick_push ((new_base_binfo))); | |||
2137 | } | |||
2138 | } | |||
2139 | else | |||
2140 | BINFO_DEPENDENT_BASE_P (new_binfo)((tree_not_check2 (((tree_check ((new_binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2140, __FUNCTION__, (TREE_BINFO)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2140, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3) = 1; | |||
2141 | ||||
2142 | if (virt) | |||
2143 | { | |||
2144 | /* Push it onto the list after any virtual bases it contains | |||
2145 | will have been pushed. */ | |||
2146 | CLASSTYPE_VBASECLASSES (t)((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2146, __FUNCTION__))->type_with_lang_specific.lang_specific ))->vbases)->quick_push (new_binfo); | |||
2147 | BINFO_VIRTUAL_P (new_binfo)((tree_check ((new_binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2147, __FUNCTION__, (TREE_BINFO)))->base.static_flag) = 1; | |||
2148 | BINFO_INHERITANCE_CHAIN (new_binfo)((tree_check ((new_binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2148, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance) = TYPE_BINFO (t)((tree_check3 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2148, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE )))->type_non_common.maxval); | |||
2149 | } | |||
2150 | ||||
2151 | return new_binfo; | |||
2152 | } | |||
2153 | ||||
2154 | /* Hashing of lists so that we don't make duplicates. | |||
2155 | The entry point is `list_hash_canon'. */ | |||
2156 | ||||
2157 | struct list_proxy | |||
2158 | { | |||
2159 | tree purpose; | |||
2160 | tree value; | |||
2161 | tree chain; | |||
2162 | }; | |||
2163 | ||||
2164 | struct list_hasher : ggc_ptr_hash<tree_node> | |||
2165 | { | |||
2166 | typedef list_proxy *compare_type; | |||
2167 | ||||
2168 | static hashval_t hash (tree); | |||
2169 | static bool equal (tree, list_proxy *); | |||
2170 | }; | |||
2171 | ||||
2172 | /* Now here is the hash table. When recording a list, it is added | |||
2173 | to the slot whose index is the hash code mod the table size. | |||
2174 | Note that the hash table is used for several kinds of lists. | |||
2175 | While all these live in the same table, they are completely independent, | |||
2176 | and the hash code is computed differently for each of these. */ | |||
2177 | ||||
2178 | static GTY (()) hash_table<list_hasher> *list_hash_table; | |||
2179 | ||||
2180 | /* Compare ENTRY (an entry in the hash table) with DATA (a list_proxy | |||
2181 | for a node we are thinking about adding). */ | |||
2182 | ||||
2183 | bool | |||
2184 | list_hasher::equal (tree t, list_proxy *proxy) | |||
2185 | { | |||
2186 | return (TREE_VALUE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2186, __FUNCTION__, (TREE_LIST)))->list.value) == proxy->value | |||
2187 | && TREE_PURPOSE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2187, __FUNCTION__, (TREE_LIST)))->list.purpose) == proxy->purpose | |||
2188 | && TREE_CHAIN (t)((contains_struct_check ((t), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2188, __FUNCTION__))->common.chain) == proxy->chain); | |||
2189 | } | |||
2190 | ||||
2191 | /* Compute a hash code for a list (chain of TREE_LIST nodes | |||
2192 | with goodies in the TREE_PURPOSE, TREE_VALUE, and bits of the | |||
2193 | TREE_COMMON slots), by adding the hash codes of the individual entries. */ | |||
2194 | ||||
2195 | static hashval_t | |||
2196 | list_hash_pieces (tree purpose, tree value, tree chain) | |||
2197 | { | |||
2198 | hashval_t hashcode = 0; | |||
2199 | ||||
2200 | if (chain) | |||
2201 | hashcode += TREE_HASH (chain)((size_t) (chain) & 0777777); | |||
2202 | ||||
2203 | if (value) | |||
2204 | hashcode += TREE_HASH (value)((size_t) (value) & 0777777); | |||
2205 | else | |||
2206 | hashcode += 1007; | |||
2207 | if (purpose) | |||
2208 | hashcode += TREE_HASH (purpose)((size_t) (purpose) & 0777777); | |||
2209 | else | |||
2210 | hashcode += 1009; | |||
2211 | return hashcode; | |||
2212 | } | |||
2213 | ||||
2214 | /* Hash an already existing TREE_LIST. */ | |||
2215 | ||||
2216 | hashval_t | |||
2217 | list_hasher::hash (tree t) | |||
2218 | { | |||
2219 | return list_hash_pieces (TREE_PURPOSE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2219, __FUNCTION__, (TREE_LIST)))->list.purpose), | |||
2220 | TREE_VALUE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2220, __FUNCTION__, (TREE_LIST)))->list.value), | |||
2221 | TREE_CHAIN (t)((contains_struct_check ((t), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2221, __FUNCTION__))->common.chain)); | |||
2222 | } | |||
2223 | ||||
2224 | /* Given list components PURPOSE, VALUE, AND CHAIN, return the canonical | |||
2225 | object for an identical list if one already exists. Otherwise, build a | |||
2226 | new one, and record it as the canonical object. */ | |||
2227 | ||||
2228 | tree | |||
2229 | hash_tree_cons (tree purpose, tree value, tree chain) | |||
2230 | { | |||
2231 | int hashcode = 0; | |||
2232 | tree *slot; | |||
2233 | struct list_proxy proxy; | |||
2234 | ||||
2235 | /* Hash the list node. */ | |||
2236 | hashcode = list_hash_pieces (purpose, value, chain); | |||
2237 | /* Create a proxy for the TREE_LIST we would like to create. We | |||
2238 | don't actually create it so as to avoid creating garbage. */ | |||
2239 | proxy.purpose = purpose; | |||
2240 | proxy.value = value; | |||
2241 | proxy.chain = chain; | |||
2242 | /* See if it is already in the table. */ | |||
2243 | slot = list_hash_table->find_slot_with_hash (&proxy, hashcode, INSERT); | |||
2244 | /* If not, create a new node. */ | |||
2245 | if (!*slot) | |||
2246 | *slot = tree_cons (purpose, value, chain); | |||
2247 | return (tree) *slot; | |||
2248 | } | |||
2249 | ||||
2250 | /* Constructor for hashed lists. */ | |||
2251 | ||||
2252 | tree | |||
2253 | hash_tree_chain (tree value, tree chain) | |||
2254 | { | |||
2255 | return hash_tree_cons (NULL_TREE(tree) nullptr, value, chain); | |||
2256 | } | |||
2257 | ||||
2258 | void | |||
2259 | debug_binfo (tree elem) | |||
2260 | { | |||
2261 | HOST_WIDE_INTlong n; | |||
2262 | tree virtuals; | |||
2263 | ||||
2264 | fprintf (stderrstderr, "type \"%s\", offset = " HOST_WIDE_INT_PRINT_DEC"%" "l" "d" | |||
2265 | "\nvtable type:\n", | |||
2266 | TYPE_NAME_STRING (BINFO_TYPE (elem))(((const char *) (tree_check (((((tree_class_check ((((contains_struct_check (((tree_check ((elem), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2266, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2266, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2266, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check ((((contains_struct_check (((tree_check ((elem), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2266, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2266, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2266, __FUNCTION__))->type_common.name))->base.code)) ] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check ((((contains_struct_check (((tree_check ((elem), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2266, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2266, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2266, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2266, __FUNCTION__))->decl_minimal.name) : ((tree_class_check ((((contains_struct_check (((tree_check ((elem), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2266, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2266, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2266, __FUNCTION__))->type_common.name))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2266, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.str )), | |||
2267 | TREE_INT_CST_LOW (BINFO_OFFSET (elem))((unsigned long) (*tree_int_cst_elt_check ((((tree_check ((elem ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2267, __FUNCTION__, (TREE_BINFO)))->binfo.offset)), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2267, __FUNCTION__)))); | |||
2268 | debug_tree (BINFO_TYPE (elem)((contains_struct_check (((tree_check ((elem), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2268, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2268, __FUNCTION__))->typed.type)); | |||
2269 | if (BINFO_VTABLE (elem)((tree_check ((elem), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2269, __FUNCTION__, (TREE_BINFO)))->binfo.vtable)) | |||
2270 | fprintf (stderrstderr, "vtable decl \"%s\"\n", | |||
2271 | IDENTIFIER_POINTER (DECL_NAME (get_vtbl_decl_for_binfo (elem)))((const char *) (tree_check ((((contains_struct_check ((get_vtbl_decl_for_binfo (elem)), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2271, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2271, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.str )); | |||
2272 | else | |||
2273 | fprintf (stderrstderr, "no vtable decl yet\n"); | |||
2274 | fprintf (stderrstderr, "virtuals:\n"); | |||
2275 | virtuals = BINFO_VIRTUALS (elem)((tree_check ((elem), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2275, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals); | |||
2276 | n = 0; | |||
2277 | ||||
2278 | while (virtuals) | |||
2279 | { | |||
2280 | tree fndecl = TREE_VALUE (virtuals)((tree_check ((virtuals), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2280, __FUNCTION__, (TREE_LIST)))->list.value); | |||
2281 | fprintf (stderrstderr, "%s [%ld =? %ld]\n", | |||
2282 | IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fndecl))((const char *) (tree_check ((decl_assembler_name (fndecl)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2282, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.str ), | |||
2283 | (long) n, (long) TREE_INT_CST_LOW (DECL_VINDEX (fndecl))((unsigned long) (*tree_int_cst_elt_check ((((tree_check ((fndecl ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2283, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex )), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2283, __FUNCTION__)))); | |||
2284 | ++n; | |||
2285 | virtuals = TREE_CHAIN (virtuals)((contains_struct_check ((virtuals), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2285, __FUNCTION__))->common.chain); | |||
2286 | } | |||
2287 | } | |||
2288 | ||||
2289 | /* Build a representation for the qualified name SCOPE::NAME. TYPE is | |||
2290 | the type of the result expression, if known, or NULL_TREE if the | |||
2291 | resulting expression is type-dependent. If TEMPLATE_P is true, | |||
2292 | NAME is known to be a template because the user explicitly used the | |||
2293 | "template" keyword after the "::". | |||
2294 | ||||
2295 | All SCOPE_REFs should be built by use of this function. */ | |||
2296 | ||||
2297 | tree | |||
2298 | build_qualified_name (tree type, tree scope, tree name, bool template_p) | |||
2299 | { | |||
2300 | tree t; | |||
2301 | if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK] | |||
2302 | || scope == error_mark_nodeglobal_trees[TI_ERROR_MARK] | |||
2303 | || name == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
2304 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
2305 | gcc_assert (TREE_CODE (name) != SCOPE_REF)((void)(!(((enum tree_code) (name)->base.code) != SCOPE_REF ) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2305, __FUNCTION__), 0 : 0)); | |||
2306 | t = build2 (SCOPE_REF, type, scope, name); | |||
2307 | QUALIFIED_NAME_IS_TEMPLATE (t)(((tree_not_check2 (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2307, __FUNCTION__, (SCOPE_REF)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2307, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_1)) = template_p; | |||
2308 | PTRMEM_OK_P (t)((tree_not_check2 (((tree_check3 (((t)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2308, __FUNCTION__, (ADDR_EXPR), (OFFSET_REF), (SCOPE_REF)) )), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2308, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0) = true; | |||
2309 | if (type) | |||
2310 | t = convert_from_reference (t); | |||
2311 | return t; | |||
2312 | } | |||
2313 | ||||
2314 | /* Like check_qualified_type, but also check ref-qualifier, exception | |||
2315 | specification, and whether the return type was specified after the | |||
2316 | parameters. */ | |||
2317 | ||||
2318 | static bool | |||
2319 | cp_check_qualified_type (const_tree cand, const_tree base, int type_quals, | |||
2320 | cp_ref_qualifier rqual, tree raises, bool late) | |||
2321 | { | |||
2322 | return (TYPE_QUALS (cand)((int) ((((tree_class_check ((cand), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2322, __FUNCTION__))->base.readonly_flag) * TYPE_QUAL_CONST ) | (((tree_class_check ((cand), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2322, __FUNCTION__))->base.volatile_flag) * TYPE_QUAL_VOLATILE ) | (((tree_class_check ((cand), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2322, __FUNCTION__))->base.u.bits.atomic_flag) * TYPE_QUAL_ATOMIC ) | (((tree_class_check ((cand), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2322, __FUNCTION__))->type_common.restrict_flag) * TYPE_QUAL_RESTRICT ) | (((((tree_class_check ((cand), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2322, __FUNCTION__))->base.u.bits.address_space) & 0xFF ) << 8)))) == type_quals | |||
2323 | && check_base_type (cand, base) | |||
2324 | && comp_except_specs (raises, TYPE_RAISES_EXCEPTIONS (cand)((tree_class_check (((tree_check2 ((cand), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2324, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2324, __FUNCTION__))->type_non_common.lang_1), | |||
2325 | ce_exact) | |||
2326 | && TYPE_HAS_LATE_RETURN_TYPE (cand)(((tree_class_check (((tree_check2 ((cand), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2326, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2326, __FUNCTION__))->type_common.lang_flag_2)) == late | |||
2327 | && type_memfn_rqual (cand) == rqual); | |||
2328 | } | |||
2329 | ||||
2330 | /* Build the FUNCTION_TYPE or METHOD_TYPE with the ref-qualifier RQUAL. */ | |||
2331 | ||||
2332 | tree | |||
2333 | build_ref_qualified_type (tree type, cp_ref_qualifier rqual) | |||
2334 | { | |||
2335 | tree raises = TYPE_RAISES_EXCEPTIONS (type)((tree_class_check (((tree_check2 ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2335, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2335, __FUNCTION__))->type_non_common.lang_1); | |||
2336 | bool late = TYPE_HAS_LATE_RETURN_TYPE (type)(((tree_class_check (((tree_check2 ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2336, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2336, __FUNCTION__))->type_common.lang_flag_2)); | |||
2337 | return build_cp_fntype_variant (type, rqual, raises, late); | |||
2338 | } | |||
2339 | ||||
2340 | tree | |||
2341 | make_binding_vec (tree name, unsigned clusters MEM_STAT_DECL) | |||
2342 | { | |||
2343 | /* Stored in an unsigned short, but we're limited to the number of | |||
2344 | modules anyway. */ | |||
2345 | gcc_checking_assert (clusters <= (unsigned short)(~0))((void)(!(clusters <= (unsigned short)(~0)) ? fancy_abort ( "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2345, __FUNCTION__), 0 : 0)); | |||
2346 | size_t length = (offsetof (tree_binding_vec, vec)__builtin_offsetof(tree_binding_vec, vec) | |||
2347 | + clusters * sizeof (binding_cluster)); | |||
2348 | tree vec = ggc_alloc_cleared_tree_node_stat (length PASS_MEM_STAT); | |||
2349 | TREE_SET_CODE (vec, BINDING_VECTOR)((vec)->base.code = (BINDING_VECTOR)); | |||
2350 | BINDING_VECTOR_NAME (vec)(((tree_binding_vec *)(tree_check ((vec), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2350, __FUNCTION__, (BINDING_VECTOR))))->name) = name; | |||
2351 | BINDING_VECTOR_ALLOC_CLUSTERS (vec)((tree_check ((vec), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2351, __FUNCTION__, (BINDING_VECTOR)))->base.u.dependence_info .clique) = clusters; | |||
2352 | BINDING_VECTOR_NUM_CLUSTERS (vec)((tree_check ((vec), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2352, __FUNCTION__, (BINDING_VECTOR)))->base.u.dependence_info .base) = 0; | |||
2353 | ||||
2354 | return vec; | |||
2355 | } | |||
2356 | ||||
2357 | /* Make a raw overload node containing FN. */ | |||
2358 | ||||
2359 | tree | |||
2360 | ovl_make (tree fn, tree next) | |||
2361 | { | |||
2362 | tree result = make_node (OVERLOAD); | |||
2363 | ||||
2364 | if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == OVERLOAD) | |||
2365 | OVL_NESTED_P (result)((tree_not_check2 (((tree_check ((result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2365, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2365, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3) = true; | |||
2366 | ||||
2367 | TREE_TYPE (result)((contains_struct_check ((result), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2367, __FUNCTION__))->typed.type) = (next || TREE_CODE (fn)((enum tree_code) (fn)->base.code) == TEMPLATE_DECL | |||
2368 | ? unknown_type_nodecp_global_trees[CPTI_UNKNOWN_TYPE] : TREE_TYPE (fn)((contains_struct_check ((fn), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2368, __FUNCTION__))->typed.type)); | |||
2369 | if (next && TREE_CODE (next)((enum tree_code) (next)->base.code) == OVERLOAD && OVL_DEDUP_P (next)((tree_not_check2 (((tree_check ((next), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2369, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2369, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0)) | |||
2370 | OVL_DEDUP_P (result)((tree_not_check2 (((tree_check ((result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2370, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2370, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0) = true; | |||
2371 | OVL_FUNCTION (result)(((struct tree_overload*)(tree_check ((result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2371, __FUNCTION__, (OVERLOAD))))->function) = fn; | |||
2372 | OVL_CHAIN (result)(((struct tree_overload*)(tree_check ((result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2372, __FUNCTION__, (OVERLOAD))))->common.chain) = next; | |||
2373 | return result; | |||
2374 | } | |||
2375 | ||||
2376 | /* Add FN to the (potentially NULL) overload set OVL. USING_OR_HIDDEN is > | |||
2377 | zero if this is a using-decl. It is > 1 if we're exporting the | |||
2378 | using decl. USING_OR_HIDDEN is < 0, if FN is hidden. (A decl | |||
2379 | cannot be both using and hidden.) We keep the hidden decls first, | |||
2380 | but remaining ones are unordered. */ | |||
2381 | ||||
2382 | tree | |||
2383 | ovl_insert (tree fn, tree maybe_ovl, int using_or_hidden) | |||
2384 | { | |||
2385 | tree result = maybe_ovl; | |||
2386 | tree insert_after = NULL_TREE(tree) nullptr; | |||
2387 | ||||
2388 | /* Skip hidden. */ | |||
2389 | for (; maybe_ovl && TREE_CODE (maybe_ovl)((enum tree_code) (maybe_ovl)->base.code) == OVERLOAD | |||
2390 | && OVL_HIDDEN_P (maybe_ovl)((tree_not_check2 (((tree_check ((maybe_ovl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2390, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2390, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2); | |||
2391 | maybe_ovl = OVL_CHAIN (maybe_ovl)(((struct tree_overload*)(tree_check ((maybe_ovl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2391, __FUNCTION__, (OVERLOAD))))->common.chain)) | |||
2392 | { | |||
2393 | gcc_checking_assert (!OVL_LOOKUP_P (maybe_ovl))((void)(!(!((tree_not_check2 (((tree_check ((maybe_ovl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2393, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2393, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_4)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2393, __FUNCTION__), 0 : 0)); | |||
2394 | insert_after = maybe_ovl; | |||
2395 | } | |||
2396 | ||||
2397 | if (maybe_ovl || using_or_hidden || TREE_CODE (fn)((enum tree_code) (fn)->base.code) == TEMPLATE_DECL) | |||
2398 | { | |||
2399 | maybe_ovl = ovl_make (fn, maybe_ovl); | |||
2400 | ||||
2401 | if (using_or_hidden < 0) | |||
2402 | OVL_HIDDEN_P (maybe_ovl)((tree_not_check2 (((tree_check ((maybe_ovl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2402, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2402, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2) = true; | |||
2403 | if (using_or_hidden > 0) | |||
2404 | { | |||
2405 | OVL_DEDUP_P (maybe_ovl)((tree_not_check2 (((tree_check ((maybe_ovl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2405, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2405, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0) = OVL_USING_P (maybe_ovl)((tree_not_check2 (((tree_check ((maybe_ovl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2405, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2405, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_1) = true; | |||
2406 | if (using_or_hidden > 1) | |||
2407 | OVL_EXPORT_P (maybe_ovl)((tree_not_check2 (((tree_check ((maybe_ovl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2407, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2407, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5) = true; | |||
2408 | } | |||
2409 | } | |||
2410 | else | |||
2411 | maybe_ovl = fn; | |||
2412 | ||||
2413 | if (insert_after) | |||
2414 | { | |||
2415 | OVL_CHAIN (insert_after)(((struct tree_overload*)(tree_check ((insert_after), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2415, __FUNCTION__, (OVERLOAD))))->common.chain) = maybe_ovl; | |||
2416 | TREE_TYPE (insert_after)((contains_struct_check ((insert_after), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2416, __FUNCTION__))->typed.type) = unknown_type_nodecp_global_trees[CPTI_UNKNOWN_TYPE]; | |||
2417 | } | |||
2418 | else | |||
2419 | result = maybe_ovl; | |||
2420 | ||||
2421 | return result; | |||
2422 | } | |||
2423 | ||||
2424 | /* Skip any hidden names at the beginning of OVL. */ | |||
2425 | ||||
2426 | tree | |||
2427 | ovl_skip_hidden (tree ovl) | |||
2428 | { | |||
2429 | while (ovl && TREE_CODE (ovl)((enum tree_code) (ovl)->base.code) == OVERLOAD && OVL_HIDDEN_P (ovl)((tree_not_check2 (((tree_check ((ovl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2429, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2429, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2)) | |||
2430 | ovl = OVL_CHAIN (ovl)(((struct tree_overload*)(tree_check ((ovl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2430, __FUNCTION__, (OVERLOAD))))->common.chain); | |||
2431 | ||||
2432 | return ovl; | |||
2433 | } | |||
2434 | ||||
2435 | /* NODE is an OVL_HIDDEN_P node that is now revealed. */ | |||
2436 | ||||
2437 | tree | |||
2438 | ovl_iterator::reveal_node (tree overload, tree node) | |||
2439 | { | |||
2440 | /* We cannot have returned NODE as part of a lookup overload, so we | |||
2441 | don't have to worry about preserving that. */ | |||
2442 | ||||
2443 | OVL_HIDDEN_P (node)((tree_not_check2 (((tree_check ((node), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2443, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2443, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2) = false; | |||
2444 | if (tree chain = OVL_CHAIN (node)(((struct tree_overload*)(tree_check ((node), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2444, __FUNCTION__, (OVERLOAD))))->common.chain)) | |||
2445 | if (TREE_CODE (chain)((enum tree_code) (chain)->base.code) == OVERLOAD) | |||
2446 | { | |||
2447 | if (OVL_HIDDEN_P (chain)((tree_not_check2 (((tree_check ((chain), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2447, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2447, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2)) | |||
2448 | { | |||
2449 | /* The node needs moving, and the simplest way is to remove it | |||
2450 | and reinsert. */ | |||
2451 | overload = remove_node (overload, node); | |||
2452 | overload = ovl_insert (OVL_FUNCTION (node)(((struct tree_overload*)(tree_check ((node), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2452, __FUNCTION__, (OVERLOAD))))->function), overload); | |||
2453 | } | |||
2454 | else if (OVL_DEDUP_P (chain)((tree_not_check2 (((tree_check ((chain), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2454, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2454, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0)) | |||
2455 | OVL_DEDUP_P (node)((tree_not_check2 (((tree_check ((node), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2455, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2455, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0) = true; | |||
2456 | } | |||
2457 | return overload; | |||
2458 | } | |||
2459 | ||||
2460 | /* NODE is on the overloads of OVL. Remove it. | |||
2461 | The removed node is unaltered and may continue to be iterated | |||
2462 | from (i.e. it is safe to remove a node from an overload one is | |||
2463 | currently iterating over). */ | |||
2464 | ||||
2465 | tree | |||
2466 | ovl_iterator::remove_node (tree overload, tree node) | |||
2467 | { | |||
2468 | tree *slot = &overload; | |||
2469 | while (*slot != node) | |||
2470 | { | |||
2471 | tree probe = *slot; | |||
2472 | gcc_checking_assert (!OVL_LOOKUP_P (probe))((void)(!(!((tree_not_check2 (((tree_check ((probe), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2472, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2472, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_4)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2472, __FUNCTION__), 0 : 0)); | |||
2473 | ||||
2474 | slot = &OVL_CHAIN (probe)(((struct tree_overload*)(tree_check ((probe), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2474, __FUNCTION__, (OVERLOAD))))->common.chain); | |||
2475 | } | |||
2476 | ||||
2477 | /* Stitch out NODE. We don't have to worry about now making a | |||
2478 | singleton overload (and consequently maybe setting its type), | |||
2479 | because all uses of this function will be followed by inserting a | |||
2480 | new node that must follow the place we've cut this out from. */ | |||
2481 | if (TREE_CODE (node)((enum tree_code) (node)->base.code) != OVERLOAD) | |||
2482 | /* Cloned inherited ctors don't mark themselves as via_using. */ | |||
2483 | *slot = NULL_TREE(tree) nullptr; | |||
2484 | else | |||
2485 | *slot = OVL_CHAIN (node)(((struct tree_overload*)(tree_check ((node), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2485, __FUNCTION__, (OVERLOAD))))->common.chain); | |||
2486 | ||||
2487 | return overload; | |||
2488 | } | |||
2489 | ||||
2490 | /* Mark or unmark a lookup set. */ | |||
2491 | ||||
2492 | void | |||
2493 | lookup_mark (tree ovl, bool val) | |||
2494 | { | |||
2495 | for (lkp_iterator iter (ovl); iter; ++iter) | |||
2496 | { | |||
2497 | gcc_checking_assert (LOOKUP_SEEN_P (*iter) != val)((void)(!(((*iter)->base.visited) != val) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2497, __FUNCTION__), 0 : 0)); | |||
2498 | LOOKUP_SEEN_P (*iter)((*iter)->base.visited) = val; | |||
2499 | } | |||
2500 | } | |||
2501 | ||||
2502 | /* Add a set of new FNS into a lookup. */ | |||
2503 | ||||
2504 | tree | |||
2505 | lookup_add (tree fns, tree lookup) | |||
2506 | { | |||
2507 | if (fns == error_mark_nodeglobal_trees[TI_ERROR_MARK] || lookup == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
2508 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
2509 | ||||
2510 | if (lookup || TREE_CODE (fns)((enum tree_code) (fns)->base.code) == TEMPLATE_DECL) | |||
2511 | { | |||
2512 | lookup = ovl_make (fns, lookup); | |||
2513 | OVL_LOOKUP_P (lookup)((tree_not_check2 (((tree_check ((lookup), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2513, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2513, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_4) = true; | |||
2514 | } | |||
2515 | else | |||
2516 | lookup = fns; | |||
2517 | ||||
2518 | return lookup; | |||
2519 | } | |||
2520 | ||||
2521 | /* FNS is a new overload set, add them to LOOKUP, if they are not | |||
2522 | already present there. */ | |||
2523 | ||||
2524 | tree | |||
2525 | lookup_maybe_add (tree fns, tree lookup, bool deduping) | |||
2526 | { | |||
2527 | if (deduping) | |||
2528 | for (tree next, probe = fns; probe; probe = next) | |||
2529 | { | |||
2530 | tree fn = probe; | |||
2531 | next = NULL_TREE(tree) nullptr; | |||
2532 | ||||
2533 | if (TREE_CODE (probe)((enum tree_code) (probe)->base.code) == OVERLOAD) | |||
2534 | { | |||
2535 | fn = OVL_FUNCTION (probe)(((struct tree_overload*)(tree_check ((probe), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2535, __FUNCTION__, (OVERLOAD))))->function); | |||
2536 | next = OVL_CHAIN (probe)(((struct tree_overload*)(tree_check ((probe), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2536, __FUNCTION__, (OVERLOAD))))->common.chain); | |||
2537 | } | |||
2538 | ||||
2539 | if (!LOOKUP_SEEN_P (fn)((fn)->base.visited)) | |||
2540 | LOOKUP_SEEN_P (fn)((fn)->base.visited) = true; | |||
2541 | else | |||
2542 | { | |||
2543 | /* This function was already seen. Insert all the | |||
2544 | predecessors onto the lookup. */ | |||
2545 | for (; fns != probe; fns = OVL_CHAIN (fns)(((struct tree_overload*)(tree_check ((fns), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2545, __FUNCTION__, (OVERLOAD))))->common.chain)) | |||
2546 | { | |||
2547 | lookup = lookup_add (OVL_FUNCTION (fns)(((struct tree_overload*)(tree_check ((fns), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2547, __FUNCTION__, (OVERLOAD))))->function), lookup); | |||
2548 | /* Propagate OVL_USING, but OVL_HIDDEN & | |||
2549 | OVL_DEDUP_P don't matter. */ | |||
2550 | if (OVL_USING_P (fns)((tree_not_check2 (((tree_check ((fns), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2550, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2550, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_1)) | |||
2551 | OVL_USING_P (lookup)((tree_not_check2 (((tree_check ((lookup), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2551, __FUNCTION__, (OVERLOAD)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2551, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_1) = true; | |||
2552 | } | |||
2553 | ||||
2554 | /* And now skip this function. */ | |||
2555 | fns = next; | |||
2556 | } | |||
2557 | } | |||
2558 | ||||
2559 | if (fns) | |||
2560 | /* We ended in a set of new functions. Add them all in one go. */ | |||
2561 | lookup = lookup_add (fns, lookup); | |||
2562 | ||||
2563 | return lookup; | |||
2564 | } | |||
2565 | ||||
2566 | /* Returns nonzero if X is an expression for a (possibly overloaded) | |||
2567 | function. If "f" is a function or function template, "f", "c->f", | |||
2568 | "c.f", "C::f", and "f<int>" will all be considered possibly | |||
2569 | overloaded functions. Returns 2 if the function is actually | |||
2570 | overloaded, i.e., if it is impossible to know the type of the | |||
2571 | function without performing overload resolution. */ | |||
2572 | ||||
2573 | int | |||
2574 | is_overloaded_fn (tree x) | |||
2575 | { | |||
2576 | STRIP_ANY_LOCATION_WRAPPER (x)(x) = tree_strip_any_location_wrapper ((const_cast<union tree_node *> (((x))))); | |||
2577 | ||||
2578 | /* A baselink is also considered an overloaded function. */ | |||
2579 | if (TREE_CODE (x)((enum tree_code) (x)->base.code) == OFFSET_REF | |||
2580 | || TREE_CODE (x)((enum tree_code) (x)->base.code) == COMPONENT_REF) | |||
2581 | x = TREE_OPERAND (x, 1)(*((const_cast<tree*> (tree_operand_check ((x), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2581, __FUNCTION__))))); | |||
2582 | x = MAYBE_BASELINK_FUNCTIONS (x)((((enum tree_code) (x)->base.code) == BASELINK) ? (((struct tree_baselink*) (tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2582, __FUNCTION__, (BASELINK))))->functions) : x); | |||
2583 | if (TREE_CODE (x)((enum tree_code) (x)->base.code) == TEMPLATE_ID_EXPR) | |||
2584 | x = TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2584, __FUNCTION__))))); | |||
2585 | ||||
2586 | if (DECL_FUNCTION_TEMPLATE_P (OVL_FIRST (x))(((enum tree_code) (ovl_first (x))->base.code) == TEMPLATE_DECL && ((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((ovl_first (x)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2586, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree ) nullptr && ((enum tree_code) (((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((ovl_first (x)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2586, __FUNCTION__, (TEMPLATE_DECL))))))))->result)-> base.code) == FUNCTION_DECL) | |||
2587 | || (TREE_CODE (x)((enum tree_code) (x)->base.code) == OVERLOAD && !OVL_SINGLE_P (x)(((enum tree_code) (x)->base.code) != OVERLOAD || !(((struct tree_overload*)(tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2587, __FUNCTION__, (OVERLOAD))))->common.chain)))) | |||
2588 | return 2; | |||
2589 | ||||
2590 | return OVL_P (x)(((enum tree_code) (x)->base.code) == FUNCTION_DECL || ((enum tree_code) (x)->base.code) == OVERLOAD); | |||
2591 | } | |||
2592 | ||||
2593 | /* X is the CALL_EXPR_FN of a CALL_EXPR. If X represents a dependent name | |||
2594 | (14.6.2), return the IDENTIFIER_NODE for that name. Otherwise, return | |||
2595 | NULL_TREE. */ | |||
2596 | ||||
2597 | tree | |||
2598 | dependent_name (tree x) | |||
2599 | { | |||
2600 | /* FIXME a dependent name must be unqualified, but this function doesn't | |||
2601 | distinguish between qualified and unqualified identifiers. */ | |||
2602 | if (identifier_p (x)) | |||
2603 | return x; | |||
2604 | if (TREE_CODE (x)((enum tree_code) (x)->base.code) == TEMPLATE_ID_EXPR) | |||
2605 | x = TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2605, __FUNCTION__))))); | |||
2606 | if (OVL_P (x)(((enum tree_code) (x)->base.code) == FUNCTION_DECL || ((enum tree_code) (x)->base.code) == OVERLOAD)) | |||
2607 | return OVL_NAME (x)((contains_struct_check ((ovl_first (x)), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2607, __FUNCTION__))->decl_minimal.name); | |||
2608 | return NULL_TREE(tree) nullptr; | |||
2609 | } | |||
2610 | ||||
2611 | /* Like dependent_name, but instead takes a CALL_EXPR and also checks | |||
2612 | its dependence. */ | |||
2613 | ||||
2614 | tree | |||
2615 | call_expr_dependent_name (tree x) | |||
2616 | { | |||
2617 | if (TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2617, __FUNCTION__))->typed.type) != NULL_TREE(tree) nullptr) | |||
2618 | /* X isn't dependent, so its callee isn't a dependent name. */ | |||
2619 | return NULL_TREE(tree) nullptr; | |||
2620 | return dependent_name (CALL_EXPR_FN (x)(*((const_cast<tree*> (tree_operand_check (((tree_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2620, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2620, __FUNCTION__)))))); | |||
2621 | } | |||
2622 | ||||
2623 | /* Returns true iff X is an expression for an overloaded function | |||
2624 | whose type cannot be known without performing overload | |||
2625 | resolution. */ | |||
2626 | ||||
2627 | bool | |||
2628 | really_overloaded_fn (tree x) | |||
2629 | { | |||
2630 | return is_overloaded_fn (x) == 2; | |||
2631 | } | |||
2632 | ||||
2633 | /* Get the overload set FROM refers to. Returns NULL if it's not an | |||
2634 | overload set. */ | |||
2635 | ||||
2636 | tree | |||
2637 | maybe_get_fns (tree from) | |||
2638 | { | |||
2639 | STRIP_ANY_LOCATION_WRAPPER (from)(from) = tree_strip_any_location_wrapper ((const_cast<union tree_node *> (((from))))); | |||
2640 | ||||
2641 | /* A baselink is also considered an overloaded function. */ | |||
2642 | if (TREE_CODE (from)((enum tree_code) (from)->base.code) == OFFSET_REF | |||
2643 | || TREE_CODE (from)((enum tree_code) (from)->base.code) == COMPONENT_REF) | |||
2644 | from = TREE_OPERAND (from, 1)(*((const_cast<tree*> (tree_operand_check ((from), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2644, __FUNCTION__))))); | |||
2645 | if (BASELINK_P (from)(((enum tree_code) (from)->base.code) == BASELINK)) | |||
2646 | from = BASELINK_FUNCTIONS (from)(((struct tree_baselink*) (tree_check ((from), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2646, __FUNCTION__, (BASELINK))))->functions); | |||
2647 | if (TREE_CODE (from)((enum tree_code) (from)->base.code) == TEMPLATE_ID_EXPR) | |||
2648 | from = TREE_OPERAND (from, 0)(*((const_cast<tree*> (tree_operand_check ((from), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2648, __FUNCTION__))))); | |||
2649 | ||||
2650 | if (OVL_P (from)(((enum tree_code) (from)->base.code) == FUNCTION_DECL || ( (enum tree_code) (from)->base.code) == OVERLOAD)) | |||
2651 | return from; | |||
2652 | ||||
2653 | return NULLnullptr; | |||
2654 | } | |||
2655 | ||||
2656 | /* FROM refers to an overload set. Return that set (or die). */ | |||
2657 | ||||
2658 | tree | |||
2659 | get_fns (tree from) | |||
2660 | { | |||
2661 | tree res = maybe_get_fns (from); | |||
2662 | ||||
2663 | gcc_assert (res)((void)(!(res) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2663, __FUNCTION__), 0 : 0)); | |||
2664 | return res; | |||
2665 | } | |||
2666 | ||||
2667 | /* Return the first function of the overload set FROM refers to. */ | |||
2668 | ||||
2669 | tree | |||
2670 | get_first_fn (tree from) | |||
2671 | { | |||
2672 | return OVL_FIRST (get_fns (from))ovl_first (get_fns (from)); | |||
2673 | } | |||
2674 | ||||
2675 | /* Return the scope where the overloaded functions OVL were found. */ | |||
2676 | ||||
2677 | tree | |||
2678 | ovl_scope (tree ovl) | |||
2679 | { | |||
2680 | if (TREE_CODE (ovl)((enum tree_code) (ovl)->base.code) == OFFSET_REF | |||
2681 | || TREE_CODE (ovl)((enum tree_code) (ovl)->base.code) == COMPONENT_REF) | |||
2682 | ovl = TREE_OPERAND (ovl, 1)(*((const_cast<tree*> (tree_operand_check ((ovl), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2682, __FUNCTION__))))); | |||
2683 | if (TREE_CODE (ovl)((enum tree_code) (ovl)->base.code) == BASELINK) | |||
2684 | return BINFO_TYPE (BASELINK_BINFO (ovl))((contains_struct_check (((tree_check (((((struct tree_baselink *) (tree_check ((ovl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2684, __FUNCTION__, (BASELINK))))->binfo)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2684, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2684, __FUNCTION__))->typed.type); | |||
2685 | if (TREE_CODE (ovl)((enum tree_code) (ovl)->base.code) == TEMPLATE_ID_EXPR) | |||
2686 | ovl = TREE_OPERAND (ovl, 0)(*((const_cast<tree*> (tree_operand_check ((ovl), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2686, __FUNCTION__))))); | |||
2687 | /* Skip using-declarations. */ | |||
2688 | lkp_iterator iter (ovl); | |||
2689 | do | |||
2690 | ovl = *iter; | |||
2691 | while (iter.using_p () && ++iter); | |||
2692 | ||||
2693 | return CP_DECL_CONTEXT (ovl)(!(! (((contains_struct_check ((ovl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2693, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code ) (((contains_struct_check ((ovl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2693, __FUNCTION__))->decl_minimal.context))->base.code ) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((ovl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2693, __FUNCTION__))->decl_minimal.context) : cp_global_trees [CPTI_GLOBAL]); | |||
2694 | } | |||
2695 | ||||
2696 | #define PRINT_RING_SIZE4 4 | |||
2697 | ||||
2698 | static const char * | |||
2699 | cxx_printable_name_internal (tree decl, int v, bool translate) | |||
2700 | { | |||
2701 | static unsigned int uid_ring[PRINT_RING_SIZE4]; | |||
2702 | static char *print_ring[PRINT_RING_SIZE4]; | |||
2703 | static bool trans_ring[PRINT_RING_SIZE4]; | |||
2704 | static int ring_counter; | |||
2705 | int i; | |||
2706 | ||||
2707 | /* Only cache functions. */ | |||
2708 | if (v < 2 | |||
2709 | || TREE_CODE (decl)((enum tree_code) (decl)->base.code) != FUNCTION_DECL | |||
2710 | || DECL_LANG_SPECIFIC (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2710, __FUNCTION__))->decl_common.lang_specific) == 0) | |||
2711 | return lang_decl_name (decl, v, translate); | |||
2712 | ||||
2713 | /* See if this print name is lying around. */ | |||
2714 | for (i = 0; i < PRINT_RING_SIZE4; i++) | |||
2715 | if (uid_ring[i] == DECL_UID (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2715, __FUNCTION__))->decl_minimal.uid) && translate == trans_ring[i]) | |||
2716 | /* yes, so return it. */ | |||
2717 | return print_ring[i]; | |||
2718 | ||||
2719 | if (++ring_counter == PRINT_RING_SIZE4) | |||
2720 | ring_counter = 0; | |||
2721 | ||||
2722 | if (current_function_decl != NULL_TREE(tree) nullptr) | |||
2723 | { | |||
2724 | /* There may be both translated and untranslated versions of the | |||
2725 | name cached. */ | |||
2726 | for (i = 0; i < 2; i++) | |||
2727 | { | |||
2728 | if (uid_ring[ring_counter] == DECL_UID (current_function_decl)((contains_struct_check ((current_function_decl), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2728, __FUNCTION__))->decl_minimal.uid)) | |||
2729 | ring_counter += 1; | |||
2730 | if (ring_counter == PRINT_RING_SIZE4) | |||
2731 | ring_counter = 0; | |||
2732 | } | |||
2733 | gcc_assert (uid_ring[ring_counter] != DECL_UID (current_function_decl))((void)(!(uid_ring[ring_counter] != ((contains_struct_check ( (current_function_decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2733, __FUNCTION__))->decl_minimal.uid)) ? fancy_abort ( "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2733, __FUNCTION__), 0 : 0)); | |||
2734 | } | |||
2735 | ||||
2736 | free (print_ring[ring_counter]); | |||
2737 | ||||
2738 | print_ring[ring_counter] = xstrdup (lang_decl_name (decl, v, translate)); | |||
2739 | uid_ring[ring_counter] = DECL_UID (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2739, __FUNCTION__))->decl_minimal.uid); | |||
2740 | trans_ring[ring_counter] = translate; | |||
2741 | return print_ring[ring_counter]; | |||
2742 | } | |||
2743 | ||||
2744 | const char * | |||
2745 | cxx_printable_name (tree decl, int v) | |||
2746 | { | |||
2747 | return cxx_printable_name_internal (decl, v, false); | |||
2748 | } | |||
2749 | ||||
2750 | const char * | |||
2751 | cxx_printable_name_translate (tree decl, int v) | |||
2752 | { | |||
2753 | return cxx_printable_name_internal (decl, v, true); | |||
2754 | } | |||
2755 | ||||
2756 | /* Return the canonical version of exception-specification RAISES for a C++17 | |||
2757 | function type, for use in type comparison and building TYPE_CANONICAL. */ | |||
2758 | ||||
2759 | tree | |||
2760 | canonical_eh_spec (tree raises) | |||
2761 | { | |||
2762 | if (raises == NULL_TREE(tree) nullptr) | |||
2763 | return raises; | |||
2764 | else if (DEFERRED_NOEXCEPT_SPEC_P (raises)((raises) && (((tree_check ((raises), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2764, __FUNCTION__, (TREE_LIST)))->list.purpose)) && (((enum tree_code) (((tree_check ((raises), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2764, __FUNCTION__, (TREE_LIST)))->list.purpose))->base .code) == DEFERRED_NOEXCEPT)) | |||
2765 | || UNPARSED_NOEXCEPT_SPEC_P (raises)((raises) && (((tree_check ((raises), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2765, __FUNCTION__, (TREE_LIST)))->list.purpose)) && (((enum tree_code) (((tree_check ((raises), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2765, __FUNCTION__, (TREE_LIST)))->list.purpose))->base .code) == DEFERRED_PARSE)) | |||
2766 | || uses_template_parms (raises) | |||
2767 | || uses_template_parms (TREE_PURPOSE (raises)((tree_check ((raises), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2767, __FUNCTION__, (TREE_LIST)))->list.purpose))) | |||
2768 | /* Keep a dependent or deferred exception specification. */ | |||
2769 | return raises; | |||
2770 | else if (nothrow_spec_p (raises)) | |||
2771 | /* throw() -> noexcept. */ | |||
2772 | return noexcept_true_speccp_global_trees[CPTI_NOEXCEPT_TRUE_SPEC]; | |||
2773 | else | |||
2774 | /* For C++17 type matching, anything else -> nothing. */ | |||
2775 | return NULL_TREE(tree) nullptr; | |||
2776 | } | |||
2777 | ||||
2778 | tree | |||
2779 | build_cp_fntype_variant (tree type, cp_ref_qualifier rqual, | |||
2780 | tree raises, bool late) | |||
2781 | { | |||
2782 | cp_cv_quals type_quals = TYPE_QUALS (type)((int) ((((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2782, __FUNCTION__))->base.readonly_flag) * TYPE_QUAL_CONST ) | (((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2782, __FUNCTION__))->base.volatile_flag) * TYPE_QUAL_VOLATILE ) | (((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2782, __FUNCTION__))->base.u.bits.atomic_flag) * TYPE_QUAL_ATOMIC ) | (((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2782, __FUNCTION__))->type_common.restrict_flag) * TYPE_QUAL_RESTRICT ) | (((((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2782, __FUNCTION__))->base.u.bits.address_space) & 0xFF ) << 8)))); | |||
2783 | ||||
2784 | if (cp_check_qualified_type (type, type, type_quals, rqual, raises, late)) | |||
2785 | return type; | |||
2786 | ||||
2787 | tree v = TYPE_MAIN_VARIANT (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2787, __FUNCTION__))->type_common.main_variant); | |||
2788 | for (; v; v = TYPE_NEXT_VARIANT (v)((tree_class_check ((v), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2788, __FUNCTION__))->type_common.next_variant)) | |||
2789 | if (cp_check_qualified_type (v, type, type_quals, rqual, raises, late)) | |||
2790 | return v; | |||
2791 | ||||
2792 | /* Need to build a new variant. */ | |||
2793 | v = build_variant_type_copy (type); | |||
2794 | if (!TYPE_DEPENDENT_P (v)((tree_class_check ((v), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2794, __FUNCTION__))->type_common.lang_flag_0)) | |||
2795 | /* We no longer know that it's not type-dependent. */ | |||
2796 | TYPE_DEPENDENT_P_VALID (v)((tree_class_check ((v), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2796, __FUNCTION__))->type_common.lang_flag_6) = false; | |||
2797 | TYPE_RAISES_EXCEPTIONS (v)((tree_class_check (((tree_check2 ((v), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2797, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2797, __FUNCTION__))->type_non_common.lang_1) = raises; | |||
2798 | TYPE_HAS_LATE_RETURN_TYPE (v)(((tree_class_check (((tree_check2 ((v), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2798, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2798, __FUNCTION__))->type_common.lang_flag_2)) = late; | |||
2799 | switch (rqual) | |||
2800 | { | |||
2801 | case REF_QUAL_RVALUE: | |||
2802 | FUNCTION_RVALUE_QUALIFIED (v)((tree_not_check2 (((tree_check2 ((v), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2802, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2802, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5) = 1; | |||
2803 | FUNCTION_REF_QUALIFIED (v)((tree_not_check2 (((tree_check2 ((v), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2803, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2803, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_4) = 1; | |||
2804 | break; | |||
2805 | case REF_QUAL_LVALUE: | |||
2806 | FUNCTION_RVALUE_QUALIFIED (v)((tree_not_check2 (((tree_check2 ((v), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2806, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2806, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5) = 0; | |||
2807 | FUNCTION_REF_QUALIFIED (v)((tree_not_check2 (((tree_check2 ((v), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2807, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2807, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_4) = 1; | |||
2808 | break; | |||
2809 | default: | |||
2810 | FUNCTION_REF_QUALIFIED (v)((tree_not_check2 (((tree_check2 ((v), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2810, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2810, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_4) = 0; | |||
2811 | break; | |||
2812 | } | |||
2813 | ||||
2814 | /* Canonicalize the exception specification. */ | |||
2815 | tree cr = flag_noexcept_type ? canonical_eh_spec (raises) : NULL_TREE(tree) nullptr; | |||
2816 | ||||
2817 | if (TYPE_STRUCTURAL_EQUALITY_P (type)(((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2817, __FUNCTION__))->type_common.canonical) == (tree) nullptr )) | |||
2818 | /* Propagate structural equality. */ | |||
2819 | SET_TYPE_STRUCTURAL_EQUALITY (v)(((tree_class_check ((v), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2819, __FUNCTION__))->type_common.canonical) = (tree) nullptr ); | |||
2820 | else if (TYPE_CANONICAL (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2820, __FUNCTION__))->type_common.canonical) != type || cr != raises || late) | |||
2821 | /* Build the underlying canonical type, since it is different | |||
2822 | from TYPE. */ | |||
2823 | TYPE_CANONICAL (v)((tree_class_check ((v), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2823, __FUNCTION__))->type_common.canonical) = build_cp_fntype_variant (TYPE_CANONICAL (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2823, __FUNCTION__))->type_common.canonical), | |||
2824 | rqual, cr, false); | |||
2825 | else | |||
2826 | /* T is its own canonical type. */ | |||
2827 | TYPE_CANONICAL (v)((tree_class_check ((v), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2827, __FUNCTION__))->type_common.canonical) = v; | |||
2828 | ||||
2829 | return v; | |||
2830 | } | |||
2831 | ||||
2832 | /* TYPE is a function or method type with a deferred exception | |||
2833 | specification that has been parsed to RAISES. Fixup all the type | |||
2834 | variants that are affected in place. Via decltype &| noexcept | |||
2835 | tricks, the unparsed spec could have escaped into the type system. | |||
2836 | The general case is hard to fixup canonical types for. */ | |||
2837 | ||||
2838 | void | |||
2839 | fixup_deferred_exception_variants (tree type, tree raises) | |||
2840 | { | |||
2841 | tree original = TYPE_RAISES_EXCEPTIONS (type)((tree_class_check (((tree_check2 ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2841, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2841, __FUNCTION__))->type_non_common.lang_1); | |||
2842 | tree cr = flag_noexcept_type ? canonical_eh_spec (raises) : NULL_TREE(tree) nullptr; | |||
2843 | ||||
2844 | gcc_checking_assert (UNPARSED_NOEXCEPT_SPEC_P (original))((void)(!(((original) && (((tree_check ((original), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2844, __FUNCTION__, (TREE_LIST)))->list.purpose)) && (((enum tree_code) (((tree_check ((original), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2844, __FUNCTION__, (TREE_LIST)))->list.purpose))->base .code) == DEFERRED_PARSE))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2844, __FUNCTION__), 0 : 0)); | |||
2845 | ||||
2846 | /* Though sucky, this walk will process the canonical variants | |||
2847 | first. */ | |||
2848 | tree prev = NULL_TREE(tree) nullptr; | |||
2849 | for (tree variant = TYPE_MAIN_VARIANT (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2849, __FUNCTION__))->type_common.main_variant); | |||
2850 | variant; prev = variant, variant = TYPE_NEXT_VARIANT (variant)((tree_class_check ((variant), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2850, __FUNCTION__))->type_common.next_variant)) | |||
2851 | if (TYPE_RAISES_EXCEPTIONS (variant)((tree_class_check (((tree_check2 ((variant), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2851, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2851, __FUNCTION__))->type_non_common.lang_1) == original) | |||
2852 | { | |||
2853 | gcc_checking_assert (variant != TYPE_MAIN_VARIANT (type))((void)(!(variant != ((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2853, __FUNCTION__))->type_common.main_variant)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2853, __FUNCTION__), 0 : 0)); | |||
2854 | ||||
2855 | if (!TYPE_STRUCTURAL_EQUALITY_P (variant)(((tree_class_check ((variant), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2855, __FUNCTION__))->type_common.canonical) == (tree) nullptr )) | |||
2856 | { | |||
2857 | cp_cv_quals var_quals = TYPE_QUALS (variant)((int) ((((tree_class_check ((variant), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2857, __FUNCTION__))->base.readonly_flag) * TYPE_QUAL_CONST ) | (((tree_class_check ((variant), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2857, __FUNCTION__))->base.volatile_flag) * TYPE_QUAL_VOLATILE ) | (((tree_class_check ((variant), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2857, __FUNCTION__))->base.u.bits.atomic_flag) * TYPE_QUAL_ATOMIC ) | (((tree_class_check ((variant), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2857, __FUNCTION__))->type_common.restrict_flag) * TYPE_QUAL_RESTRICT ) | (((((tree_class_check ((variant), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2857, __FUNCTION__))->base.u.bits.address_space) & 0xFF ) << 8)))); | |||
2858 | cp_ref_qualifier rqual = type_memfn_rqual (variant); | |||
2859 | ||||
2860 | /* If VARIANT would become a dup (cp_check_qualified_type-wise) | |||
2861 | of an existing variant in the variant list of TYPE after its | |||
2862 | exception specification has been parsed, elide it. Otherwise, | |||
2863 | build_cp_fntype_variant could use it, leading to "canonical | |||
2864 | types differ for identical types." */ | |||
2865 | tree v = TYPE_MAIN_VARIANT (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2865, __FUNCTION__))->type_common.main_variant); | |||
2866 | for (; v; v = TYPE_NEXT_VARIANT (v)((tree_class_check ((v), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2866, __FUNCTION__))->type_common.next_variant)) | |||
2867 | if (cp_check_qualified_type (v, variant, var_quals, | |||
2868 | rqual, cr, false)) | |||
2869 | { | |||
2870 | /* The main variant will not match V, so PREV will never | |||
2871 | be null. */ | |||
2872 | TYPE_NEXT_VARIANT (prev)((tree_class_check ((prev), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2872, __FUNCTION__))->type_common.next_variant) = TYPE_NEXT_VARIANT (variant)((tree_class_check ((variant), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2872, __FUNCTION__))->type_common.next_variant); | |||
2873 | break; | |||
2874 | } | |||
2875 | TYPE_RAISES_EXCEPTIONS (variant)((tree_class_check (((tree_check2 ((variant), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2875, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2875, __FUNCTION__))->type_non_common.lang_1) = raises; | |||
2876 | ||||
2877 | if (!v) | |||
2878 | v = build_cp_fntype_variant (TYPE_CANONICAL (variant)((tree_class_check ((variant), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2878, __FUNCTION__))->type_common.canonical), | |||
2879 | rqual, cr, false); | |||
2880 | TYPE_CANONICAL (variant)((tree_class_check ((variant), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2880, __FUNCTION__))->type_common.canonical) = TYPE_CANONICAL (v)((tree_class_check ((v), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2880, __FUNCTION__))->type_common.canonical); | |||
2881 | } | |||
2882 | else | |||
2883 | TYPE_RAISES_EXCEPTIONS (variant)((tree_class_check (((tree_check2 ((variant), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2883, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2883, __FUNCTION__))->type_non_common.lang_1) = raises; | |||
2884 | ||||
2885 | if (!TYPE_DEPENDENT_P (variant)((tree_class_check ((variant), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2885, __FUNCTION__))->type_common.lang_flag_0)) | |||
2886 | /* We no longer know that it's not type-dependent. */ | |||
2887 | TYPE_DEPENDENT_P_VALID (variant)((tree_class_check ((variant), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2887, __FUNCTION__))->type_common.lang_flag_6) = false; | |||
2888 | } | |||
2889 | } | |||
2890 | ||||
2891 | /* Build the FUNCTION_TYPE or METHOD_TYPE which may throw exceptions | |||
2892 | listed in RAISES. */ | |||
2893 | ||||
2894 | tree | |||
2895 | build_exception_variant (tree type, tree raises) | |||
2896 | { | |||
2897 | cp_ref_qualifier rqual = type_memfn_rqual (type); | |||
2898 | bool late = TYPE_HAS_LATE_RETURN_TYPE (type)(((tree_class_check (((tree_check2 ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2898, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2898, __FUNCTION__))->type_common.lang_flag_2)); | |||
2899 | return build_cp_fntype_variant (type, rqual, raises, late); | |||
2900 | } | |||
2901 | ||||
2902 | /* Given a TEMPLATE_TEMPLATE_PARM node T, create a new | |||
2903 | BOUND_TEMPLATE_TEMPLATE_PARM bound with NEWARGS as its template | |||
2904 | arguments. */ | |||
2905 | ||||
2906 | tree | |||
2907 | bind_template_template_parm (tree t, tree newargs) | |||
2908 | { | |||
2909 | tree decl = TYPE_NAME (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2909, __FUNCTION__))->type_common.name); | |||
2910 | tree t2; | |||
2911 | ||||
2912 | t2 = cxx_make_type (BOUND_TEMPLATE_TEMPLATE_PARM); | |||
2913 | decl = build_decl (input_location, | |||
2914 | TYPE_DECL, DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2914, __FUNCTION__))->decl_minimal.name), NULL_TREE(tree) nullptr); | |||
2915 | SET_DECL_TEMPLATE_PARM_P (decl)(((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2915, __FUNCTION__))->decl_common.lang_flag_0) = 1); | |||
2916 | ||||
2917 | /* These nodes have to be created to reflect new TYPE_DECL and template | |||
2918 | arguments. */ | |||
2919 | TEMPLATE_TYPE_PARM_INDEX (t2)(((tree_class_check (((tree_check3 (((t2)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2919, __FUNCTION__, (TEMPLATE_TYPE_PARM), (TEMPLATE_TEMPLATE_PARM ), (BOUND_TEMPLATE_TEMPLATE_PARM)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2919, __FUNCTION__))->type_non_common.values)) = copy_node (TEMPLATE_TYPE_PARM_INDEX (t)(((tree_class_check (((tree_check3 (((t)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2919, __FUNCTION__, (TEMPLATE_TYPE_PARM), (TEMPLATE_TEMPLATE_PARM ), (BOUND_TEMPLATE_TEMPLATE_PARM)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2919, __FUNCTION__))->type_non_common.values))); | |||
2920 | TEMPLATE_PARM_DECL (TEMPLATE_TYPE_PARM_INDEX (t2))(((template_parm_index*)(tree_check (((((tree_class_check ((( tree_check3 (((t2)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2920, __FUNCTION__, (TEMPLATE_TYPE_PARM), (TEMPLATE_TEMPLATE_PARM ), (BOUND_TEMPLATE_TEMPLATE_PARM)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2920, __FUNCTION__))->type_non_common.values))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2920, __FUNCTION__, (TEMPLATE_PARM_INDEX))))->decl) = decl; | |||
2921 | TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (t2)(((tree_class_check (((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2921, __FUNCTION__, (BOUND_TEMPLATE_TEMPLATE_PARM)))), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2921, __FUNCTION__))->type_non_common.lang_1)) | |||
2922 | = build_template_info (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL (t)((((enum tree_code) (t)->base.code) == BOUND_TEMPLATE_TEMPLATE_PARM ) ? (((struct tree_template_info*)(tree_check (((((enum tree_code ) (t)->base.code) == ENUMERAL_TYPE || ((enum tree_code) (t )->base.code) == BOUND_TEMPLATE_TEMPLATE_PARM || (((enum tree_code ) (t)->base.code) == RECORD_TYPE || ((enum tree_code) (t)-> base.code) == UNION_TYPE || ((enum tree_code) (t)->base.code ) == QUAL_UNION_TYPE) ? ((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2922, __FUNCTION__))->type_non_common.lang_1) : (tree) nullptr )), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2922, __FUNCTION__, (TEMPLATE_INFO))))->tmpl) : ((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2922, __FUNCTION__))->type_common.name)), newargs); | |||
2923 | ||||
2924 | TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2924, __FUNCTION__))->typed.type) = t2; | |||
2925 | TYPE_NAME (t2)((tree_class_check ((t2), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2925, __FUNCTION__))->type_common.name) = decl; | |||
2926 | TYPE_STUB_DECL (t2)(((contains_struct_check (((tree_class_check ((t2), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2926, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2926, __FUNCTION__))->common.chain)) = decl; | |||
2927 | TYPE_SIZE (t2)((tree_class_check ((t2), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2927, __FUNCTION__))->type_common.size) = 0; | |||
2928 | ||||
2929 | if (any_template_arguments_need_structural_equality_p (newargs)) | |||
2930 | SET_TYPE_STRUCTURAL_EQUALITY (t2)(((tree_class_check ((t2), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2930, __FUNCTION__))->type_common.canonical) = (tree) nullptr ); | |||
2931 | else | |||
2932 | TYPE_CANONICAL (t2)((tree_class_check ((t2), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2932, __FUNCTION__))->type_common.canonical) = canonical_type_parameter (t2); | |||
2933 | ||||
2934 | return t2; | |||
2935 | } | |||
2936 | ||||
2937 | /* Called from count_trees via walk_tree. */ | |||
2938 | ||||
2939 | static tree | |||
2940 | count_trees_r (tree *tp, int *walk_subtrees, void *data) | |||
2941 | { | |||
2942 | ++*((int *) data); | |||
2943 | ||||
2944 | if (TYPE_P (*tp)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (*tp)->base.code))] == tcc_type)) | |||
2945 | *walk_subtrees = 0; | |||
2946 | ||||
2947 | return NULL_TREE(tree) nullptr; | |||
2948 | } | |||
2949 | ||||
2950 | /* Debugging function for measuring the rough complexity of a tree | |||
2951 | representation. */ | |||
2952 | ||||
2953 | int | |||
2954 | count_trees (tree t) | |||
2955 | { | |||
2956 | int n_trees = 0; | |||
2957 | cp_walk_tree_without_duplicates (&t, count_trees_r, &n_trees)walk_tree_without_duplicates_1 (&t, count_trees_r, &n_trees , cp_walk_subtrees); | |||
2958 | return n_trees; | |||
2959 | } | |||
2960 | ||||
2961 | /* Called from verify_stmt_tree via walk_tree. */ | |||
2962 | ||||
2963 | static tree | |||
2964 | verify_stmt_tree_r (tree* tp, int * /*walk_subtrees*/, void* data) | |||
2965 | { | |||
2966 | tree t = *tp; | |||
2967 | hash_table<nofree_ptr_hash <tree_node> > *statements | |||
2968 | = static_cast <hash_table<nofree_ptr_hash <tree_node> > *> (data); | |||
2969 | tree_node **slot; | |||
2970 | ||||
2971 | if (!STATEMENT_CODE_P (TREE_CODE (t))statement_code_p[(int) (((enum tree_code) (t)->base.code)) ]) | |||
2972 | return NULL_TREE(tree) nullptr; | |||
2973 | ||||
2974 | /* If this statement is already present in the hash table, then | |||
2975 | there is a circularity in the statement tree. */ | |||
2976 | gcc_assert (!statements->find (t))((void)(!(!statements->find (t)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 2976, __FUNCTION__), 0 : 0)); | |||
2977 | ||||
2978 | slot = statements->find_slot (t, INSERT); | |||
2979 | *slot = t; | |||
2980 | ||||
2981 | return NULL_TREE(tree) nullptr; | |||
2982 | } | |||
2983 | ||||
2984 | /* Debugging function to check that the statement T has not been | |||
2985 | corrupted. For now, this function simply checks that T contains no | |||
2986 | circularities. */ | |||
2987 | ||||
2988 | void | |||
2989 | verify_stmt_tree (tree t) | |||
2990 | { | |||
2991 | hash_table<nofree_ptr_hash <tree_node> > statements (37); | |||
2992 | cp_walk_tree (&t, verify_stmt_tree_r, &statements, NULL)walk_tree_1 (&t, verify_stmt_tree_r, &statements, nullptr , cp_walk_subtrees); | |||
2993 | } | |||
2994 | ||||
2995 | /* Check if the type T depends on a type with no linkage and if so, | |||
2996 | return it. If RELAXED_P then do not consider a class type declared | |||
2997 | within a vague-linkage function to have no linkage. Remember: | |||
2998 | no-linkage is not the same as internal-linkage. */ | |||
2999 | ||||
3000 | tree | |||
3001 | no_linkage_check (tree t, bool relaxed_p) | |||
3002 | { | |||
3003 | tree r; | |||
3004 | ||||
3005 | /* Lambda types that don't have mangling scope have no linkage. We | |||
3006 | check CLASSTYPE_LAMBDA_EXPR for error_mark_node because | |||
3007 | when we get here from pushtag none of the lambda information is | |||
3008 | set up yet, so we want to assume that the lambda has linkage and | |||
3009 | fix it up later if not. We need to check this even in templates so | |||
3010 | that we properly handle a lambda-expression in the signature. */ | |||
3011 | if (LAMBDA_TYPE_P (t)(((enum tree_code) (t)->base.code) == RECORD_TYPE && ((((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.name))->base.code)) ] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->decl_minimal.name) : ((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.name))) && ((tree_check ((((((tree_class_check ((((tree_class_check ((t), (tcc_type) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.name))->base.code)) ] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->decl_minimal.name) : ((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3011, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag )) | |||
3012 | && CLASSTYPE_LAMBDA_EXPR (t)((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3012, __FUNCTION__))->type_with_lang_specific.lang_specific ))->lambda_expr) != error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
3013 | { | |||
3014 | tree extra = LAMBDA_TYPE_EXTRA_SCOPE (t)((((struct tree_lambda_expr *)(tree_check ((((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3014, __FUNCTION__))->type_with_lang_specific.lang_specific ))->lambda_expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3014, __FUNCTION__, (LAMBDA_EXPR))))->extra_scope)); | |||
3015 | if (!extra) | |||
3016 | return t; | |||
3017 | } | |||
3018 | ||||
3019 | /* Otherwise there's no point in checking linkage on template functions; we | |||
3020 | can't know their complete types. */ | |||
3021 | if (processing_template_declscope_chain->x_processing_template_decl) | |||
3022 | return NULL_TREE(tree) nullptr; | |||
3023 | ||||
3024 | switch (TREE_CODE (t)((enum tree_code) (t)->base.code)) | |||
3025 | { | |||
3026 | case RECORD_TYPE: | |||
3027 | if (TYPE_PTRMEMFUNC_P (t)(((enum tree_code) (t)->base.code) == RECORD_TYPE && (((tree_class_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3027, __FUNCTION__, (RECORD_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3027, __FUNCTION__))->type_common.lang_flag_2)))) | |||
3028 | goto ptrmem; | |||
3029 | /* Fall through. */ | |||
3030 | case UNION_TYPE: | |||
3031 | if (!CLASS_TYPE_P (t)(((((enum tree_code) (t)->base.code)) == RECORD_TYPE || (( (enum tree_code) (t)->base.code)) == UNION_TYPE) && ((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3031, __FUNCTION__))->type_common.lang_flag_5))) | |||
3032 | return NULL_TREE(tree) nullptr; | |||
3033 | /* Fall through. */ | |||
3034 | case ENUMERAL_TYPE: | |||
3035 | /* Only treat unnamed types as having no linkage if they're at | |||
3036 | namespace scope. This is core issue 966. */ | |||
3037 | if (TYPE_UNNAMED_P (t)((((((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.name))->base.code)) ] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->decl_minimal.name) : ((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.name))) && ((tree_check ((((((tree_class_check ((((tree_class_check ((t), (tcc_type) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.name))->base.code)) ] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->decl_minimal.name) : ((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__, (IDENTIFIER_NODE)))->base.private_flag )) && !((tree_check ((((((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.name))->base.code)) ] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->decl_minimal.name) : ((tree_class_check ((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag )) && TYPE_NAMESPACE_SCOPE_P (t)(((enum tree_code) ((!(! (((tree_class_check ((t), (tcc_type) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.context)) || ((enum tree_code ) (((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.context))->base.code ) == TRANSLATION_UNIT_DECL) ? ((tree_class_check ((t), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3037, __FUNCTION__))->type_common.context) : cp_global_trees [CPTI_GLOBAL]))->base.code) == NAMESPACE_DECL)) | |||
3038 | return t; | |||
3039 | ||||
3040 | for (r = CP_TYPE_CONTEXT (t)(!(! (((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3040, __FUNCTION__))->type_common.context)) || ((enum tree_code ) (((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3040, __FUNCTION__))->type_common.context))->base.code ) == TRANSLATION_UNIT_DECL) ? ((tree_class_check ((t), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3040, __FUNCTION__))->type_common.context) : cp_global_trees [CPTI_GLOBAL]); ; ) | |||
3041 | { | |||
3042 | /* If we're a nested type of a !TREE_PUBLIC class, we might not | |||
3043 | have linkage, or we might just be in an anonymous namespace. | |||
3044 | If we're in a TREE_PUBLIC class, we have linkage. */ | |||
3045 | if (TYPE_P (r)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (r)->base.code))] == tcc_type) && !TREE_PUBLIC (TYPE_NAME (r))((((tree_class_check ((r), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3045, __FUNCTION__))->type_common.name))->base.public_flag )) | |||
3046 | return no_linkage_check (TYPE_CONTEXT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3046, __FUNCTION__))->type_common.context), relaxed_p); | |||
3047 | else if (TREE_CODE (r)((enum tree_code) (r)->base.code) == FUNCTION_DECL) | |||
3048 | { | |||
3049 | if (!relaxed_p || !vague_linkage_p (r)) | |||
3050 | return t; | |||
3051 | else | |||
3052 | r = CP_DECL_CONTEXT (r)(!(! (((contains_struct_check ((r), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3052, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code ) (((contains_struct_check ((r), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3052, __FUNCTION__))->decl_minimal.context))->base.code ) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((r), ( TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3052, __FUNCTION__))->decl_minimal.context) : cp_global_trees [CPTI_GLOBAL]); | |||
3053 | } | |||
3054 | else | |||
3055 | break; | |||
3056 | } | |||
3057 | ||||
3058 | return NULL_TREE(tree) nullptr; | |||
3059 | ||||
3060 | case ARRAY_TYPE: | |||
3061 | case POINTER_TYPE: | |||
3062 | case REFERENCE_TYPE: | |||
3063 | case VECTOR_TYPE: | |||
3064 | return no_linkage_check (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3064, __FUNCTION__))->typed.type), relaxed_p); | |||
3065 | ||||
3066 | case OFFSET_TYPE: | |||
3067 | ptrmem: | |||
3068 | r = no_linkage_check (TYPE_PTRMEM_POINTED_TO_TYPE (t)((((enum tree_code) (t)->base.code) == OFFSET_TYPE) ? ((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3068, __FUNCTION__))->typed.type) : ((contains_struct_check (((cp_build_qualified_type (((contains_struct_check ((((tree_check3 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3068, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE )))->type_non_common.values)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3068, __FUNCTION__))->typed.type), cp_type_quals (t)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3068, __FUNCTION__))->typed.type)), | |||
3069 | relaxed_p); | |||
3070 | if (r) | |||
3071 | return r; | |||
3072 | return no_linkage_check (TYPE_PTRMEM_CLASS_TYPE (t)((((enum tree_code) (t)->base.code) == OFFSET_TYPE) ? ((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3072, __FUNCTION__, (OFFSET_TYPE)))->type_non_common.maxval ) : ((tree_check2 ((((contains_struct_check (((cp_build_qualified_type (((contains_struct_check ((((tree_check3 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3072, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE )))->type_non_common.values)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3072, __FUNCTION__))->typed.type), cp_type_quals (t)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3072, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3072, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common .maxval)), relaxed_p); | |||
3073 | ||||
3074 | case METHOD_TYPE: | |||
3075 | case FUNCTION_TYPE: | |||
3076 | { | |||
3077 | tree parm = TYPE_ARG_TYPES (t)((tree_check2 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3077, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common .values); | |||
3078 | if (TREE_CODE (t)((enum tree_code) (t)->base.code) == METHOD_TYPE) | |||
3079 | /* The 'this' pointer isn't interesting; a method has the same | |||
3080 | linkage (or lack thereof) as its enclosing class. */ | |||
3081 | parm = TREE_CHAIN (parm)((contains_struct_check ((parm), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3081, __FUNCTION__))->common.chain); | |||
3082 | for (; | |||
3083 | parm && parm != void_list_nodeglobal_trees[TI_VOID_LIST_NODE]; | |||
3084 | parm = TREE_CHAIN (parm)((contains_struct_check ((parm), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3084, __FUNCTION__))->common.chain)) | |||
3085 | { | |||
3086 | r = no_linkage_check (TREE_VALUE (parm)((tree_check ((parm), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3086, __FUNCTION__, (TREE_LIST)))->list.value), relaxed_p); | |||
3087 | if (r) | |||
3088 | return r; | |||
3089 | } | |||
3090 | return no_linkage_check (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3090, __FUNCTION__))->typed.type), relaxed_p); | |||
3091 | } | |||
3092 | ||||
3093 | default: | |||
3094 | return NULL_TREE(tree) nullptr; | |||
3095 | } | |||
3096 | } | |||
3097 | ||||
3098 | extern int depth_reached; | |||
3099 | ||||
3100 | void | |||
3101 | cxx_print_statistics (void) | |||
3102 | { | |||
3103 | print_template_statistics (); | |||
3104 | if (GATHER_STATISTICS0) | |||
3105 | fprintf (stderrstderr, "maximum template instantiation depth reached: %d\n", | |||
3106 | depth_reached); | |||
3107 | } | |||
3108 | ||||
3109 | /* Return, as an INTEGER_CST node, the number of elements for TYPE | |||
3110 | (which is an ARRAY_TYPE). This counts only elements of the top | |||
3111 | array. */ | |||
3112 | ||||
3113 | tree | |||
3114 | array_type_nelts_top (tree type) | |||
3115 | { | |||
3116 | return fold_build2_loc (input_location, | |||
3117 | PLUS_EXPR, sizetypesizetype_tab[(int) stk_sizetype], | |||
3118 | array_type_nelts (type), | |||
3119 | size_one_nodeglobal_trees[TI_SIZE_ONE]); | |||
3120 | } | |||
3121 | ||||
3122 | /* Return, as an INTEGER_CST node, the number of elements for TYPE | |||
3123 | (which is an ARRAY_TYPE). This one is a recursive count of all | |||
3124 | ARRAY_TYPEs that are clumped together. */ | |||
3125 | ||||
3126 | tree | |||
3127 | array_type_nelts_total (tree type) | |||
3128 | { | |||
3129 | tree sz = array_type_nelts_top (type); | |||
3130 | type = TREE_TYPE (type)((contains_struct_check ((type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3130, __FUNCTION__))->typed.type); | |||
3131 | while (TREE_CODE (type)((enum tree_code) (type)->base.code) == ARRAY_TYPE) | |||
3132 | { | |||
3133 | tree n = array_type_nelts_top (type); | |||
3134 | sz = fold_build2_loc (input_location, | |||
3135 | MULT_EXPR, sizetypesizetype_tab[(int) stk_sizetype], sz, n); | |||
3136 | type = TREE_TYPE (type)((contains_struct_check ((type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3136, __FUNCTION__))->typed.type); | |||
3137 | } | |||
3138 | return sz; | |||
3139 | } | |||
3140 | ||||
3141 | struct bot_data | |||
3142 | { | |||
3143 | splay_tree target_remap; | |||
3144 | bool clear_location; | |||
3145 | }; | |||
3146 | ||||
3147 | /* Called from break_out_target_exprs via mapcar. */ | |||
3148 | ||||
3149 | static tree | |||
3150 | bot_manip (tree* tp, int* walk_subtrees, void* data_) | |||
3151 | { | |||
3152 | bot_data &data = *(bot_data*)data_; | |||
3153 | splay_tree target_remap = data.target_remap; | |||
3154 | tree t = *tp; | |||
3155 | ||||
3156 | if (!TYPE_P (t)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (t)->base.code))] == tcc_type) && TREE_CONSTANT (t)((non_type_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3156, __FUNCTION__))->base.constant_flag) && !TREE_SIDE_EFFECTS (t)((non_type_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3156, __FUNCTION__))->base.side_effects_flag)) | |||
3157 | { | |||
3158 | /* There can't be any TARGET_EXPRs or their slot variables below this | |||
3159 | point. But we must make a copy, in case subsequent processing | |||
3160 | alters any part of it. For example, during gimplification a cast | |||
3161 | of the form (T) &X::f (where "f" is a member function) will lead | |||
3162 | to replacing the PTRMEM_CST for &X::f with a VAR_DECL. */ | |||
3163 | *walk_subtrees = 0; | |||
3164 | *tp = unshare_expr (t); | |||
3165 | return NULL_TREE(tree) nullptr; | |||
3166 | } | |||
3167 | if (TREE_CODE (t)((enum tree_code) (t)->base.code) == TARGET_EXPR) | |||
3168 | { | |||
3169 | tree u; | |||
3170 | ||||
3171 | if (TREE_CODE (TREE_OPERAND (t, 1))((enum tree_code) ((*((const_cast<tree*> (tree_operand_check ((t), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3171, __FUNCTION__))))))->base.code) == AGGR_INIT_EXPR) | |||
3172 | { | |||
3173 | u = build_cplus_new (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3173, __FUNCTION__))->typed.type), TREE_OPERAND (t, 1)(*((const_cast<tree*> (tree_operand_check ((t), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3173, __FUNCTION__))))), | |||
3174 | tf_warning_or_error); | |||
3175 | if (u == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
3176 | return u; | |||
3177 | if (AGGR_INIT_ZERO_FIRST (TREE_OPERAND (t, 1))((tree_not_check2 (((tree_check (((*((const_cast<tree*> (tree_operand_check ((t), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3177, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3177, __FUNCTION__, (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3177, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2)) | |||
3178 | AGGR_INIT_ZERO_FIRST (TREE_OPERAND (u, 1))((tree_not_check2 (((tree_check (((*((const_cast<tree*> (tree_operand_check ((u), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3178, __FUNCTION__)))))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3178, __FUNCTION__, (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3178, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2) = true; | |||
3179 | } | |||
3180 | else | |||
3181 | u = force_target_expr (TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3181, __FUNCTION__))->typed.type), TREE_OPERAND (t, 1)(*((const_cast<tree*> (tree_operand_check ((t), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3181, __FUNCTION__))))), | |||
3182 | tf_warning_or_error); | |||
3183 | ||||
3184 | TARGET_EXPR_IMPLICIT_P (u)((tree_not_check2 (((tree_check ((u), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3184, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3184, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0) = TARGET_EXPR_IMPLICIT_P (t)((tree_not_check2 (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3184, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3184, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0); | |||
3185 | TARGET_EXPR_LIST_INIT_P (u)((tree_not_check2 (((tree_check ((u), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3185, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3185, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_1) = TARGET_EXPR_LIST_INIT_P (t)((tree_not_check2 (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3185, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3185, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_1); | |||
3186 | TARGET_EXPR_DIRECT_INIT_P (u)((tree_not_check2 (((tree_check ((u), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3186, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3186, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2) = TARGET_EXPR_DIRECT_INIT_P (t)((tree_not_check2 (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3186, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3186, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_2); | |||
3187 | TARGET_EXPR_ELIDING_P (u)((tree_not_check2 (((tree_check ((u), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3187, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3187, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3) = TARGET_EXPR_ELIDING_P (t)((tree_not_check2 (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3187, __FUNCTION__, (TARGET_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3187, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3); | |||
3188 | ||||
3189 | /* Map the old variable to the new one. */ | |||
3190 | splay_tree_insert (target_remap, | |||
3191 | (splay_tree_key) TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3191, __FUNCTION__))))), | |||
3192 | (splay_tree_value) TREE_OPERAND (u, 0)(*((const_cast<tree*> (tree_operand_check ((u), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3192, __FUNCTION__)))))); | |||
3193 | ||||
3194 | TREE_OPERAND (u, 1)(*((const_cast<tree*> (tree_operand_check ((u), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3194, __FUNCTION__))))) = break_out_target_exprs (TREE_OPERAND (u, 1)(*((const_cast<tree*> (tree_operand_check ((u), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3194, __FUNCTION__))))), | |||
3195 | data.clear_location); | |||
3196 | if (TREE_OPERAND (u, 1)(*((const_cast<tree*> (tree_operand_check ((u), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3196, __FUNCTION__))))) == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
3197 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
3198 | ||||
3199 | /* Replace the old expression with the new version. */ | |||
3200 | *tp = u; | |||
3201 | /* We don't have to go below this point; the recursive call to | |||
3202 | break_out_target_exprs will have handled anything below this | |||
3203 | point. */ | |||
3204 | *walk_subtrees = 0; | |||
3205 | return NULL_TREE(tree) nullptr; | |||
3206 | } | |||
3207 | if (TREE_CODE (*tp)((enum tree_code) (*tp)->base.code) == SAVE_EXPR) | |||
3208 | { | |||
3209 | t = *tp; | |||
3210 | splay_tree_node n = splay_tree_lookup (target_remap, | |||
3211 | (splay_tree_key) t); | |||
3212 | if (n) | |||
3213 | { | |||
3214 | *tp = (tree)n->value; | |||
3215 | *walk_subtrees = 0; | |||
3216 | } | |||
3217 | else | |||
3218 | { | |||
3219 | copy_tree_r (tp, walk_subtrees, NULLnullptr); | |||
3220 | splay_tree_insert (target_remap, | |||
3221 | (splay_tree_key)t, | |||
3222 | (splay_tree_value)*tp); | |||
3223 | /* Make sure we don't remap an already-remapped SAVE_EXPR. */ | |||
3224 | splay_tree_insert (target_remap, | |||
3225 | (splay_tree_key)*tp, | |||
3226 | (splay_tree_value)*tp); | |||
3227 | } | |||
3228 | return NULL_TREE(tree) nullptr; | |||
3229 | } | |||
3230 | if (TREE_CODE (*tp)((enum tree_code) (*tp)->base.code) == DECL_EXPR | |||
3231 | && VAR_P (DECL_EXPR_DECL (*tp))(((enum tree_code) ((*((const_cast<tree*> (tree_operand_check (((tree_check ((*tp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3231, __FUNCTION__, (DECL_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3231, __FUNCTION__))))))->base.code) == VAR_DECL) | |||
3232 | && DECL_ARTIFICIAL (DECL_EXPR_DECL (*tp))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check (((tree_check ((*tp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3232, __FUNCTION__, (DECL_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3232, __FUNCTION__)))))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3232, __FUNCTION__))->decl_common.artificial_flag) | |||
3233 | && !TREE_STATIC (DECL_EXPR_DECL (*tp))(((*((const_cast<tree*> (tree_operand_check (((tree_check ((*tp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3233, __FUNCTION__, (DECL_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3233, __FUNCTION__))))))->base.static_flag)) | |||
3234 | { | |||
3235 | tree t; | |||
3236 | splay_tree_node n | |||
3237 | = splay_tree_lookup (target_remap, | |||
3238 | (splay_tree_key) DECL_EXPR_DECL (*tp)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*tp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3238, __FUNCTION__, (DECL_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3238, __FUNCTION__)))))); | |||
3239 | if (n) | |||
3240 | t = (tree) n->value; | |||
3241 | else | |||
3242 | { | |||
3243 | t = create_temporary_var (TREE_TYPE (DECL_EXPR_DECL (*tp))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check (((tree_check ((*tp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3243, __FUNCTION__, (DECL_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3243, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3243, __FUNCTION__))->typed.type)); | |||
3244 | DECL_INITIAL (t)((contains_struct_check ((t), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3244, __FUNCTION__))->decl_common.initial) = DECL_INITIAL (DECL_EXPR_DECL (*tp))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check (((tree_check ((*tp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3244, __FUNCTION__, (DECL_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3244, __FUNCTION__)))))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3244, __FUNCTION__))->decl_common.initial); | |||
3245 | splay_tree_insert (target_remap, | |||
3246 | (splay_tree_key) DECL_EXPR_DECL (*tp)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*tp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3246, __FUNCTION__, (DECL_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3246, __FUNCTION__))))), | |||
3247 | (splay_tree_value) t); | |||
3248 | } | |||
3249 | copy_tree_r (tp, walk_subtrees, NULLnullptr); | |||
3250 | DECL_EXPR_DECL (*tp)(*((const_cast<tree*> (tree_operand_check (((tree_check ((*tp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3250, __FUNCTION__, (DECL_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3250, __FUNCTION__))))) = t; | |||
3251 | if (data.clear_location && EXPR_HAS_LOCATION (*tp)(((IS_ADHOC_LOC (((((*tp)) && ((tree_code_type_tmpl < 0>::tree_code_type[(int) (((enum tree_code) ((*tp))->base .code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((*tp))-> base.code))]) <= tcc_expression)) ? (*tp)->exp.locus : ( (location_t) 0)))) ? get_location_from_adhoc_loc (line_table, ((((*tp)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((*tp))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((*tp))->base.code))]) <= tcc_expression )) ? (*tp)->exp.locus : ((location_t) 0))) : (((((*tp)) && ((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((*tp))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((*tp))->base.code))]) <= tcc_expression)) ? (*tp)->exp.locus : ((location_t) 0)))) != ((location_t) 0 ))) | |||
3252 | SET_EXPR_LOCATION (*tp, input_location)(expr_check (((*tp)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3252, __FUNCTION__))->exp.locus = (input_location); | |||
3253 | return NULL_TREE(tree) nullptr; | |||
3254 | } | |||
3255 | if (TREE_CODE (*tp)((enum tree_code) (*tp)->base.code) == BIND_EXPR && BIND_EXPR_VARS (*tp)((*((const_cast<tree*> (tree_operand_check (((tree_check ((*tp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3255, __FUNCTION__, (BIND_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3255, __FUNCTION__))))))) | |||
3256 | { | |||
3257 | copy_tree_r (tp, walk_subtrees, NULLnullptr); | |||
3258 | for (tree *p = &BIND_EXPR_VARS (*tp)((*((const_cast<tree*> (tree_operand_check (((tree_check ((*tp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3258, __FUNCTION__, (BIND_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3258, __FUNCTION__)))))); *p; p = &DECL_CHAIN (*p)(((contains_struct_check (((contains_struct_check ((*p), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3258, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3258, __FUNCTION__))->common.chain))) | |||
3259 | { | |||
3260 | gcc_assert (VAR_P (*p) && DECL_ARTIFICIAL (*p) && !TREE_STATIC (*p))((void)(!((((enum tree_code) (*p)->base.code) == VAR_DECL) && ((contains_struct_check ((*p), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3260, __FUNCTION__))->decl_common.artificial_flag) && !((*p)->base.static_flag)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3260, __FUNCTION__), 0 : 0)); | |||
3261 | tree t = create_temporary_var (TREE_TYPE (*p)((contains_struct_check ((*p), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3261, __FUNCTION__))->typed.type)); | |||
3262 | DECL_INITIAL (t)((contains_struct_check ((t), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3262, __FUNCTION__))->decl_common.initial) = DECL_INITIAL (*p)((contains_struct_check ((*p), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3262, __FUNCTION__))->decl_common.initial); | |||
3263 | DECL_CHAIN (t)(((contains_struct_check (((contains_struct_check ((t), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3263, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3263, __FUNCTION__))->common.chain)) = DECL_CHAIN (*p)(((contains_struct_check (((contains_struct_check ((*p), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3263, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3263, __FUNCTION__))->common.chain)); | |||
3264 | splay_tree_insert (target_remap, (splay_tree_key) *p, | |||
3265 | (splay_tree_value) t); | |||
3266 | *p = t; | |||
3267 | } | |||
3268 | if (data.clear_location && EXPR_HAS_LOCATION (*tp)(((IS_ADHOC_LOC (((((*tp)) && ((tree_code_type_tmpl < 0>::tree_code_type[(int) (((enum tree_code) ((*tp))->base .code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((*tp))-> base.code))]) <= tcc_expression)) ? (*tp)->exp.locus : ( (location_t) 0)))) ? get_location_from_adhoc_loc (line_table, ((((*tp)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((*tp))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((*tp))->base.code))]) <= tcc_expression )) ? (*tp)->exp.locus : ((location_t) 0))) : (((((*tp)) && ((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((*tp))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((*tp))->base.code))]) <= tcc_expression)) ? (*tp)->exp.locus : ((location_t) 0)))) != ((location_t) 0 ))) | |||
3269 | SET_EXPR_LOCATION (*tp, input_location)(expr_check (((*tp)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3269, __FUNCTION__))->exp.locus = (input_location); | |||
3270 | return NULL_TREE(tree) nullptr; | |||
3271 | } | |||
3272 | ||||
3273 | /* Make a copy of this node. */ | |||
3274 | t = copy_tree_r (tp, walk_subtrees, NULLnullptr); | |||
3275 | if (TREE_CODE (*tp)((enum tree_code) (*tp)->base.code) == CALL_EXPR || TREE_CODE (*tp)((enum tree_code) (*tp)->base.code) == AGGR_INIT_EXPR) | |||
3276 | if (!processing_template_declscope_chain->x_processing_template_decl) | |||
3277 | set_flags_from_callee (*tp); | |||
3278 | if (data.clear_location && EXPR_HAS_LOCATION (*tp)(((IS_ADHOC_LOC (((((*tp)) && ((tree_code_type_tmpl < 0>::tree_code_type[(int) (((enum tree_code) ((*tp))->base .code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((*tp))-> base.code))]) <= tcc_expression)) ? (*tp)->exp.locus : ( (location_t) 0)))) ? get_location_from_adhoc_loc (line_table, ((((*tp)) && ((tree_code_type_tmpl <0>::tree_code_type [(int) (((enum tree_code) ((*tp))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int ) (((enum tree_code) ((*tp))->base.code))]) <= tcc_expression )) ? (*tp)->exp.locus : ((location_t) 0))) : (((((*tp)) && ((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((*tp))->base.code))]) >= tcc_reference && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) ((*tp))->base.code))]) <= tcc_expression)) ? (*tp)->exp.locus : ((location_t) 0)))) != ((location_t) 0 ))) | |||
3279 | SET_EXPR_LOCATION (*tp, input_location)(expr_check (((*tp)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3279, __FUNCTION__))->exp.locus = (input_location); | |||
3280 | return t; | |||
3281 | } | |||
3282 | ||||
3283 | /* Replace all remapped VAR_DECLs in T with their new equivalents. | |||
3284 | DATA is really a splay-tree mapping old variables to new | |||
3285 | variables. */ | |||
3286 | ||||
3287 | static tree | |||
3288 | bot_replace (tree* t, int* walk_subtrees, void* data_) | |||
3289 | { | |||
3290 | bot_data &data = *(bot_data*)data_; | |||
3291 | splay_tree target_remap = data.target_remap; | |||
3292 | ||||
3293 | if (VAR_P (*t)(((enum tree_code) (*t)->base.code) == VAR_DECL)) | |||
3294 | { | |||
3295 | splay_tree_node n = splay_tree_lookup (target_remap, | |||
3296 | (splay_tree_key) *t); | |||
3297 | if (n) | |||
3298 | *t = (tree) n->value; | |||
3299 | } | |||
3300 | else if (TREE_CODE (*t)((enum tree_code) (*t)->base.code) == PARM_DECL | |||
3301 | && DECL_NAME (*t)((contains_struct_check ((*t), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3301, __FUNCTION__))->decl_minimal.name) == this_identifiercp_global_trees[CPTI_THIS_IDENTIFIER] | |||
3302 | && !DECL_CONTEXT (*t)((contains_struct_check ((*t), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3302, __FUNCTION__))->decl_minimal.context)) | |||
3303 | { | |||
3304 | /* In an NSDMI we need to replace the 'this' parameter we used for | |||
3305 | parsing with the real one for this function. */ | |||
3306 | *t = current_class_ptr(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun + 0)->language)->x_current_class_ptr : &scope_chain ->x_current_class_ptr)); | |||
3307 | } | |||
3308 | else if (TREE_CODE (*t)((enum tree_code) (*t)->base.code) == CONVERT_EXPR | |||
3309 | && CONVERT_EXPR_VBASE_PATH (*t)((tree_not_check2 (((tree_check ((*t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3309, __FUNCTION__, (CONVERT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3309, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0)) | |||
3310 | { | |||
3311 | /* In an NSDMI build_base_path defers building conversions to morally | |||
3312 | virtual bases, and we handle it here. */ | |||
3313 | tree basetype = TREE_TYPE (*t)((contains_struct_check ((*t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3313, __FUNCTION__))->typed.type); | |||
3314 | *t = convert_to_base (TREE_OPERAND (*t, 0)(*((const_cast<tree*> (tree_operand_check ((*t), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3314, __FUNCTION__))))), basetype, | |||
3315 | /*check_access=*/false, /*nonnull=*/true, | |||
3316 | tf_warning_or_error); | |||
3317 | } | |||
3318 | else if (cxx_dialect >= cxx20 | |||
3319 | && (TREE_CODE (*t)((enum tree_code) (*t)->base.code) == CALL_EXPR | |||
3320 | || TREE_CODE (*t)((enum tree_code) (*t)->base.code) == AGGR_INIT_EXPR) | |||
3321 | && !in_immediate_context ()) | |||
3322 | { | |||
3323 | /* Expand immediate invocations. */ | |||
3324 | if (tree fndecl = cp_get_callee_fndecl_nofold (*t)) | |||
3325 | if (DECL_IMMEDIATE_FUNCTION_P (fndecl)(((contains_struct_check (((tree_check (((((enum tree_code) ( fndecl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((fndecl ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3325, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fndecl )), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3325, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3325, __FUNCTION__))->decl_common.lang_specific) ? __extension__ ({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code ) (fndecl)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((fndecl ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3325, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fndecl )), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3325, __FUNCTION__))->decl_common.lang_specific); if (!( ((enum tree_code) (fndecl)->base.code) == FUNCTION_DECL || (((enum tree_code) (fndecl)->base.code) == TEMPLATE_DECL && ((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3325, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree ) nullptr && ((enum tree_code) (((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((fndecl ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3325, __FUNCTION__, (TEMPLATE_DECL))))))))->result)-> base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn ) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3325, __FUNCTION__); <->u.fn; })->immediate_fn_p : false)) | |||
3326 | { | |||
3327 | /* Make in_immediate_context true within the args. */ | |||
3328 | in_consteval_if_p_temp_override ito; | |||
3329 | in_consteval_if_pscope_chain->consteval_if_p = true; | |||
3330 | int nargs = call_expr_nargs (*t)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check ((*t), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3330, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3330, __FUNCTION__)))) - 3); | |||
3331 | for (int i = 0; i < nargs; ++i) | |||
3332 | cp_walk_tree (&get_nth_callarg (*t, i), bot_replace, data_, NULL)walk_tree_1 (&get_nth_callarg (*t, i), bot_replace, data_ , nullptr, cp_walk_subtrees); | |||
3333 | *t = cxx_constant_value (*t); | |||
3334 | if (*t == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
3335 | return error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
3336 | *walk_subtrees = 0; | |||
3337 | } | |||
3338 | } | |||
3339 | ||||
3340 | return NULL_TREE(tree) nullptr; | |||
3341 | } | |||
3342 | ||||
3343 | /* When we parse a default argument expression, we may create | |||
3344 | temporary variables via TARGET_EXPRs. When we actually use the | |||
3345 | default-argument expression, we make a copy of the expression | |||
3346 | and replace the temporaries with appropriate local versions. | |||
3347 | ||||
3348 | If CLEAR_LOCATION is true, override any EXPR_LOCATION with | |||
3349 | input_location. */ | |||
3350 | ||||
3351 | tree | |||
3352 | break_out_target_exprs (tree t, bool clear_location /* = false */) | |||
3353 | { | |||
3354 | static int target_remap_count; | |||
3355 | static splay_tree target_remap; | |||
3356 | ||||
3357 | /* We shouldn't be called on templated trees, nor do we want to | |||
3358 | produce them. */ | |||
3359 | gcc_checking_assert (!processing_template_decl)((void)(!(!scope_chain->x_processing_template_decl) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3359, __FUNCTION__), 0 : 0)); | |||
3360 | ||||
3361 | if (!target_remap_count++) | |||
3362 | target_remap = splay_tree_new (splay_tree_compare_pointers, | |||
3363 | /*splay_tree_delete_key_fn=*/NULLnullptr, | |||
3364 | /*splay_tree_delete_value_fn=*/NULLnullptr); | |||
3365 | bot_data data = { target_remap, clear_location }; | |||
3366 | if (cp_walk_tree (&t, bot_manip, &data, NULL)walk_tree_1 (&t, bot_manip, &data, nullptr, cp_walk_subtrees ) == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
3367 | t = error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
3368 | if (cp_walk_tree (&t, bot_replace, &data, NULL)walk_tree_1 (&t, bot_replace, &data, nullptr, cp_walk_subtrees ) == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
3369 | t = error_mark_nodeglobal_trees[TI_ERROR_MARK]; | |||
3370 | ||||
3371 | if (!--target_remap_count) | |||
3372 | { | |||
3373 | splay_tree_delete (target_remap); | |||
3374 | target_remap = NULLnullptr; | |||
3375 | } | |||
3376 | ||||
3377 | return t; | |||
3378 | } | |||
3379 | ||||
3380 | /* Build an expression for the subobject of OBJ at CONSTRUCTOR index INDEX, | |||
3381 | which we expect to have type TYPE. */ | |||
3382 | ||||
3383 | tree | |||
3384 | build_ctor_subob_ref (tree index, tree type, tree obj) | |||
3385 | { | |||
3386 | if (index == NULL_TREE(tree) nullptr) | |||
3387 | /* Can't refer to a particular member of a vector. */ | |||
3388 | obj = NULL_TREE(tree) nullptr; | |||
3389 | else if (TREE_CODE (index)((enum tree_code) (index)->base.code) == INTEGER_CST) | |||
3390 | obj = cp_build_array_ref (input_location, obj, index, tf_none); | |||
3391 | else | |||
3392 | obj = build_class_member_access_expr (obj, index, NULL_TREE(tree) nullptr, | |||
3393 | /*reference*/false, tf_none); | |||
3394 | if (obj) | |||
3395 | { | |||
3396 | tree objtype = TREE_TYPE (obj)((contains_struct_check ((obj), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3396, __FUNCTION__))->typed.type); | |||
3397 | if (TREE_CODE (objtype)((enum tree_code) (objtype)->base.code) == ARRAY_TYPE && !TYPE_DOMAIN (objtype)((tree_check ((objtype), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3397, __FUNCTION__, (ARRAY_TYPE)))->type_non_common.values )) | |||
3398 | { | |||
3399 | /* When the destination object refers to a flexible array member | |||
3400 | verify that it matches the type of the source object except | |||
3401 | for its domain and qualifiers. */ | |||
3402 | gcc_assert (comptypes (TYPE_MAIN_VARIANT (type),((void)(!(comptypes (((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3402, __FUNCTION__))->type_common.main_variant), ((tree_class_check ((objtype), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3403, __FUNCTION__))->type_common.main_variant), 4)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3404, __FUNCTION__), 0 : 0)) | |||
3403 | TYPE_MAIN_VARIANT (objtype),((void)(!(comptypes (((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3402, __FUNCTION__))->type_common.main_variant), ((tree_class_check ((objtype), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3403, __FUNCTION__))->type_common.main_variant), 4)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3404, __FUNCTION__), 0 : 0)) | |||
3404 | COMPARE_REDECLARATION))((void)(!(comptypes (((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3402, __FUNCTION__))->type_common.main_variant), ((tree_class_check ((objtype), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3403, __FUNCTION__))->type_common.main_variant), 4)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3404, __FUNCTION__), 0 : 0)); | |||
3405 | } | |||
3406 | else | |||
3407 | gcc_assert (same_type_ignoring_top_level_qualifiers_p (type, objtype))((void)(!(same_type_ignoring_top_level_qualifiers_p (type, objtype )) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3407, __FUNCTION__), 0 : 0)); | |||
3408 | } | |||
3409 | ||||
3410 | return obj; | |||
3411 | } | |||
3412 | ||||
3413 | struct replace_placeholders_t | |||
3414 | { | |||
3415 | tree obj; /* The object to be substituted for a PLACEHOLDER_EXPR. */ | |||
3416 | tree exp; /* The outermost exp. */ | |||
3417 | bool seen; /* Whether we've encountered a PLACEHOLDER_EXPR. */ | |||
3418 | hash_set<tree> *pset; /* To avoid walking same trees multiple times. */ | |||
3419 | }; | |||
3420 | ||||
3421 | /* Like substitute_placeholder_in_expr, but handle C++ tree codes and | |||
3422 | build up subexpressions as we go deeper. */ | |||
3423 | ||||
3424 | static tree | |||
3425 | replace_placeholders_r (tree* t, int* walk_subtrees, void* data_) | |||
3426 | { | |||
3427 | replace_placeholders_t *d = static_cast<replace_placeholders_t*>(data_); | |||
3428 | tree obj = d->obj; | |||
3429 | ||||
3430 | if (TYPE_P (*t)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (*t)->base.code))] == tcc_type) || TREE_CONSTANT (*t)((non_type_check ((*t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3430, __FUNCTION__))->base.constant_flag)) | |||
3431 | { | |||
3432 | *walk_subtrees = false; | |||
3433 | return NULL_TREE(tree) nullptr; | |||
3434 | } | |||
3435 | ||||
3436 | switch (TREE_CODE (*t)((enum tree_code) (*t)->base.code)) | |||
3437 | { | |||
3438 | case PLACEHOLDER_EXPR: | |||
3439 | { | |||
3440 | tree x = obj; | |||
3441 | for (; !same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (*t)((contains_struct_check ((*t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3441, __FUNCTION__))->typed.type), | |||
3442 | TREE_TYPE (x)((contains_struct_check ((x), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3442, __FUNCTION__))->typed.type)); | |||
3443 | x = TREE_OPERAND (x, 0)(*((const_cast<tree*> (tree_operand_check ((x), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3443, __FUNCTION__)))))) | |||
3444 | gcc_assert (handled_component_p (x))((void)(!(handled_component_p (x)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3444, __FUNCTION__), 0 : 0)); | |||
3445 | *t = unshare_expr (x); | |||
3446 | *walk_subtrees = false; | |||
3447 | d->seen = true; | |||
3448 | } | |||
3449 | break; | |||
3450 | ||||
3451 | case CONSTRUCTOR: | |||
3452 | { | |||
3453 | constructor_elt *ce; | |||
3454 | vec<constructor_elt,va_gc> *v = CONSTRUCTOR_ELTS (*t)((tree_check ((*t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3454, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts); | |||
3455 | /* Don't walk into CONSTRUCTOR_PLACEHOLDER_BOUNDARY ctors | |||
3456 | other than the d->exp one, those have PLACEHOLDER_EXPRs | |||
3457 | related to another object. */ | |||
3458 | if ((CONSTRUCTOR_PLACEHOLDER_BOUNDARY (*t)(((tree_not_check2 (((tree_check ((*t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3458, __FUNCTION__, (CONSTRUCTOR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3458, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5)) | |||
3459 | && *t != d->exp) | |||
3460 | || d->pset->add (*t)) | |||
3461 | { | |||
3462 | *walk_subtrees = false; | |||
3463 | return NULL_TREE(tree) nullptr; | |||
3464 | } | |||
3465 | for (unsigned i = 0; vec_safe_iterate (v, i, &ce); ++i) | |||
3466 | { | |||
3467 | tree *valp = &ce->value; | |||
3468 | tree type = TREE_TYPE (*valp)((contains_struct_check ((*valp), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3468, __FUNCTION__))->typed.type); | |||
3469 | tree subob = obj; | |||
3470 | ||||
3471 | /* Elements with RANGE_EXPR index shouldn't have any | |||
3472 | placeholders in them. */ | |||
3473 | if (ce->index && TREE_CODE (ce->index)((enum tree_code) (ce->index)->base.code) == RANGE_EXPR) | |||
3474 | continue; | |||
3475 | ||||
3476 | if (TREE_CODE (*valp)((enum tree_code) (*valp)->base.code) == CONSTRUCTOR | |||
3477 | && AGGREGATE_TYPE_P (type)(((enum tree_code) (type)->base.code) == ARRAY_TYPE || ((( enum tree_code) (type)->base.code) == RECORD_TYPE || ((enum tree_code) (type)->base.code) == UNION_TYPE || ((enum tree_code ) (type)->base.code) == QUAL_UNION_TYPE))) | |||
3478 | { | |||
3479 | /* If we're looking at the initializer for OBJ, then build | |||
3480 | a sub-object reference. If we're looking at an | |||
3481 | initializer for another object, just pass OBJ down. */ | |||
3482 | if (same_type_ignoring_top_level_qualifiers_p | |||
3483 | (TREE_TYPE (*t)((contains_struct_check ((*t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3483, __FUNCTION__))->typed.type), TREE_TYPE (obj)((contains_struct_check ((obj), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3483, __FUNCTION__))->typed.type))) | |||
3484 | subob = build_ctor_subob_ref (ce->index, type, obj); | |||
3485 | if (TREE_CODE (*valp)((enum tree_code) (*valp)->base.code) == TARGET_EXPR) | |||
3486 | valp = &TARGET_EXPR_INITIAL (*valp)(*(tree_operand_check_code ((*valp), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3486, __FUNCTION__))); | |||
3487 | } | |||
3488 | d->obj = subob; | |||
3489 | cp_walk_tree (valp, replace_placeholders_r, data_, NULL)walk_tree_1 (valp, replace_placeholders_r, data_, nullptr, cp_walk_subtrees ); | |||
3490 | d->obj = obj; | |||
3491 | } | |||
3492 | *walk_subtrees = false; | |||
3493 | break; | |||
3494 | } | |||
3495 | ||||
3496 | default: | |||
3497 | if (d->pset->add (*t)) | |||
3498 | *walk_subtrees = false; | |||
3499 | break; | |||
3500 | } | |||
3501 | ||||
3502 | return NULL_TREE(tree) nullptr; | |||
3503 | } | |||
3504 | ||||
3505 | /* Replace PLACEHOLDER_EXPRs in EXP with object OBJ. SEEN_P is set if | |||
3506 | a PLACEHOLDER_EXPR has been encountered. */ | |||
3507 | ||||
3508 | tree | |||
3509 | replace_placeholders (tree exp, tree obj, bool *seen_p /*= NULL*/) | |||
3510 | { | |||
3511 | /* This is only relevant for C++14. */ | |||
3512 | if (cxx_dialect < cxx14) | |||
3513 | return exp; | |||
3514 | ||||
3515 | /* If the object isn't a (member of a) class, do nothing. */ | |||
3516 | tree op0 = obj; | |||
3517 | while (handled_component_p (op0)) | |||
3518 | op0 = TREE_OPERAND (op0, 0)(*((const_cast<tree*> (tree_operand_check ((op0), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3518, __FUNCTION__))))); | |||
3519 | if (!CLASS_TYPE_P (strip_array_types (TREE_TYPE (op0)))(((((enum tree_code) (strip_array_types (((contains_struct_check ((op0), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3519, __FUNCTION__))->typed.type)))->base.code)) == RECORD_TYPE || (((enum tree_code) (strip_array_types (((contains_struct_check ((op0), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3519, __FUNCTION__))->typed.type)))->base.code)) == UNION_TYPE ) && ((tree_class_check ((strip_array_types (((contains_struct_check ((op0), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3519, __FUNCTION__))->typed.type))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3519, __FUNCTION__))->type_common.lang_flag_5))) | |||
3520 | return exp; | |||
3521 | ||||
3522 | tree *tp = &exp; | |||
3523 | if (TREE_CODE (exp)((enum tree_code) (exp)->base.code) == TARGET_EXPR) | |||
3524 | tp = &TARGET_EXPR_INITIAL (exp)(*(tree_operand_check_code ((exp), (TARGET_EXPR), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3524, __FUNCTION__))); | |||
3525 | hash_set<tree> pset; | |||
3526 | replace_placeholders_t data = { obj, *tp, false, &pset }; | |||
3527 | cp_walk_tree (tp, replace_placeholders_r, &data, NULL)walk_tree_1 (tp, replace_placeholders_r, &data, nullptr, cp_walk_subtrees ); | |||
3528 | if (seen_p) | |||
3529 | *seen_p = data.seen; | |||
3530 | return exp; | |||
3531 | } | |||
3532 | ||||
3533 | /* Callback function for find_placeholders. */ | |||
3534 | ||||
3535 | static tree | |||
3536 | find_placeholders_r (tree *t, int *walk_subtrees, void *) | |||
3537 | { | |||
3538 | if (TYPE_P (*t)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (*t)->base.code))] == tcc_type) || TREE_CONSTANT (*t)((non_type_check ((*t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3538, __FUNCTION__))->base.constant_flag)) | |||
3539 | { | |||
3540 | *walk_subtrees = false; | |||
3541 | return NULL_TREE(tree) nullptr; | |||
3542 | } | |||
3543 | ||||
3544 | switch (TREE_CODE (*t)((enum tree_code) (*t)->base.code)) | |||
3545 | { | |||
3546 | case PLACEHOLDER_EXPR: | |||
3547 | return *t; | |||
3548 | ||||
3549 | case CONSTRUCTOR: | |||
3550 | if (CONSTRUCTOR_PLACEHOLDER_BOUNDARY (*t)(((tree_not_check2 (((tree_check ((*t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3550, __FUNCTION__, (CONSTRUCTOR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3550, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5))) | |||
3551 | *walk_subtrees = false; | |||
3552 | break; | |||
3553 | ||||
3554 | default: | |||
3555 | break; | |||
3556 | } | |||
3557 | ||||
3558 | return NULL_TREE(tree) nullptr; | |||
3559 | } | |||
3560 | ||||
3561 | /* Return true if EXP contains a PLACEHOLDER_EXPR. Don't walk into | |||
3562 | ctors with CONSTRUCTOR_PLACEHOLDER_BOUNDARY flag set. */ | |||
3563 | ||||
3564 | bool | |||
3565 | find_placeholders (tree exp) | |||
3566 | { | |||
3567 | /* This is only relevant for C++14. */ | |||
3568 | if (cxx_dialect < cxx14) | |||
3569 | return false; | |||
3570 | ||||
3571 | return cp_walk_tree_without_duplicates (&exp, find_placeholders_r, NULL)walk_tree_without_duplicates_1 (&exp, find_placeholders_r , nullptr, cp_walk_subtrees); | |||
3572 | } | |||
3573 | ||||
3574 | /* Similar to `build_nt', but for template definitions of dependent | |||
3575 | expressions */ | |||
3576 | ||||
3577 | tree | |||
3578 | build_min_nt_loc (location_t loc, enum tree_code code, ...) | |||
3579 | { | |||
3580 | tree t; | |||
3581 | int length; | |||
3582 | int i; | |||
3583 | va_list p; | |||
3584 | ||||
3585 | gcc_assert (TREE_CODE_CLASS (code) != tcc_vl_exp)((void)(!(tree_code_type_tmpl <0>::tree_code_type[(int) (code)] != tcc_vl_exp) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3585, __FUNCTION__), 0 : 0)); | |||
3586 | ||||
3587 | va_start (p, code)__builtin_va_start(p, code); | |||
3588 | ||||
3589 | t = make_node (code); | |||
3590 | SET_EXPR_LOCATION (t, loc)(expr_check (((t)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3590, __FUNCTION__))->exp.locus = (loc); | |||
3591 | length = TREE_CODE_LENGTH (code)tree_code_length_tmpl <0>::tree_code_length[(int) (code )]; | |||
3592 | ||||
3593 | for (i = 0; i < length; i++) | |||
3594 | TREE_OPERAND (t, i)(*((const_cast<tree*> (tree_operand_check ((t), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3594, __FUNCTION__))))) = va_arg (p, tree)__builtin_va_arg(p, tree); | |||
3595 | ||||
3596 | va_end (p)__builtin_va_end(p); | |||
3597 | return t; | |||
3598 | } | |||
3599 | ||||
3600 | /* Similar to `build', but for template definitions. */ | |||
3601 | ||||
3602 | tree | |||
3603 | build_min (enum tree_code code, tree tt, ...) | |||
3604 | { | |||
3605 | tree t; | |||
3606 | int length; | |||
3607 | int i; | |||
3608 | va_list p; | |||
3609 | ||||
3610 | gcc_assert (TREE_CODE_CLASS (code) != tcc_vl_exp)((void)(!(tree_code_type_tmpl <0>::tree_code_type[(int) (code)] != tcc_vl_exp) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3610, __FUNCTION__), 0 : 0)); | |||
3611 | ||||
3612 | va_start (p, tt)__builtin_va_start(p, tt); | |||
3613 | ||||
3614 | t = make_node (code); | |||
3615 | length = TREE_CODE_LENGTH (code)tree_code_length_tmpl <0>::tree_code_length[(int) (code )]; | |||
3616 | TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3616, __FUNCTION__))->typed.type) = tt; | |||
3617 | ||||
3618 | for (i = 0; i < length; i++) | |||
3619 | { | |||
3620 | tree x = va_arg (p, tree)__builtin_va_arg(p, tree); | |||
3621 | TREE_OPERAND (t, i)(*((const_cast<tree*> (tree_operand_check ((t), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3621, __FUNCTION__))))) = x; | |||
3622 | if (x && !TYPE_P (x)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (x)->base.code))] == tcc_type) && TREE_SIDE_EFFECTS (x)((non_type_check ((x), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3622, __FUNCTION__))->base.side_effects_flag)) | |||
3623 | TREE_SIDE_EFFECTS (t)((non_type_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3623, __FUNCTION__))->base.side_effects_flag) = 1; | |||
3624 | } | |||
3625 | ||||
3626 | va_end (p)__builtin_va_end(p); | |||
3627 | ||||
3628 | return t; | |||
3629 | } | |||
3630 | ||||
3631 | /* Similar to `build', but for template definitions of non-dependent | |||
3632 | expressions. NON_DEP is the non-dependent expression that has been | |||
3633 | built. */ | |||
3634 | ||||
3635 | tree | |||
3636 | build_min_non_dep (enum tree_code code, tree non_dep, ...) | |||
3637 | { | |||
3638 | tree t; | |||
3639 | int length; | |||
3640 | int i; | |||
3641 | va_list p; | |||
3642 | ||||
3643 | gcc_assert (TREE_CODE_CLASS (code) != tcc_vl_exp)((void)(!(tree_code_type_tmpl <0>::tree_code_type[(int) (code)] != tcc_vl_exp) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3643, __FUNCTION__), 0 : 0)); | |||
3644 | ||||
3645 | va_start (p, non_dep)__builtin_va_start(p, non_dep); | |||
3646 | ||||
3647 | if (REFERENCE_REF_P (non_dep)((((enum tree_code) (non_dep)->base.code) == INDIRECT_REF) && ((contains_struct_check (((*((const_cast<tree* > (tree_operand_check ((non_dep), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3647, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3647, __FUNCTION__))->typed.type) && (((enum tree_code ) (((contains_struct_check (((*((const_cast<tree*> (tree_operand_check (((non_dep)), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3647, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3647, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE ))) | |||
3648 | non_dep = TREE_OPERAND (non_dep, 0)(*((const_cast<tree*> (tree_operand_check ((non_dep), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3648, __FUNCTION__))))); | |||
3649 | ||||
3650 | t = make_node (code); | |||
3651 | SET_EXPR_LOCATION (t, cp_expr_loc_or_input_loc (non_dep))(expr_check (((t)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3651, __FUNCTION__))->exp.locus = (cp_expr_loc_or_input_loc (non_dep)); | |||
3652 | length = TREE_CODE_LENGTH (code)tree_code_length_tmpl <0>::tree_code_length[(int) (code )]; | |||
3653 | TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3653, __FUNCTION__))->typed.type) = unlowered_expr_type (non_dep); | |||
3654 | TREE_SIDE_EFFECTS (t)((non_type_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3654, __FUNCTION__))->base.side_effects_flag) = TREE_SIDE_EFFECTS (non_dep)((non_type_check ((non_dep), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3654, __FUNCTION__))->base.side_effects_flag); | |||
3655 | ||||
3656 | for (i = 0; i < length; i++) | |||
3657 | TREE_OPERAND (t, i)(*((const_cast<tree*> (tree_operand_check ((t), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3657, __FUNCTION__))))) = va_arg (p, tree)__builtin_va_arg(p, tree); | |||
3658 | ||||
3659 | va_end (p)__builtin_va_end(p); | |||
3660 | return convert_from_reference (t); | |||
3661 | } | |||
3662 | ||||
3663 | /* Similar to build_min_nt, but call expressions */ | |||
3664 | ||||
3665 | tree | |||
3666 | build_min_nt_call_vec (tree fn, vec<tree, va_gc> *args) | |||
3667 | { | |||
3668 | tree ret, t; | |||
3669 | unsigned int ix; | |||
3670 | ||||
3671 | ret = build_vl_exp (CALL_EXPR, vec_safe_length (args) + 3); | |||
3672 | CALL_EXPR_FN (ret)(*((const_cast<tree*> (tree_operand_check (((tree_check ((ret), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3672, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3672, __FUNCTION__))))) = fn; | |||
3673 | CALL_EXPR_STATIC_CHAIN (ret)(*((const_cast<tree*> (tree_operand_check (((tree_check ((ret), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3673, __FUNCTION__, (CALL_EXPR)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3673, __FUNCTION__))))) = NULL_TREE(tree) nullptr; | |||
3674 | FOR_EACH_VEC_SAFE_ELT (args, ix, t)for (ix = 0; vec_safe_iterate ((args), (ix), &(t)); ++(ix )) | |||
3675 | CALL_EXPR_ARG (ret, ix)(*((const_cast<tree*> (tree_operand_check (((tree_check ((ret), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3675, __FUNCTION__, (CALL_EXPR)))), ((ix) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3675, __FUNCTION__))))) = t; | |||
3676 | ||||
3677 | return ret; | |||
3678 | } | |||
3679 | ||||
3680 | /* Similar to `build_min_nt_call_vec', but for template definitions of | |||
3681 | non-dependent expressions. NON_DEP is the non-dependent expression | |||
3682 | that has been built. */ | |||
3683 | ||||
3684 | tree | |||
3685 | build_min_non_dep_call_vec (tree non_dep, tree fn, vec<tree, va_gc> *argvec) | |||
3686 | { | |||
3687 | tree t = build_min_nt_call_vec (fn, argvec); | |||
3688 | if (REFERENCE_REF_P (non_dep)((((enum tree_code) (non_dep)->base.code) == INDIRECT_REF) && ((contains_struct_check (((*((const_cast<tree* > (tree_operand_check ((non_dep), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3688, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3688, __FUNCTION__))->typed.type) && (((enum tree_code ) (((contains_struct_check (((*((const_cast<tree*> (tree_operand_check (((non_dep)), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3688, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3688, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE ))) | |||
3689 | non_dep = TREE_OPERAND (non_dep, 0)(*((const_cast<tree*> (tree_operand_check ((non_dep), ( 0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3689, __FUNCTION__))))); | |||
3690 | TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3690, __FUNCTION__))->typed.type) = TREE_TYPE (non_dep)((contains_struct_check ((non_dep), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3690, __FUNCTION__))->typed.type); | |||
3691 | TREE_SIDE_EFFECTS (t)((non_type_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3691, __FUNCTION__))->base.side_effects_flag) = TREE_SIDE_EFFECTS (non_dep)((non_type_check ((non_dep), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3691, __FUNCTION__))->base.side_effects_flag); | |||
3692 | return convert_from_reference (t); | |||
3693 | } | |||
3694 | ||||
3695 | /* Similar to build_min_non_dep, but for expressions that have been resolved to | |||
3696 | a call to an operator overload. OP is the operator that has been | |||
3697 | overloaded. NON_DEP is the non-dependent expression that's been built, | |||
3698 | which should be a CALL_EXPR or an INDIRECT_REF to a CALL_EXPR. OVERLOAD is | |||
3699 | the overload that NON_DEP is calling. */ | |||
3700 | ||||
3701 | tree | |||
3702 | build_min_non_dep_op_overload (enum tree_code op, | |||
3703 | tree non_dep, | |||
3704 | tree overload, ...) | |||
3705 | { | |||
3706 | va_list p; | |||
3707 | int nargs, expected_nargs; | |||
3708 | tree fn, call, obj = NULL_TREE(tree) nullptr; | |||
3709 | ||||
3710 | non_dep = extract_call_expr (non_dep); | |||
3711 | ||||
3712 | nargs = call_expr_nargs (non_dep)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check ((non_dep), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3712, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3712, __FUNCTION__)))) - 3); | |||
3713 | ||||
3714 | expected_nargs = cp_tree_code_length (op); | |||
3715 | if (TREE_CODE (TREE_TYPE (overload))((enum tree_code) (((contains_struct_check ((overload), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3715, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE | |||
3716 | /* For ARRAY_REF, operator[] is either a non-static member or newly | |||
3717 | static member, never out of class and for the static member case | |||
3718 | if user uses single index the operator[] needs to have a single | |||
3719 | argument as well, but the function is called with 2 - the object | |||
3720 | it is invoked on and the index. */ | |||
3721 | || op == ARRAY_REF) | |||
3722 | expected_nargs -= 1; | |||
3723 | if ((op == POSTINCREMENT_EXPR | |||
3724 | || op == POSTDECREMENT_EXPR) | |||
3725 | /* With -fpermissive non_dep could be operator++(). */ | |||
3726 | && (!flag_permissiveglobal_options.x_flag_permissive || nargs != expected_nargs)) | |||
3727 | expected_nargs += 1; | |||
3728 | gcc_assert (nargs == expected_nargs)((void)(!(nargs == expected_nargs) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3728, __FUNCTION__), 0 : 0)); | |||
3729 | ||||
3730 | releasing_vec args; | |||
3731 | va_start (p, overload)__builtin_va_start(p, overload); | |||
3732 | ||||
3733 | if (TREE_CODE (TREE_TYPE (overload))((enum tree_code) (((contains_struct_check ((overload), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3733, __FUNCTION__))->typed.type))->base.code) == FUNCTION_TYPE) | |||
3734 | { | |||
3735 | fn = overload; | |||
3736 | if (op == ARRAY_REF) | |||
3737 | obj = va_arg (p, tree)__builtin_va_arg(p, tree); | |||
3738 | for (int i = 0; i < nargs; i++) | |||
3739 | { | |||
3740 | tree arg = va_arg (p, tree)__builtin_va_arg(p, tree); | |||
3741 | vec_safe_push (args, arg); | |||
3742 | } | |||
3743 | } | |||
3744 | else if (TREE_CODE (TREE_TYPE (overload))((enum tree_code) (((contains_struct_check ((overload), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3744, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE) | |||
3745 | { | |||
3746 | tree object = va_arg (p, tree)__builtin_va_arg(p, tree); | |||
3747 | tree binfo = TYPE_BINFO (TREE_TYPE (object))((tree_check3 ((((contains_struct_check ((object), (TS_TYPED) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3747, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3747, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE )))->type_non_common.maxval); | |||
3748 | tree method = build_baselink (binfo, binfo, overload, NULL_TREE(tree) nullptr); | |||
3749 | fn = build_min (COMPONENT_REF, TREE_TYPE (overload)((contains_struct_check ((overload), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3749, __FUNCTION__))->typed.type), | |||
3750 | object, method, NULL_TREE(tree) nullptr); | |||
3751 | for (int i = 0; i < nargs; i++) | |||
3752 | { | |||
3753 | tree arg = va_arg (p, tree)__builtin_va_arg(p, tree); | |||
3754 | vec_safe_push (args, arg); | |||
3755 | } | |||
3756 | } | |||
3757 | else | |||
3758 | gcc_unreachable ()(fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3758, __FUNCTION__)); | |||
3759 | ||||
3760 | va_end (p)__builtin_va_end(p); | |||
3761 | call = build_min_non_dep_call_vec (non_dep, fn, args); | |||
3762 | ||||
3763 | tree call_expr = extract_call_expr (call); | |||
3764 | KOENIG_LOOKUP_P (call_expr)((tree_not_check2 (((tree_check ((call_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3764, __FUNCTION__, (CALL_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3764, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0) = KOENIG_LOOKUP_P (non_dep)((tree_not_check2 (((tree_check ((non_dep), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3764, __FUNCTION__, (CALL_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3764, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0); | |||
3765 | CALL_EXPR_OPERATOR_SYNTAX (call_expr)((tree_not_check2 (((tree_check2 (((call_expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3765, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3765, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_6) = true; | |||
3766 | CALL_EXPR_ORDERED_ARGS (call_expr)((tree_not_check2 (((tree_check2 (((call_expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3766, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3766, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3) = CALL_EXPR_ORDERED_ARGS (non_dep)((tree_not_check2 (((tree_check2 (((non_dep)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3766, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3766, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3); | |||
3767 | CALL_EXPR_REVERSE_ARGS (call_expr)((tree_not_check2 (((tree_check2 (((call_expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3767, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3767, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5) = CALL_EXPR_REVERSE_ARGS (non_dep)((tree_not_check2 (((tree_check2 (((non_dep)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3767, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3767, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5); | |||
3768 | ||||
3769 | if (obj) | |||
3770 | return keep_unused_object_arg (call, obj, overload); | |||
3771 | return call; | |||
3772 | } | |||
3773 | ||||
3774 | /* Similar to above build_min_non_dep_op_overload, but arguments | |||
3775 | are taken from ARGS vector. */ | |||
3776 | ||||
3777 | tree | |||
3778 | build_min_non_dep_op_overload (tree non_dep, tree overload, tree object, | |||
3779 | vec<tree, va_gc> *args) | |||
3780 | { | |||
3781 | non_dep = extract_call_expr (non_dep); | |||
3782 | ||||
3783 | unsigned int nargs = call_expr_nargs (non_dep)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check ((non_dep), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3783, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3783, __FUNCTION__)))) - 3); | |||
3784 | tree fn = overload; | |||
3785 | if (TREE_CODE (TREE_TYPE (overload))((enum tree_code) (((contains_struct_check ((overload), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3785, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE) | |||
3786 | { | |||
3787 | tree binfo = TYPE_BINFO (TREE_TYPE (object))((tree_check3 ((((contains_struct_check ((object), (TS_TYPED) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3787, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3787, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE )))->type_non_common.maxval); | |||
3788 | tree method = build_baselink (binfo, binfo, overload, NULL_TREE(tree) nullptr); | |||
3789 | fn = build_min (COMPONENT_REF, TREE_TYPE (overload)((contains_struct_check ((overload), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3789, __FUNCTION__))->typed.type), | |||
3790 | object, method, NULL_TREE(tree) nullptr); | |||
3791 | object = NULL_TREE(tree) nullptr; | |||
3792 | } | |||
3793 | gcc_assert (vec_safe_length (args) == nargs)((void)(!(vec_safe_length (args) == nargs) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3793, __FUNCTION__), 0 : 0)); | |||
3794 | ||||
3795 | tree call = build_min_non_dep_call_vec (non_dep, fn, args); | |||
3796 | ||||
3797 | tree call_expr = extract_call_expr (call); | |||
3798 | KOENIG_LOOKUP_P (call_expr)((tree_not_check2 (((tree_check ((call_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3798, __FUNCTION__, (CALL_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3798, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0) = KOENIG_LOOKUP_P (non_dep)((tree_not_check2 (((tree_check ((non_dep), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3798, __FUNCTION__, (CALL_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3798, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0); | |||
3799 | CALL_EXPR_OPERATOR_SYNTAX (call_expr)((tree_not_check2 (((tree_check2 (((call_expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3799, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3799, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_6) = true; | |||
3800 | CALL_EXPR_ORDERED_ARGS (call_expr)((tree_not_check2 (((tree_check2 (((call_expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3800, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3800, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3) = CALL_EXPR_ORDERED_ARGS (non_dep)((tree_not_check2 (((tree_check2 (((non_dep)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3800, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3800, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_3); | |||
3801 | CALL_EXPR_REVERSE_ARGS (call_expr)((tree_not_check2 (((tree_check2 (((call_expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3801, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3801, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5) = CALL_EXPR_REVERSE_ARGS (non_dep)((tree_not_check2 (((tree_check2 (((non_dep)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3801, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3801, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_5); | |||
3802 | ||||
3803 | if (object) | |||
3804 | return keep_unused_object_arg (call, object, overload); | |||
3805 | return call; | |||
3806 | } | |||
3807 | ||||
3808 | /* Return a new tree vec copied from VEC, with ELT inserted at index IDX. */ | |||
3809 | ||||
3810 | vec<tree, va_gc> * | |||
3811 | vec_copy_and_insert (vec<tree, va_gc> *old_vec, tree elt, unsigned idx) | |||
3812 | { | |||
3813 | unsigned len = vec_safe_length (old_vec); | |||
3814 | gcc_assert (idx <= len)((void)(!(idx <= len) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3814, __FUNCTION__), 0 : 0)); | |||
| ||||
3815 | ||||
3816 | vec<tree, va_gc> *new_vec = NULLnullptr; | |||
3817 | vec_alloc (new_vec, len + 1); | |||
3818 | ||||
3819 | unsigned i; | |||
3820 | for (i = 0; i < len; ++i) | |||
3821 | { | |||
3822 | if (i == idx) | |||
3823 | new_vec->quick_push (elt); | |||
3824 | new_vec->quick_push ((*old_vec)[i]); | |||
| ||||
3825 | } | |||
3826 | if (i == idx) | |||
3827 | new_vec->quick_push (elt); | |||
3828 | ||||
3829 | return new_vec; | |||
3830 | } | |||
3831 | ||||
3832 | tree | |||
3833 | get_type_decl (tree t) | |||
3834 | { | |||
3835 | if (TREE_CODE (t)((enum tree_code) (t)->base.code) == TYPE_DECL) | |||
3836 | return t; | |||
3837 | if (TYPE_P (t)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (t)->base.code))] == tcc_type)) | |||
3838 | return TYPE_STUB_DECL (t)(((contains_struct_check (((tree_class_check ((t), (tcc_type) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3838, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3838, __FUNCTION__))->common.chain)); | |||
3839 | gcc_assert (t == error_mark_node)((void)(!(t == global_trees[TI_ERROR_MARK]) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3839, __FUNCTION__), 0 : 0)); | |||
3840 | return t; | |||
3841 | } | |||
3842 | ||||
3843 | /* Returns the namespace that contains DECL, whether directly or | |||
3844 | indirectly. */ | |||
3845 | ||||
3846 | tree | |||
3847 | decl_namespace_context (tree decl) | |||
3848 | { | |||
3849 | while (1) | |||
3850 | { | |||
3851 | if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == NAMESPACE_DECL) | |||
3852 | return decl; | |||
3853 | else if (TYPE_P (decl)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (decl)->base.code))] == tcc_type)) | |||
3854 | decl = CP_DECL_CONTEXT (TYPE_MAIN_DECL (decl))(!(! (((contains_struct_check ((((((contains_struct_check ((( tree_class_check ((((tree_class_check ((decl), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3854, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3854, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3854, __FUNCTION__))->common.chain)))), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3854, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code ) (((contains_struct_check ((((((contains_struct_check (((tree_class_check ((((tree_class_check ((decl), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3854, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3854, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3854, __FUNCTION__))->common.chain)))), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3854, __FUNCTION__))->decl_minimal.context))->base.code ) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((((((contains_struct_check (((tree_class_check ((((tree_class_check ((decl), (tcc_type) , "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3854, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3854, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3854, __FUNCTION__))->common.chain)))), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3854, __FUNCTION__))->decl_minimal.context) : cp_global_trees [CPTI_GLOBAL]); | |||
3855 | else | |||
3856 | decl = CP_DECL_CONTEXT (decl)(!(! (((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3856, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code ) (((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3856, __FUNCTION__))->decl_minimal.context))->base.code ) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((decl) , (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3856, __FUNCTION__))->decl_minimal.context) : cp_global_trees [CPTI_GLOBAL]); | |||
3857 | } | |||
3858 | } | |||
3859 | ||||
3860 | /* Returns true if decl is within an anonymous namespace, however deeply | |||
3861 | nested, or false otherwise. */ | |||
3862 | ||||
3863 | bool | |||
3864 | decl_anon_ns_mem_p (tree decl) | |||
3865 | { | |||
3866 | return !TREE_PUBLIC (decl_namespace_context (decl))((decl_namespace_context (decl))->base.public_flag); | |||
3867 | } | |||
3868 | ||||
3869 | /* Returns true if the enclosing scope of DECL has internal or no linkage. */ | |||
3870 | ||||
3871 | bool | |||
3872 | decl_internal_context_p (const_tree decl) | |||
3873 | { | |||
3874 | while (TREE_CODE (decl)((enum tree_code) (decl)->base.code) != NAMESPACE_DECL) | |||
3875 | { | |||
3876 | /* Classes inside anonymous namespaces have TREE_PUBLIC == 0. */ | |||
3877 | if (TYPE_P (decl)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (decl)->base.code))] == tcc_type)) | |||
3878 | return !TREE_PUBLIC (TYPE_MAIN_DECL (decl))((((((contains_struct_check (((tree_class_check ((((tree_class_check ((decl), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3878, __FUNCTION__))->type_common.main_variant)), (tcc_type ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3878, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3878, __FUNCTION__))->common.chain))))->base.public_flag ); | |||
3879 | ||||
3880 | decl = CP_DECL_CONTEXT (decl)(!(! (((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3880, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code ) (((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3880, __FUNCTION__))->decl_minimal.context))->base.code ) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((decl) , (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3880, __FUNCTION__))->decl_minimal.context) : cp_global_trees [CPTI_GLOBAL]); | |||
3881 | } | |||
3882 | return !TREE_PUBLIC (decl)((decl)->base.public_flag); | |||
3883 | } | |||
3884 | ||||
3885 | /* Subroutine of cp_tree_equal: t1 and t2 are two CALL_EXPRs. | |||
3886 | Return whether their CALL_EXPR_FNs are equivalent. */ | |||
3887 | ||||
3888 | static bool | |||
3889 | called_fns_equal (tree t1, tree t2) | |||
3890 | { | |||
3891 | /* Core 1321: dependent names are equivalent even if the overload sets | |||
3892 | are different. But do compare explicit template arguments. */ | |||
3893 | tree name1 = call_expr_dependent_name (t1); | |||
3894 | tree name2 = call_expr_dependent_name (t2); | |||
3895 | t1 = CALL_EXPR_FN (t1)(*((const_cast<tree*> (tree_operand_check (((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3895, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3895, __FUNCTION__))))); | |||
3896 | t2 = CALL_EXPR_FN (t2)(*((const_cast<tree*> (tree_operand_check (((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3896, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3896, __FUNCTION__))))); | |||
3897 | if (name1 || name2) | |||
3898 | { | |||
3899 | tree targs1 = NULL_TREE(tree) nullptr, targs2 = NULL_TREE(tree) nullptr; | |||
3900 | ||||
3901 | if (name1 != name2) | |||
3902 | return false; | |||
3903 | ||||
3904 | /* FIXME dependent_name currently returns an unqualified name regardless | |||
3905 | of whether the function was named with a qualified- or unqualified-id. | |||
3906 | Until that's fixed, check that we aren't looking at overload sets from | |||
3907 | different scopes. */ | |||
3908 | if (is_overloaded_fn (t1) && is_overloaded_fn (t2) | |||
3909 | && (DECL_CONTEXT (get_first_fn (t1))((contains_struct_check ((get_first_fn (t1)), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3909, __FUNCTION__))->decl_minimal.context) | |||
3910 | != DECL_CONTEXT (get_first_fn (t2))((contains_struct_check ((get_first_fn (t2)), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3910, __FUNCTION__))->decl_minimal.context))) | |||
3911 | return false; | |||
3912 | ||||
3913 | if (TREE_CODE (t1)((enum tree_code) (t1)->base.code) == TEMPLATE_ID_EXPR) | |||
3914 | targs1 = TREE_OPERAND (t1, 1)(*((const_cast<tree*> (tree_operand_check ((t1), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3914, __FUNCTION__))))); | |||
3915 | if (TREE_CODE (t2)((enum tree_code) (t2)->base.code) == TEMPLATE_ID_EXPR) | |||
3916 | targs2 = TREE_OPERAND (t2, 1)(*((const_cast<tree*> (tree_operand_check ((t2), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3916, __FUNCTION__))))); | |||
3917 | return cp_tree_equal (targs1, targs2); | |||
3918 | } | |||
3919 | else | |||
3920 | return cp_tree_equal (t1, t2); | |||
3921 | } | |||
3922 | ||||
3923 | bool comparing_override_contracts; | |||
3924 | ||||
3925 | /* In a component reference, return the innermost object of | |||
3926 | the postfix-expression. */ | |||
3927 | ||||
3928 | static tree | |||
3929 | get_innermost_component (tree t) | |||
3930 | { | |||
3931 | gcc_assert (TREE_CODE (t) == COMPONENT_REF)((void)(!(((enum tree_code) (t)->base.code) == COMPONENT_REF ) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3931, __FUNCTION__), 0 : 0)); | |||
3932 | while (TREE_CODE (t)((enum tree_code) (t)->base.code) == COMPONENT_REF) | |||
3933 | t = TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3933, __FUNCTION__))))); | |||
3934 | return t; | |||
3935 | } | |||
3936 | ||||
3937 | /* Returns true if T is a possibly converted 'this' or '*this' expression. */ | |||
3938 | ||||
3939 | static bool | |||
3940 | is_this_expression (tree t) | |||
3941 | { | |||
3942 | t = get_innermost_component (t); | |||
3943 | /* See through deferences and no-op conversions. */ | |||
3944 | if (TREE_CODE (t)((enum tree_code) (t)->base.code) == INDIRECT_REF) | |||
3945 | t = TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3945, __FUNCTION__))))); | |||
3946 | if (TREE_CODE (t)((enum tree_code) (t)->base.code) == NOP_EXPR) | |||
3947 | t = TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3947, __FUNCTION__))))); | |||
3948 | return is_this_parameter (t); | |||
3949 | } | |||
3950 | ||||
3951 | static bool | |||
3952 | comparing_this_references (tree t1, tree t2) | |||
3953 | { | |||
3954 | return is_this_expression (t1) && is_this_expression (t2); | |||
3955 | } | |||
3956 | ||||
3957 | static bool | |||
3958 | equivalent_member_references (tree t1, tree t2) | |||
3959 | { | |||
3960 | if (!comparing_this_references (t1, t2)) | |||
3961 | return false; | |||
3962 | t1 = TREE_OPERAND (t1, 1)(*((const_cast<tree*> (tree_operand_check ((t1), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3962, __FUNCTION__))))); | |||
3963 | t2 = TREE_OPERAND (t2, 1)(*((const_cast<tree*> (tree_operand_check ((t2), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3963, __FUNCTION__))))); | |||
3964 | return t1 == t2; | |||
3965 | } | |||
3966 | ||||
3967 | /* Return truthvalue of whether T1 is the same tree structure as T2. | |||
3968 | Return 1 if they are the same. Return 0 if they are different. */ | |||
3969 | ||||
3970 | bool | |||
3971 | cp_tree_equal (tree t1, tree t2) | |||
3972 | { | |||
3973 | enum tree_code code1, code2; | |||
3974 | ||||
3975 | if (t1 == t2) | |||
3976 | return true; | |||
3977 | if (!t1 || !t2) | |||
3978 | return false; | |||
3979 | ||||
3980 | code1 = TREE_CODE (t1)((enum tree_code) (t1)->base.code); | |||
3981 | code2 = TREE_CODE (t2)((enum tree_code) (t2)->base.code); | |||
3982 | ||||
3983 | if (code1 != code2) | |||
3984 | return false; | |||
3985 | ||||
3986 | if (CONSTANT_CLASS_P (t1)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (t1)->base.code))] == tcc_constant) | |||
3987 | && !same_type_p (TREE_TYPE (t1), TREE_TYPE (t2))comptypes ((((contains_struct_check ((t1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3987, __FUNCTION__))->typed.type)), (((contains_struct_check ((t2), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3987, __FUNCTION__))->typed.type)), 0)) | |||
3988 | return false; | |||
3989 | ||||
3990 | switch (code1) | |||
3991 | { | |||
3992 | case VOID_CST: | |||
3993 | /* There's only a single VOID_CST node, so we should never reach | |||
3994 | here. */ | |||
3995 | gcc_unreachable ()(fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 3995, __FUNCTION__)); | |||
3996 | ||||
3997 | case INTEGER_CST: | |||
3998 | return tree_int_cst_equal (t1, t2); | |||
3999 | ||||
4000 | case REAL_CST: | |||
4001 | return real_identical (&TREE_REAL_CST (t1)(*(&(tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4001, __FUNCTION__, (REAL_CST)))->real_cst.value)), &TREE_REAL_CST (t2)(*(&(tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4001, __FUNCTION__, (REAL_CST)))->real_cst.value))); | |||
4002 | ||||
4003 | case STRING_CST: | |||
4004 | return TREE_STRING_LENGTH (t1)((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4004, __FUNCTION__, (STRING_CST)))->string.length) == TREE_STRING_LENGTH (t2)((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4004, __FUNCTION__, (STRING_CST)))->string.length) | |||
4005 | && !memcmp (TREE_STRING_POINTER (t1)((const char *)((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4005, __FUNCTION__, (STRING_CST)))->string.str)), TREE_STRING_POINTER (t2)((const char *)((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4005, __FUNCTION__, (STRING_CST)))->string.str)), | |||
4006 | TREE_STRING_LENGTH (t1)((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4006, __FUNCTION__, (STRING_CST)))->string.length)); | |||
4007 | ||||
4008 | case FIXED_CST: | |||
4009 | return FIXED_VALUES_IDENTICAL (TREE_FIXED_CST (t1),fixed_identical (&((*((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4009, __FUNCTION__, (FIXED_CST)))->fixed_cst.fixed_cst_ptr ))), &((*((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4010, __FUNCTION__, (FIXED_CST)))->fixed_cst.fixed_cst_ptr )))) | |||
4010 | TREE_FIXED_CST (t2))fixed_identical (&((*((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4009, __FUNCTION__, (FIXED_CST)))->fixed_cst.fixed_cst_ptr ))), &((*((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4010, __FUNCTION__, (FIXED_CST)))->fixed_cst.fixed_cst_ptr )))); | |||
4011 | ||||
4012 | case COMPLEX_CST: | |||
4013 | return cp_tree_equal (TREE_REALPART (t1)((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4013, __FUNCTION__, (COMPLEX_CST)))->complex.real), TREE_REALPART (t2)((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4013, __FUNCTION__, (COMPLEX_CST)))->complex.real)) | |||
4014 | && cp_tree_equal (TREE_IMAGPART (t1)((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4014, __FUNCTION__, (COMPLEX_CST)))->complex.imag), TREE_IMAGPART (t2)((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4014, __FUNCTION__, (COMPLEX_CST)))->complex.imag)); | |||
4015 | ||||
4016 | case VECTOR_CST: | |||
4017 | return operand_equal_p (t1, t2, OEP_ONLY_CONST); | |||
4018 | ||||
4019 | case CONSTRUCTOR: | |||
4020 | /* We need to do this when determining whether or not two | |||
4021 | non-type pointer to member function template arguments | |||
4022 | are the same. */ | |||
4023 | if (!same_type_p (TREE_TYPE (t1), TREE_TYPE (t2))comptypes ((((contains_struct_check ((t1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4023, __FUNCTION__))->typed.type)), (((contains_struct_check ((t2), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4023, __FUNCTION__))->typed.type)), 0) | |||
4024 | || CONSTRUCTOR_NELTS (t1)(vec_safe_length (((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4024, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts))) != CONSTRUCTOR_NELTS (t2)(vec_safe_length (((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4024, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts)))) | |||
4025 | return false; | |||
4026 | { | |||
4027 | tree field, value; | |||
4028 | unsigned int i; | |||
4029 | FOR_EACH_CONSTRUCTOR_ELT (CONSTRUCTOR_ELTS (t1), i, field, value)for (i = 0; (i >= vec_safe_length (((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4029, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts))) ? false : (((void) (value = (*((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4029, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts))[ i].value)), (field = (*((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4029, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts))[ i].index), true); (i)++) | |||
4030 | { | |||
4031 | constructor_elt *elt2 = CONSTRUCTOR_ELT (t2, i)(&(*((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4031, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts))[ i]); | |||
4032 | if (!cp_tree_equal (field, elt2->index) | |||
4033 | || !cp_tree_equal (value, elt2->value)) | |||
4034 | return false; | |||
4035 | } | |||
4036 | } | |||
4037 | return true; | |||
4038 | ||||
4039 | case TREE_LIST: | |||
4040 | if (!cp_tree_equal (TREE_PURPOSE (t1)((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4040, __FUNCTION__, (TREE_LIST)))->list.purpose), TREE_PURPOSE (t2)((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4040, __FUNCTION__, (TREE_LIST)))->list.purpose))) | |||
4041 | return false; | |||
4042 | if (!cp_tree_equal (TREE_VALUE (t1)((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4042, __FUNCTION__, (TREE_LIST)))->list.value), TREE_VALUE (t2)((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4042, __FUNCTION__, (TREE_LIST)))->list.value))) | |||
4043 | return false; | |||
4044 | return cp_tree_equal (TREE_CHAIN (t1)((contains_struct_check ((t1), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4044, __FUNCTION__))->common.chain), TREE_CHAIN (t2)((contains_struct_check ((t2), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4044, __FUNCTION__))->common.chain)); | |||
4045 | ||||
4046 | case SAVE_EXPR: | |||
4047 | return cp_tree_equal (TREE_OPERAND (t1, 0)(*((const_cast<tree*> (tree_operand_check ((t1), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4047, __FUNCTION__))))), TREE_OPERAND (t2, 0)(*((const_cast<tree*> (tree_operand_check ((t2), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4047, __FUNCTION__)))))); | |||
4048 | ||||
4049 | case CALL_EXPR: | |||
4050 | { | |||
4051 | if (KOENIG_LOOKUP_P (t1)((tree_not_check2 (((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4051, __FUNCTION__, (CALL_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4051, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0) != KOENIG_LOOKUP_P (t2)((tree_not_check2 (((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4051, __FUNCTION__, (CALL_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4051, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0)) | |||
4052 | return false; | |||
4053 | ||||
4054 | if (!called_fns_equal (t1, t2)) | |||
4055 | return false; | |||
4056 | ||||
4057 | call_expr_arg_iterator iter1, iter2; | |||
4058 | init_call_expr_arg_iterator (t1, &iter1); | |||
4059 | init_call_expr_arg_iterator (t2, &iter2); | |||
4060 | if (iter1.n != iter2.n) | |||
4061 | return false; | |||
4062 | ||||
4063 | while (more_call_expr_args_p (&iter1)) | |||
4064 | { | |||
4065 | tree arg1 = next_call_expr_arg (&iter1); | |||
4066 | tree arg2 = next_call_expr_arg (&iter2); | |||
4067 | ||||
4068 | gcc_checking_assert (arg1 && arg2)((void)(!(arg1 && arg2) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4068, __FUNCTION__), 0 : 0)); | |||
4069 | if (!cp_tree_equal (arg1, arg2)) | |||
4070 | return false; | |||
4071 | } | |||
4072 | ||||
4073 | return true; | |||
4074 | } | |||
4075 | ||||
4076 | case TARGET_EXPR: | |||
4077 | { | |||
4078 | tree o1 = TREE_OPERAND (t1, 0)(*((const_cast<tree*> (tree_operand_check ((t1), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4078, __FUNCTION__))))); | |||
4079 | tree o2 = TREE_OPERAND (t2, 0)(*((const_cast<tree*> (tree_operand_check ((t2), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4079, __FUNCTION__))))); | |||
4080 | ||||
4081 | /* Special case: if either target is an unallocated VAR_DECL, | |||
4082 | it means that it's going to be unified with whatever the | |||
4083 | TARGET_EXPR is really supposed to initialize, so treat it | |||
4084 | as being equivalent to anything. */ | |||
4085 | if (VAR_P (o1)(((enum tree_code) (o1)->base.code) == VAR_DECL) && DECL_NAME (o1)((contains_struct_check ((o1), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4085, __FUNCTION__))->decl_minimal.name) == NULL_TREE(tree) nullptr | |||
4086 | && !DECL_RTL_SET_P (o1)(((tree_contains_struct[(((enum tree_code) (o1)->base.code ))][(TS_DECL_WRTL)])) && (contains_struct_check ((o1) , (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4086, __FUNCTION__))->decl_with_rtl.rtl != nullptr)) | |||
4087 | /*Nop*/; | |||
4088 | else if (VAR_P (o2)(((enum tree_code) (o2)->base.code) == VAR_DECL) && DECL_NAME (o2)((contains_struct_check ((o2), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4088, __FUNCTION__))->decl_minimal.name) == NULL_TREE(tree) nullptr | |||
4089 | && !DECL_RTL_SET_P (o2)(((tree_contains_struct[(((enum tree_code) (o2)->base.code ))][(TS_DECL_WRTL)])) && (contains_struct_check ((o2) , (TS_DECL_WRTL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4089, __FUNCTION__))->decl_with_rtl.rtl != nullptr)) | |||
4090 | /*Nop*/; | |||
4091 | else if (!cp_tree_equal (o1, o2)) | |||
4092 | return false; | |||
4093 | ||||
4094 | return cp_tree_equal (TREE_OPERAND (t1, 1)(*((const_cast<tree*> (tree_operand_check ((t1), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4094, __FUNCTION__))))), TREE_OPERAND (t2, 1)(*((const_cast<tree*> (tree_operand_check ((t2), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4094, __FUNCTION__)))))); | |||
4095 | } | |||
4096 | ||||
4097 | case PARM_DECL: | |||
4098 | /* For comparing uses of parameters in late-specified return types | |||
4099 | with an out-of-class definition of the function, but can also come | |||
4100 | up for expressions that involve 'this' in a member function | |||
4101 | template. */ | |||
4102 | ||||
4103 | if (comparing_specializations | |||
4104 | && DECL_CONTEXT (t1)((contains_struct_check ((t1), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4104, __FUNCTION__))->decl_minimal.context) != DECL_CONTEXT (t2)((contains_struct_check ((t2), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4104, __FUNCTION__))->decl_minimal.context)) | |||
4105 | /* When comparing hash table entries, only an exact match is | |||
4106 | good enough; we don't want to replace 'this' with the | |||
4107 | version from another function. But be more flexible | |||
4108 | with parameters with identical contexts. */ | |||
4109 | return false; | |||
4110 | ||||
4111 | if (same_type_p (TREE_TYPE (t1), TREE_TYPE (t2))comptypes ((((contains_struct_check ((t1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4111, __FUNCTION__))->typed.type)), (((contains_struct_check ((t2), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4111, __FUNCTION__))->typed.type)), 0)) | |||
4112 | { | |||
4113 | if (DECL_ARTIFICIAL (t1)((contains_struct_check ((t1), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4113, __FUNCTION__))->decl_common.artificial_flag) ^ DECL_ARTIFICIAL (t2)((contains_struct_check ((t2), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4113, __FUNCTION__))->decl_common.artificial_flag)) | |||
4114 | return false; | |||
4115 | if (CONSTRAINT_VAR_P (t1)((contains_struct_check (((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4115, __FUNCTION__, (PARM_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4115, __FUNCTION__))->decl_common.lang_flag_2) ^ CONSTRAINT_VAR_P (t2)((contains_struct_check (((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4115, __FUNCTION__, (PARM_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4115, __FUNCTION__))->decl_common.lang_flag_2)) | |||
4116 | return false; | |||
4117 | if (DECL_ARTIFICIAL (t1)((contains_struct_check ((t1), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4117, __FUNCTION__))->decl_common.artificial_flag) | |||
4118 | || (DECL_PARM_LEVEL (t1)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check ((t1), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4118, __FUNCTION__))->decl_common.lang_specific); if ((( enum tree_code) (t1)->base.code) != PARM_DECL || lt->u. base.selector != lds_parm) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4118, __FUNCTION__); <->u.parm; })->level) == DECL_PARM_LEVEL (t2)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check ((t2), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4118, __FUNCTION__))->decl_common.lang_specific); if ((( enum tree_code) (t2)->base.code) != PARM_DECL || lt->u. base.selector != lds_parm) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4118, __FUNCTION__); <->u.parm; })->level) | |||
4119 | && DECL_PARM_INDEX (t1)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check ((t1), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4119, __FUNCTION__))->decl_common.lang_specific); if ((( enum tree_code) (t1)->base.code) != PARM_DECL || lt->u. base.selector != lds_parm) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4119, __FUNCTION__); <->u.parm; })->index) == DECL_PARM_INDEX (t2)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check ((t2), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4119, __FUNCTION__))->decl_common.lang_specific); if ((( enum tree_code) (t2)->base.code) != PARM_DECL || lt->u. base.selector != lds_parm) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4119, __FUNCTION__); <->u.parm; })->index))) | |||
4120 | return true; | |||
4121 | } | |||
4122 | return false; | |||
4123 | ||||
4124 | case VAR_DECL: | |||
4125 | case CONST_DECL: | |||
4126 | case FIELD_DECL: | |||
4127 | case FUNCTION_DECL: | |||
4128 | case TEMPLATE_DECL: | |||
4129 | case IDENTIFIER_NODE: | |||
4130 | case SSA_NAME: | |||
4131 | case USING_DECL: | |||
4132 | case DEFERRED_PARSE: | |||
4133 | return false; | |||
4134 | ||||
4135 | case BASELINK: | |||
4136 | return (BASELINK_BINFO (t1)(((struct tree_baselink*) (tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4136, __FUNCTION__, (BASELINK))))->binfo) == BASELINK_BINFO (t2)(((struct tree_baselink*) (tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4136, __FUNCTION__, (BASELINK))))->binfo) | |||
4137 | && BASELINK_ACCESS_BINFO (t1)(((struct tree_baselink*) (tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4137, __FUNCTION__, (BASELINK))))->access_binfo) == BASELINK_ACCESS_BINFO (t2)(((struct tree_baselink*) (tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4137, __FUNCTION__, (BASELINK))))->access_binfo) | |||
4138 | && BASELINK_QUALIFIED_P (t1)((tree_not_check2 (((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4138, __FUNCTION__, (BASELINK)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4138, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0) == BASELINK_QUALIFIED_P (t2)((tree_not_check2 (((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4138, __FUNCTION__, (BASELINK)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4138, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0) | |||
4139 | && cp_tree_equal (BASELINK_FUNCTIONS (t1)(((struct tree_baselink*) (tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4139, __FUNCTION__, (BASELINK))))->functions), | |||
4140 | BASELINK_FUNCTIONS (t2)(((struct tree_baselink*) (tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4140, __FUNCTION__, (BASELINK))))->functions))); | |||
4141 | ||||
4142 | case TEMPLATE_PARM_INDEX: | |||
4143 | return (TEMPLATE_PARM_IDX (t1)(((template_parm_index*)(tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4143, __FUNCTION__, (TEMPLATE_PARM_INDEX))))->index) == TEMPLATE_PARM_IDX (t2)(((template_parm_index*)(tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4143, __FUNCTION__, (TEMPLATE_PARM_INDEX))))->index) | |||
4144 | && TEMPLATE_PARM_LEVEL (t1)(((template_parm_index*)(tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4144, __FUNCTION__, (TEMPLATE_PARM_INDEX))))->level) == TEMPLATE_PARM_LEVEL (t2)(((template_parm_index*)(tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4144, __FUNCTION__, (TEMPLATE_PARM_INDEX))))->level) | |||
4145 | && (TEMPLATE_PARM_PARAMETER_PACK (t1)(((tree_not_check2 (((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4145, __FUNCTION__, (TEMPLATE_PARM_INDEX)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4145, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0)) | |||
4146 | == TEMPLATE_PARM_PARAMETER_PACK (t2)(((tree_not_check2 (((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4146, __FUNCTION__, (TEMPLATE_PARM_INDEX)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4146, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0))) | |||
4147 | && same_type_p (TREE_TYPE (TEMPLATE_PARM_DECL (t1)),comptypes ((((contains_struct_check (((((template_parm_index* )(tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4147, __FUNCTION__, (TEMPLATE_PARM_INDEX))))->decl)), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4147, __FUNCTION__))->typed.type)), (((contains_struct_check (((((template_parm_index*)(tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4148, __FUNCTION__, (TEMPLATE_PARM_INDEX))))->decl)), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4148, __FUNCTION__))->typed.type)), 0) | |||
4148 | TREE_TYPE (TEMPLATE_PARM_DECL (t2)))comptypes ((((contains_struct_check (((((template_parm_index* )(tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4147, __FUNCTION__, (TEMPLATE_PARM_INDEX))))->decl)), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4147, __FUNCTION__))->typed.type)), (((contains_struct_check (((((template_parm_index*)(tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4148, __FUNCTION__, (TEMPLATE_PARM_INDEX))))->decl)), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4148, __FUNCTION__))->typed.type)), 0)); | |||
4149 | ||||
4150 | case TEMPLATE_ID_EXPR: | |||
4151 | if (!cp_tree_equal (TREE_OPERAND (t1, 0)(*((const_cast<tree*> (tree_operand_check ((t1), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4151, __FUNCTION__))))), TREE_OPERAND (t2, 0)(*((const_cast<tree*> (tree_operand_check ((t2), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4151, __FUNCTION__))))))) | |||
4152 | return false; | |||
4153 | if (!comp_template_args (TREE_OPERAND (t1, 1)(*((const_cast<tree*> (tree_operand_check ((t1), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4153, __FUNCTION__))))), TREE_OPERAND (t2, 1)(*((const_cast<tree*> (tree_operand_check ((t2), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4153, __FUNCTION__))))))) | |||
4154 | return false; | |||
4155 | return true; | |||
4156 | ||||
4157 | case CONSTRAINT_INFO: | |||
4158 | return cp_tree_equal (CI_ASSOCIATED_CONSTRAINTS (t1)check_constraint_info (check_nonnull (t1))->associated_constr, | |||
4159 | CI_ASSOCIATED_CONSTRAINTS (t2)check_constraint_info (check_nonnull (t2))->associated_constr); | |||
4160 | ||||
4161 | case CHECK_CONSTR: | |||
4162 | return (CHECK_CONSTR_CONCEPT (t1)(*((const_cast<tree*> (tree_operand_check (((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4162, __FUNCTION__, (CHECK_CONSTR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4162, __FUNCTION__))))) == CHECK_CONSTR_CONCEPT (t2)(*((const_cast<tree*> (tree_operand_check (((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4162, __FUNCTION__, (CHECK_CONSTR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4162, __FUNCTION__))))) | |||
4163 | && comp_template_args (CHECK_CONSTR_ARGS (t1)(*((const_cast<tree*> (tree_operand_check (((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4163, __FUNCTION__, (CHECK_CONSTR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4163, __FUNCTION__))))), | |||
4164 | CHECK_CONSTR_ARGS (t2)(*((const_cast<tree*> (tree_operand_check (((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4164, __FUNCTION__, (CHECK_CONSTR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4164, __FUNCTION__))))))); | |||
4165 | ||||
4166 | case TREE_VEC: | |||
4167 | /* These are template args. Really we should be getting the | |||
4168 | caller to do this as it knows it to be true. */ | |||
4169 | if (!comp_template_args (t1, t2, NULLnullptr, NULLnullptr, false)) | |||
4170 | return false; | |||
4171 | return true; | |||
4172 | ||||
4173 | case SIZEOF_EXPR: | |||
4174 | case ALIGNOF_EXPR: | |||
4175 | { | |||
4176 | tree o1 = TREE_OPERAND (t1, 0)(*((const_cast<tree*> (tree_operand_check ((t1), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4176, __FUNCTION__))))); | |||
4177 | tree o2 = TREE_OPERAND (t2, 0)(*((const_cast<tree*> (tree_operand_check ((t2), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4177, __FUNCTION__))))); | |||
4178 | ||||
4179 | if (code1 == SIZEOF_EXPR) | |||
4180 | { | |||
4181 | if (SIZEOF_EXPR_TYPE_P (t1)((tree_not_check2 (((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4181, __FUNCTION__, (SIZEOF_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4181, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0)) | |||
4182 | o1 = TREE_TYPE (o1)((contains_struct_check ((o1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4182, __FUNCTION__))->typed.type); | |||
4183 | if (SIZEOF_EXPR_TYPE_P (t2)((tree_not_check2 (((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4183, __FUNCTION__, (SIZEOF_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4183, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0)) | |||
4184 | o2 = TREE_TYPE (o2)((contains_struct_check ((o2), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4184, __FUNCTION__))->typed.type); | |||
4185 | } | |||
4186 | else if (ALIGNOF_EXPR_STD_P (t1)((tree_not_check2 (((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4186, __FUNCTION__, (ALIGNOF_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4186, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0) != ALIGNOF_EXPR_STD_P (t2)((tree_not_check2 (((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4186, __FUNCTION__, (ALIGNOF_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4186, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits .lang_flag_0)) | |||
4187 | return false; | |||
4188 | ||||
4189 | if (TREE_CODE (o1)((enum tree_code) (o1)->base.code) != TREE_CODE (o2)((enum tree_code) (o2)->base.code)) | |||
4190 | return false; | |||
4191 | ||||
4192 | if (ARGUMENT_PACK_P (o1)(((enum tree_code) (o1)->base.code) == TYPE_ARGUMENT_PACK || ((enum tree_code) (o1)->base.code) == NONTYPE_ARGUMENT_PACK )) | |||
4193 | return template_args_equal (o1, o2); | |||
4194 | else if (TYPE_P (o1)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (o1)->base.code))] == tcc_type)) | |||
4195 | return same_type_p (o1, o2)comptypes ((o1), (o2), 0); | |||
4196 | else | |||
4197 | return cp_tree_equal (o1, o2); | |||
4198 | } | |||
4199 | ||||
4200 | case MODOP_EXPR: | |||
4201 | { | |||
4202 | tree t1_op1, t2_op1; | |||
4203 | ||||
4204 | if (!cp_tree_equal (TREE_OPERAND (t1, 0)(*((const_cast<tree*> (tree_operand_check ((t1), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4204, __FUNCTION__))))), TREE_OPERAND (t2, 0)(*((const_cast<tree*> (tree_operand_check ((t2), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4204, __FUNCTION__))))))) | |||
4205 | return false; | |||
4206 | ||||
4207 | t1_op1 = TREE_OPERAND (t1, 1)(*((const_cast<tree*> (tree_operand_check ((t1), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4207, __FUNCTION__))))); | |||
4208 | t2_op1 = TREE_OPERAND (t2, 1)(*((const_cast<tree*> (tree_operand_check ((t2), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4208, __FUNCTION__))))); | |||
4209 | if (TREE_CODE (t1_op1)((enum tree_code) (t1_op1)->base.code) != TREE_CODE (t2_op1)((enum tree_code) (t2_op1)->base.code)) | |||
4210 | return false; | |||
4211 | ||||
4212 | return cp_tree_equal (TREE_OPERAND (t1, 2)(*((const_cast<tree*> (tree_operand_check ((t1), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4212, __FUNCTION__))))), TREE_OPERAND (t2, 2)(*((const_cast<tree*> (tree_operand_check ((t2), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4212, __FUNCTION__)))))); | |||
4213 | } | |||
4214 | ||||
4215 | case PTRMEM_CST: | |||
4216 | /* Two pointer-to-members are the same if they point to the same | |||
4217 | field or function in the same class. */ | |||
4218 | if (PTRMEM_CST_MEMBER (t1)(((ptrmem_cst_t)(tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4218, __FUNCTION__, (PTRMEM_CST))))->member) != PTRMEM_CST_MEMBER (t2)(((ptrmem_cst_t)(tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4218, __FUNCTION__, (PTRMEM_CST))))->member)) | |||
4219 | return false; | |||
4220 | ||||
4221 | return same_type_p (PTRMEM_CST_CLASS (t1), PTRMEM_CST_CLASS (t2))comptypes ((((((enum tree_code) (((contains_struct_check (((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__, (PTRMEM_CST)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__))->typed.type))->base.code) == OFFSET_TYPE ) ? ((tree_check ((((contains_struct_check (((tree_check ((t1 ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__, (PTRMEM_CST)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__, (OFFSET_TYPE)))->type_non_common.maxval ) : ((tree_check2 ((((contains_struct_check (((cp_build_qualified_type (((contains_struct_check ((((tree_check3 ((((contains_struct_check (((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__, (PTRMEM_CST)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE )))->type_non_common.values)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__))->typed.type), cp_type_quals (((contains_struct_check (((tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__, (PTRMEM_CST)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__))->typed.type))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common .maxval))), (((((enum tree_code) (((contains_struct_check ((( tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__, (PTRMEM_CST)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__))->typed.type))->base.code) == OFFSET_TYPE ) ? ((tree_check ((((contains_struct_check (((tree_check ((t2 ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__, (PTRMEM_CST)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__, (OFFSET_TYPE)))->type_non_common.maxval ) : ((tree_check2 ((((contains_struct_check (((cp_build_qualified_type (((contains_struct_check ((((tree_check3 ((((contains_struct_check (((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__, (PTRMEM_CST)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE )))->type_non_common.values)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__))->typed.type), cp_type_quals (((contains_struct_check (((tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__, (PTRMEM_CST)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__))->typed.type))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4221, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common .maxval))), 0); | |||
4222 | ||||
4223 | case OVERLOAD: | |||
4224 | { | |||
4225 | /* Two overloads. Must be exactly the same set of decls. */ | |||
4226 | lkp_iterator first (t1); | |||
4227 | lkp_iterator second (t2); | |||
4228 | ||||
4229 | for (; first && second; ++first, ++second) | |||
4230 | if (*first != *second) | |||
4231 | return false; | |||
4232 | return !(first || second); | |||
4233 | } | |||
4234 | ||||
4235 | case TRAIT_EXPR: | |||
4236 | if (TRAIT_EXPR_KIND (t1)(((struct tree_trait_expr *)(tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4236, __FUNCTION__, (TRAIT_EXPR))))->kind) != TRAIT_EXPR_KIND (t2)(((struct tree_trait_expr *)(tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4236, __FUNCTION__, (TRAIT_EXPR))))->kind)) | |||
4237 | return false; | |||
4238 | return cp_tree_equal (TRAIT_EXPR_TYPE1 (t1)(((struct tree_trait_expr *)(tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4238, __FUNCTION__, (TRAIT_EXPR))))->type1), TRAIT_EXPR_TYPE1 (t2)(((struct tree_trait_expr *)(tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4238, __FUNCTION__, (TRAIT_EXPR))))->type1)) | |||
4239 | && cp_tree_equal (TRAIT_EXPR_TYPE2 (t1)(((struct tree_trait_expr *)(tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4239, __FUNCTION__, (TRAIT_EXPR))))->type2), TRAIT_EXPR_TYPE2 (t2)(((struct tree_trait_expr *)(tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4239, __FUNCTION__, (TRAIT_EXPR))))->type2)); | |||
4240 | ||||
4241 | case NON_LVALUE_EXPR: | |||
4242 | case VIEW_CONVERT_EXPR: | |||
4243 | /* Used for location wrappers with possibly NULL types. */ | |||
4244 | if (!TREE_TYPE (t1)((contains_struct_check ((t1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4244, __FUNCTION__))->typed.type) || !TREE_TYPE (t2)((contains_struct_check ((t2), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4244, __FUNCTION__))->typed.type)) | |||
4245 | { | |||
4246 | if (TREE_TYPE (t1)((contains_struct_check ((t1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4246, __FUNCTION__))->typed.type) || TREE_TYPE (t2)((contains_struct_check ((t2), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4246, __FUNCTION__))->typed.type)) | |||
4247 | return false; | |||
4248 | break; | |||
4249 | } | |||
4250 | /* FALLTHROUGH */ | |||
4251 | ||||
4252 | case CAST_EXPR: | |||
4253 | case STATIC_CAST_EXPR: | |||
4254 | case REINTERPRET_CAST_EXPR: | |||
4255 | case CONST_CAST_EXPR: | |||
4256 | case DYNAMIC_CAST_EXPR: | |||
4257 | case IMPLICIT_CONV_EXPR: | |||
4258 | case NEW_EXPR: | |||
4259 | case BIT_CAST_EXPR: | |||
4260 | CASE_CONVERTcase NOP_EXPR: case CONVERT_EXPR: | |||
4261 | if (!same_type_p (TREE_TYPE (t1), TREE_TYPE (t2))comptypes ((((contains_struct_check ((t1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4261, __FUNCTION__))->typed.type)), (((contains_struct_check ((t2), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4261, __FUNCTION__))->typed.type)), 0)) | |||
4262 | return false; | |||
4263 | /* Now compare operands as usual. */ | |||
4264 | break; | |||
4265 | ||||
4266 | case DEFERRED_NOEXCEPT: | |||
4267 | return (cp_tree_equal (DEFERRED_NOEXCEPT_PATTERN (t1)(((struct tree_deferred_noexcept *)(tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4267, __FUNCTION__, (DEFERRED_NOEXCEPT))))->pattern), | |||
4268 | DEFERRED_NOEXCEPT_PATTERN (t2)(((struct tree_deferred_noexcept *)(tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4268, __FUNCTION__, (DEFERRED_NOEXCEPT))))->pattern)) | |||
4269 | && comp_template_args (DEFERRED_NOEXCEPT_ARGS (t1)(((struct tree_deferred_noexcept *)(tree_check ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4269, __FUNCTION__, (DEFERRED_NOEXCEPT))))->args), | |||
4270 | DEFERRED_NOEXCEPT_ARGS (t2)(((struct tree_deferred_noexcept *)(tree_check ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4270, __FUNCTION__, (DEFERRED_NOEXCEPT))))->args))); | |||
4271 | ||||
4272 | case LAMBDA_EXPR: | |||
4273 | /* Two lambda-expressions are never considered equivalent. */ | |||
4274 | return false; | |||
4275 | ||||
4276 | case TYPE_ARGUMENT_PACK: | |||
4277 | case NONTYPE_ARGUMENT_PACK: | |||
4278 | { | |||
4279 | tree p1 = ARGUMENT_PACK_ARGS (t1)(((enum tree_code) ((tree_check2 ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4279, __FUNCTION__, (TYPE_ARGUMENT_PACK), (NONTYPE_ARGUMENT_PACK ))))->base.code) == TYPE_ARGUMENT_PACK ? ((contains_struct_check ((t1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4279, __FUNCTION__))->typed.type) : (*((const_cast<tree *> (tree_operand_check ((t1), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4279, __FUNCTION__)))))); | |||
4280 | tree p2 = ARGUMENT_PACK_ARGS (t2)(((enum tree_code) ((tree_check2 ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4280, __FUNCTION__, (TYPE_ARGUMENT_PACK), (NONTYPE_ARGUMENT_PACK ))))->base.code) == TYPE_ARGUMENT_PACK ? ((contains_struct_check ((t2), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4280, __FUNCTION__))->typed.type) : (*((const_cast<tree *> (tree_operand_check ((t2), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4280, __FUNCTION__)))))); | |||
4281 | int len = TREE_VEC_LENGTH (p1)((tree_check ((p1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4281, __FUNCTION__, (TREE_VEC)))->base.u.length); | |||
4282 | if (TREE_VEC_LENGTH (p2)((tree_check ((p2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4282, __FUNCTION__, (TREE_VEC)))->base.u.length) != len) | |||
4283 | return false; | |||
4284 | ||||
4285 | for (int ix = 0; ix != len; ix++) | |||
4286 | if (!template_args_equal (TREE_VEC_ELT (p1, ix)(*((const_cast<tree *> (tree_vec_elt_check ((p1), (ix), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4286, __FUNCTION__))))), | |||
4287 | TREE_VEC_ELT (p2, ix)(*((const_cast<tree *> (tree_vec_elt_check ((p2), (ix), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4287, __FUNCTION__))))))) | |||
4288 | return false; | |||
4289 | return true; | |||
4290 | } | |||
4291 | ||||
4292 | case EXPR_PACK_EXPANSION: | |||
4293 | if (!cp_tree_equal (PACK_EXPANSION_PATTERN (t1)(((enum tree_code) ((tree_check2 ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4293, __FUNCTION__, (TYPE_PACK_EXPANSION), (EXPR_PACK_EXPANSION ))))->base.code) == TYPE_PACK_EXPANSION ? ((contains_struct_check ((t1), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4293, __FUNCTION__))->typed.type) : (*((const_cast<tree *> (tree_operand_check ((t1), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4293, __FUNCTION__)))))), | |||
4294 | PACK_EXPANSION_PATTERN (t2)(((enum tree_code) ((tree_check2 ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4294, __FUNCTION__, (TYPE_PACK_EXPANSION), (EXPR_PACK_EXPANSION ))))->base.code) == TYPE_PACK_EXPANSION ? ((contains_struct_check ((t2), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4294, __FUNCTION__))->typed.type) : (*((const_cast<tree *> (tree_operand_check ((t2), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4294, __FUNCTION__)))))))) | |||
4295 | return false; | |||
4296 | if (!comp_template_args (PACK_EXPANSION_EXTRA_ARGS (t1)*(((enum tree_code) ((tree_check2 ((t1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4296, __FUNCTION__, (TYPE_PACK_EXPANSION), (EXPR_PACK_EXPANSION ))))->base.code) == TYPE_PACK_EXPANSION ? &((tree_class_check ((t1), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4296, __FUNCTION__))->type_non_common.maxval) : &(*( (const_cast<tree*> (tree_operand_check (((t1)), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4296, __FUNCTION__)))))), | |||
4297 | PACK_EXPANSION_EXTRA_ARGS (t2)*(((enum tree_code) ((tree_check2 ((t2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4297, __FUNCTION__, (TYPE_PACK_EXPANSION), (EXPR_PACK_EXPANSION ))))->base.code) == TYPE_PACK_EXPANSION ? &((tree_class_check ((t2), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4297, __FUNCTION__))->type_non_common.maxval) : &(*( (const_cast<tree*> (tree_operand_check (((t2)), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4297, __FUNCTION__)))))))) | |||
4298 | return false; | |||
4299 | return true; | |||
4300 | ||||
4301 | case COMPONENT_REF: | |||
4302 | /* If we're comparing contract conditions of overrides, member references | |||
4303 | compare equal if they designate the same member. */ | |||
4304 | if (comparing_override_contracts) | |||
4305 | return equivalent_member_references (t1, t2); | |||
4306 | break; | |||
4307 | ||||
4308 | default: | |||
4309 | break; | |||
4310 | } | |||
4311 | ||||
4312 | switch (TREE_CODE_CLASS (code1)tree_code_type_tmpl <0>::tree_code_type[(int) (code1)]) | |||
4313 | { | |||
4314 | case tcc_unary: | |||
4315 | case tcc_binary: | |||
4316 | case tcc_comparison: | |||
4317 | case tcc_expression: | |||
4318 | case tcc_vl_exp: | |||
4319 | case tcc_reference: | |||
4320 | case tcc_statement: | |||
4321 | { | |||
4322 | int n = cp_tree_operand_length (t1); | |||
4323 | if (TREE_CODE_CLASS (code1)tree_code_type_tmpl <0>::tree_code_type[(int) (code1)] == tcc_vl_exp | |||
4324 | && n != TREE_OPERAND_LENGTH (t2)tree_operand_length (t2)) | |||
4325 | return false; | |||
4326 | ||||
4327 | for (int i = 0; i < n; ++i) | |||
4328 | if (!cp_tree_equal (TREE_OPERAND (t1, i)(*((const_cast<tree*> (tree_operand_check ((t1), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4328, __FUNCTION__))))), TREE_OPERAND (t2, i)(*((const_cast<tree*> (tree_operand_check ((t2), (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4328, __FUNCTION__))))))) | |||
4329 | return false; | |||
4330 | ||||
4331 | return true; | |||
4332 | } | |||
4333 | ||||
4334 | case tcc_type: | |||
4335 | return same_type_p (t1, t2)comptypes ((t1), (t2), 0); | |||
4336 | ||||
4337 | default: | |||
4338 | gcc_unreachable ()(fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4338, __FUNCTION__)); | |||
4339 | } | |||
4340 | ||||
4341 | /* We can get here with --disable-checking. */ | |||
4342 | return false; | |||
4343 | } | |||
4344 | ||||
4345 | /* The type of ARG when used as an lvalue. */ | |||
4346 | ||||
4347 | tree | |||
4348 | lvalue_type (tree arg) | |||
4349 | { | |||
4350 | tree type = TREE_TYPE (arg)((contains_struct_check ((arg), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4350, __FUNCTION__))->typed.type); | |||
4351 | return type; | |||
4352 | } | |||
4353 | ||||
4354 | /* The type of ARG for printing error messages; denote lvalues with | |||
4355 | reference types. */ | |||
4356 | ||||
4357 | tree | |||
4358 | error_type (tree arg) | |||
4359 | { | |||
4360 | tree type = TREE_TYPE (arg)((contains_struct_check ((arg), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4360, __FUNCTION__))->typed.type); | |||
4361 | ||||
4362 | if (TREE_CODE (type)((enum tree_code) (type)->base.code) == ARRAY_TYPE) | |||
4363 | ; | |||
4364 | else if (TREE_CODE (type)((enum tree_code) (type)->base.code) == ERROR_MARK) | |||
4365 | ; | |||
4366 | else if (lvalue_p (arg)) | |||
4367 | type = build_reference_type (lvalue_type (arg)); | |||
4368 | else if (MAYBE_CLASS_TYPE_P (type)((((enum tree_code) (type)->base.code) == TEMPLATE_TYPE_PARM || ((enum tree_code) (type)->base.code) == TYPENAME_TYPE || ((enum tree_code) (type)->base.code) == TYPEOF_TYPE || (( enum tree_code) (type)->base.code) == BOUND_TEMPLATE_TEMPLATE_PARM || ((enum tree_code) (type)->base.code) == DECLTYPE_TYPE || ((enum tree_code) (type)->base.code) == TRAIT_TYPE || ((enum tree_code) (type)->base.code) == DEPENDENT_OPERATOR_TYPE) || (((((enum tree_code) (type)->base.code)) == RECORD_TYPE || (((enum tree_code) (type)->base.code)) == UNION_TYPE) && ((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4368, __FUNCTION__))->type_common.lang_flag_5)))) | |||
4369 | type = lvalue_type (arg); | |||
4370 | ||||
4371 | return type; | |||
4372 | } | |||
4373 | ||||
4374 | /* Does FUNCTION use a variable-length argument list? */ | |||
4375 | ||||
4376 | int | |||
4377 | varargs_function_p (const_tree function) | |||
4378 | { | |||
4379 | return stdarg_p (TREE_TYPE (function)((contains_struct_check ((function), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4379, __FUNCTION__))->typed.type)); | |||
4380 | } | |||
4381 | ||||
4382 | /* Returns 1 if decl is a member of a class. */ | |||
4383 | ||||
4384 | int | |||
4385 | member_p (const_tree decl) | |||
4386 | { | |||
4387 | const_tree const ctx = DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4387, __FUNCTION__))->decl_minimal.context); | |||
4388 | return (ctx && TYPE_P (ctx)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code ) (ctx)->base.code))] == tcc_type)); | |||
4389 | } | |||
4390 | ||||
4391 | /* Create a placeholder for member access where we don't actually have an | |||
4392 | object that the access is against. For a general declval<T> equivalent, | |||
4393 | use build_stub_object instead. */ | |||
4394 | ||||
4395 | tree | |||
4396 | build_dummy_object (tree type) | |||
4397 | { | |||
4398 | tree decl = build1 (CONVERT_EXPR, build_pointer_type (type), void_nodeglobal_trees[TI_VOID]); | |||
4399 | return cp_build_fold_indirect_ref (decl); | |||
4400 | } | |||
4401 | ||||
4402 | /* We've gotten a reference to a member of TYPE. Return *this if appropriate, | |||
4403 | or a dummy object otherwise. If BINFOP is non-0, it is filled with the | |||
4404 | binfo path from current_class_type to TYPE, or 0. */ | |||
4405 | ||||
4406 | tree | |||
4407 | maybe_dummy_object (tree type, tree* binfop) | |||
4408 | { | |||
4409 | tree decl, context; | |||
4410 | tree binfo; | |||
4411 | tree current = current_nonlambda_class_type (); | |||
4412 | ||||
4413 | if (current | |||
4414 | && (binfo = lookup_base (current, type, ba_any, NULLnullptr, | |||
4415 | tf_warning_or_error))) | |||
4416 | context = current; | |||
4417 | else | |||
4418 | { | |||
4419 | /* Reference from a nested class member function. */ | |||
4420 | context = type; | |||
4421 | binfo = TYPE_BINFO (type)((tree_check3 ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4421, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE )))->type_non_common.maxval); | |||
4422 | } | |||
4423 | ||||
4424 | if (binfop) | |||
4425 | *binfop = binfo; | |||
4426 | ||||
4427 | /* current_class_ref might not correspond to current_class_type if | |||
4428 | we're in tsubst_default_argument or a lambda-declarator; in either | |||
4429 | case, we want to use current_class_ref if it matches CONTEXT. */ | |||
4430 | tree ctype = current_class_ref(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun + 0)->language)->x_current_class_ref : &scope_chain ->x_current_class_ref)) ? TREE_TYPE (current_class_ref)((contains_struct_check (((*((cfun + 0) && ((cfun + 0 )->language) ? &((cfun + 0)->language)->x_current_class_ref : &scope_chain->x_current_class_ref))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4430, __FUNCTION__))->typed.type) : NULL_TREE(tree) nullptr; | |||
4431 | if (ctype | |||
4432 | && same_type_ignoring_top_level_qualifiers_p (ctype, context)) | |||
4433 | decl = current_class_ref(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun + 0)->language)->x_current_class_ref : &scope_chain ->x_current_class_ref)); | |||
4434 | else | |||
4435 | { | |||
4436 | /* Return a dummy object whose cv-quals are consistent with (the | |||
4437 | non-lambda) 'this' if available. */ | |||
4438 | if (ctype) | |||
4439 | { | |||
4440 | int quals = TYPE_UNQUALIFIED; | |||
4441 | if (tree lambda = CLASSTYPE_LAMBDA_EXPR (ctype)((((tree_class_check ((ctype), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4441, __FUNCTION__))->type_with_lang_specific.lang_specific ))->lambda_expr)) | |||
4442 | { | |||
4443 | if (tree cap = lambda_expr_this_capture (lambda, false)) | |||
4444 | quals = cp_type_quals (TREE_TYPE (TREE_TYPE (cap))((contains_struct_check ((((contains_struct_check ((cap), (TS_TYPED ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4444, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4444, __FUNCTION__))->typed.type)); | |||
4445 | } | |||
4446 | else | |||
4447 | quals = cp_type_quals (ctype); | |||
4448 | context = cp_build_qualified_type (context, quals); | |||
4449 | } | |||
4450 | decl = build_dummy_object (context); | |||
4451 | } | |||
4452 | ||||
4453 | return decl; | |||
4454 | } | |||
4455 | ||||
4456 | /* Returns 1 if OB is a placeholder object, or a pointer to one. */ | |||
4457 | ||||
4458 | bool | |||
4459 | is_dummy_object (const_tree ob) | |||
4460 | { | |||
4461 | if (INDIRECT_REF_P (ob)(((enum tree_code) (ob)->base.code) == INDIRECT_REF)) | |||
4462 | ob = TREE_OPERAND (ob, 0)(*((const_cast<tree*> (tree_operand_check ((ob), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4462, __FUNCTION__))))); | |||
4463 | return (TREE_CODE (ob)((enum tree_code) (ob)->base.code) == CONVERT_EXPR | |||
4464 | && TREE_OPERAND (ob, 0)(*((const_cast<tree*> (tree_operand_check ((ob), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4464, __FUNCTION__))))) == void_nodeglobal_trees[TI_VOID]); | |||
4465 | } | |||
4466 | ||||
4467 | /* Returns true if TYPE is char, unsigned char, or std::byte. */ | |||
4468 | ||||
4469 | bool | |||
4470 | is_byte_access_type (tree type) | |||
4471 | { | |||
4472 | type = TYPE_MAIN_VARIANT (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4472, __FUNCTION__))->type_common.main_variant); | |||
4473 | if (type == char_type_nodeinteger_types[itk_char] | |||
4474 | || type == unsigned_char_type_nodeinteger_types[itk_unsigned_char]) | |||
4475 | return true; | |||
4476 | ||||
4477 | return (TREE_CODE (type)((enum tree_code) (type)->base.code) == ENUMERAL_TYPE | |||
4478 | && TYPE_CONTEXT (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4478, __FUNCTION__))->type_common.context) == std_nodecp_global_trees[CPTI_STD] | |||
4479 | && !strcmp ("byte", TYPE_NAME_STRING (type)(((const char *) (tree_check (((((tree_class_check ((type), ( tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4479, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4479, __FUNCTION__))->type_common.name))->base.code)) ] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4479, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL ), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4479, __FUNCTION__))->decl_minimal.name) : ((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4479, __FUNCTION__))->type_common.name))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4479, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.str )))); | |||
4480 | } | |||
4481 | ||||
4482 | /* Returns true if TYPE is unsigned char or std::byte. */ | |||
4483 | ||||
4484 | bool | |||
4485 | is_byte_access_type_not_plain_char (tree type) | |||
4486 | { | |||
4487 | type = TYPE_MAIN_VARIANT (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4487, __FUNCTION__))->type_common.main_variant); | |||
4488 | if (type == char_type_nodeinteger_types[itk_char]) | |||
4489 | return false; | |||
4490 | ||||
4491 | return is_byte_access_type (type); | |||
4492 | } | |||
4493 | ||||
4494 | /* Returns 1 iff type T is something we want to treat as a scalar type for | |||
4495 | the purpose of deciding whether it is trivial/POD/standard-layout. */ | |||
4496 | ||||
4497 | bool | |||
4498 | scalarish_type_p (const_tree t) | |||
4499 | { | |||
4500 | if (t == error_mark_nodeglobal_trees[TI_ERROR_MARK]) | |||
4501 | return 1; | |||
4502 | ||||
4503 | return (SCALAR_TYPE_P (t)((((enum tree_code) (t)->base.code) == OFFSET_TYPE) || ((enum tree_code) (t)->base.code) == ENUMERAL_TYPE || ((((enum tree_code ) (t)->base.code) == BOOLEAN_TYPE || ((enum tree_code) (t) ->base.code) == INTEGER_TYPE) || ((enum tree_code) (t)-> base.code) == REAL_TYPE || ((enum tree_code) (t)->base.code ) == COMPLEX_TYPE) || (((enum tree_code) (t)->base.code) == POINTER_TYPE) || (((enum tree_code) (t)->base.code) == RECORD_TYPE && (((tree_class_check (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4503, __FUNCTION__, (RECORD_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4503, __FUNCTION__))->type_common.lang_flag_2))) || (((enum tree_code) (t)->base.code) == NULLPTR_TYPE)) || VECTOR_TYPE_P (t)(((enum tree_code) (t)->base.code) == VECTOR_TYPE)); | |||
4504 | } | |||
4505 | ||||
4506 | /* Returns true iff T requires non-trivial default initialization. */ | |||
4507 | ||||
4508 | bool | |||
4509 | type_has_nontrivial_default_init (const_tree t) | |||
4510 | { | |||
4511 | t = strip_array_types (CONST_CAST_TREE (t)(const_cast<union tree_node *> (((t))))); | |||
4512 | ||||
4513 | if (CLASS_TYPE_P (t)(((((enum tree_code) (t)->base.code)) == RECORD_TYPE || (( (enum tree_code) (t)->base.code)) == UNION_TYPE) && ((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4513, __FUNCTION__))->type_common.lang_flag_5))) | |||
4514 | return TYPE_HAS_COMPLEX_DFLT (t)((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4514, __FUNCTION__))->type_with_lang_specific.lang_specific ))->has_complex_dflt); | |||
4515 | else | |||
4516 | return 0; | |||
4517 | } | |||
4518 | ||||
4519 | /* Track classes with only deleted copy/move constructors so that we can warn | |||
4520 | if they are used in call/return by value. */ | |||
4521 | ||||
4522 | static GTY(()) hash_set<tree>* deleted_copy_types; | |||
4523 | static void | |||
4524 | remember_deleted_copy (const_tree t) | |||
4525 | { | |||
4526 | if (!deleted_copy_types) | |||
4527 | deleted_copy_types = hash_set<tree>::create_ggc(37); | |||
4528 | deleted_copy_types->add (CONST_CAST_TREE (t)(const_cast<union tree_node *> (((t))))); | |||
4529 | } | |||
4530 | void | |||
4531 | maybe_warn_parm_abi (tree t, location_t loc) | |||
4532 | { | |||
4533 | if (!deleted_copy_types | |||
4534 | || !deleted_copy_types->contains (t)) | |||
4535 | return; | |||
4536 | ||||
4537 | if ((flag_abi_versionglobal_options.x_flag_abi_version == 12 || warn_abi_version == 12) | |||
4538 | && classtype_has_non_deleted_move_ctor (t)) | |||
4539 | { | |||
4540 | bool w; | |||
4541 | auto_diagnostic_group d; | |||
4542 | if (flag_abi_versionglobal_options.x_flag_abi_version > 12) | |||
4543 | w = warning_at (loc, OPT_Wabi, "%<-fabi-version=13%> (GCC 8.2) fixes " | |||
4544 | "the calling convention for %qT, which was " | |||
4545 | "accidentally changed in 8.1", t); | |||
4546 | else | |||
4547 | w = warning_at (loc, OPT_Wabi, "%<-fabi-version=12%> (GCC 8.1) " | |||
4548 | "accidentally changes the calling convention for %qT", | |||
4549 | t); | |||
4550 | if (w) | |||
4551 | inform (location_of (t), " declared here"); | |||
4552 | return; | |||
4553 | } | |||
4554 | ||||
4555 | auto_diagnostic_group d; | |||
4556 | if (warning_at (loc, OPT_Wabi, "the calling convention for %qT changes in " | |||
4557 | "%<-fabi-version=13%> (GCC 8.2)", t)) | |||
4558 | inform (location_of (t), " because all of its copy and move " | |||
4559 | "constructors are deleted"); | |||
4560 | } | |||
4561 | ||||
4562 | /* Returns true iff copying an object of type T (including via move | |||
4563 | constructor) is non-trivial. That is, T has no non-trivial copy | |||
4564 | constructors and no non-trivial move constructors, and not all copy/move | |||
4565 | constructors are deleted. This function implements the ABI notion of | |||
4566 | non-trivial copy, which has diverged from the one in the standard. */ | |||
4567 | ||||
4568 | bool | |||
4569 | type_has_nontrivial_copy_init (const_tree type) | |||
4570 | { | |||
4571 | tree t = strip_array_types (CONST_CAST_TREE (type)(const_cast<union tree_node *> (((type))))); | |||
4572 | ||||
4573 | if (CLASS_TYPE_P (t)(((((enum tree_code) (t)->base.code)) == RECORD_TYPE || (( (enum tree_code) (t)->base.code)) == UNION_TYPE) && ((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4573, __FUNCTION__))->type_common.lang_flag_5))) | |||
4574 | { | |||
4575 | gcc_assert (COMPLETE_TYPE_P (t))((void)(!((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4575, __FUNCTION__))->type_common.size) != (tree) nullptr )) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4575, __FUNCTION__), 0 : 0)); | |||
4576 | ||||
4577 | if (TYPE_HAS_COMPLEX_COPY_CTOR (t)((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4577, __FUNCTION__))->type_with_lang_specific.lang_specific ))->has_complex_copy_ctor) | |||
4578 | || TYPE_HAS_COMPLEX_MOVE_CTOR (t)((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4578, __FUNCTION__))->type_with_lang_specific.lang_specific ))->has_complex_move_ctor)) | |||
4579 | /* Nontrivial. */ | |||
4580 | return true; | |||
4581 | ||||
4582 | if (cxx_dialect < cxx11) | |||
4583 | /* No deleted functions before C++11. */ | |||
4584 | return false; | |||
4585 | ||||
4586 | /* Before ABI v12 we did a bitwise copy of types with only deleted | |||
4587 | copy/move constructors. */ | |||
4588 | if (!abi_version_at_least (12)(global_options.x_flag_abi_version == 0 || global_options.x_flag_abi_version >= (12)) | |||
4589 | && !(warn_abiglobal_options.x_warn_abi && abi_version_crosses (12)((global_options.x_flag_abi_version == 0 || global_options.x_flag_abi_version >= (12)) != (warn_abi_version == 0 || warn_abi_version >= (12))))) | |||
4590 | return false; | |||
4591 | ||||
4592 | bool saw_copy = false; | |||
4593 | bool saw_non_deleted = false; | |||
4594 | bool saw_non_deleted_move = false; | |||
4595 | ||||
4596 | if (CLASSTYPE_LAZY_MOVE_CTOR (t)((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4596, __FUNCTION__))->type_with_lang_specific.lang_specific ))->lazy_move_ctor)) | |||
4597 | saw_copy = saw_non_deleted = true; | |||
4598 | else if (CLASSTYPE_LAZY_COPY_CTOR (t)((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4598, __FUNCTION__))->type_with_lang_specific.lang_specific ))->lazy_copy_ctor)) | |||
4599 | { | |||
4600 | saw_copy = true; | |||
4601 | if (classtype_has_move_assign_or_move_ctor_p (t, true)) | |||
4602 | /* [class.copy]/8 If the class definition declares a move | |||
4603 | constructor or move assignment operator, the implicitly declared | |||
4604 | copy constructor is defined as deleted.... */; | |||
4605 | else | |||
4606 | /* Any other reason the implicitly-declared function would be | |||
4607 | deleted would also cause TYPE_HAS_COMPLEX_COPY_CTOR to be | |||
4608 | set. */ | |||
4609 | saw_non_deleted = true; | |||
4610 | } | |||
4611 | ||||
4612 | if (!saw_non_deleted) | |||
4613 | for (ovl_iterator iter (CLASSTYPE_CONSTRUCTORS (t)(get_class_binding_direct (t, cp_global_trees[CPTI_CTOR_IDENTIFIER ]))); iter; ++iter) | |||
4614 | { | |||
4615 | tree fn = *iter; | |||
4616 | if (copy_fn_p (fn)) | |||
4617 | { | |||
4618 | saw_copy = true; | |||
4619 | if (!DECL_DELETED_FN (fn)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code) (fn)->base.code) == TEMPLATE_DECL ? ( (struct tree_template_decl *)(const_cast<union tree_node * > ((((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4619, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn) ), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4619, __FUNCTION__))->decl_common.lang_specific); if (!( ((enum tree_code) (fn)->base.code) == FUNCTION_DECL || ((( enum tree_code) (fn)->base.code) == TEMPLATE_DECL && ((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4619, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree ) nullptr && ((enum tree_code) (((struct tree_template_decl *)(const_cast<union tree_node *> ((((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4619, __FUNCTION__, (TEMPLATE_DECL))))))))->result)-> base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn ) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4619, __FUNCTION__); <->u.fn; })->min.base.threadprivate_or_deleted_p )) | |||
4620 | { | |||
4621 | /* Not deleted, therefore trivial. */ | |||
4622 | saw_non_deleted = true; | |||
4623 | break; | |||
4624 | } | |||
4625 | } | |||
4626 | else if (move_fn_p (fn)) | |||
4627 | if (!DECL_DELETED_FN (fn)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check (((((enum tree_code) (fn)->base.code) == TEMPLATE_DECL ? ( (struct tree_template_decl *)(const_cast<union tree_node * > ((((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4627, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn) ), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/tree.cc" , 4627, __FUNCTION__))->decl_common.lang_specific); if (!( ((enum tree_code) (fn)->base.code) == FU |