Bug Summary

File:build/gcc/vec.h
Warning:line 742, column 3
Called C++ object pointer is null

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name class.c -analyzer-store=region -analyzer-opt-analyze-nested-blocks -analyzer-checker=core -analyzer-checker=apiModeling -analyzer-checker=unix -analyzer-checker=deadcode -analyzer-checker=cplusplus -analyzer-checker=security.insecureAPI.UncheckedReturn -analyzer-checker=security.insecureAPI.getpw -analyzer-checker=security.insecureAPI.gets -analyzer-checker=security.insecureAPI.mktemp -analyzer-checker=security.insecureAPI.mkstemp -analyzer-checker=security.insecureAPI.vfork -analyzer-checker=nullability.NullPassedToNonnull -analyzer-checker=nullability.NullReturnedFromNonnull -analyzer-output plist -w -setup-static-analyzer -analyzer-config-compatibility-mode=true -mrelocation-model static -mframe-pointer=none -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu x86-64 -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /usr/lib64/clang/11.0.0 -D IN_GCC_FRONTEND -D IN_GCC -D HAVE_CONFIG_H -I . -I cp -I /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc -I /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp -I /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../include -I /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libcpp/include -I /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libcody -I /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libdecnumber -I /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libdecnumber/bid -I ../libdecnumber -I /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libbacktrace -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/10/../../../../include/c++/10 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/10/../../../../include/c++/10/x86_64-suse-linux -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/10/../../../../include/c++/10/backward -internal-isystem /usr/local/include -internal-isystem /usr/lib64/clang/11.0.0/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wno-narrowing -Wwrite-strings -Wno-error=format-diag -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fdeprecated-macro -fdebug-compilation-dir /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/gcc -ferror-limit 19 -fno-rtti -fgnuc-version=4.2.1 -vectorize-loops -vectorize-slp -analyzer-output=plist-html -analyzer-config silence-checkers=core.NullDereference -faddrsig -o /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/clang-static-analyzer/2021-01-16-135054-17580-1/report-U8vKeN.plist -x c++ /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c

/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c

1/* Functions related to building -*- C++ -*- classes and their related objects.
2 Copyright (C) 1987-2021 Free Software Foundation, Inc.
3 Contributed by Michael Tiemann (tiemann@cygnus.com)
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 3, or (at your option)
10any later version.
11
12GCC is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
20
21
22/* High-level class interface. */
23
24#include "config.h"
25#include "system.h"
26#include "coretypes.h"
27#include "target.h"
28#include "cp-tree.h"
29#include "stringpool.h"
30#include "cgraph.h"
31#include "stor-layout.h"
32#include "attribs.h"
33#include "flags.h"
34#include "toplev.h"
35#include "convert.h"
36#include "dumpfile.h"
37#include "gimplify.h"
38#include "intl.h"
39#include "asan.h"
40
41/* Id for dumping the class hierarchy. */
42int class_dump_id;
43
44/* The number of nested classes being processed. If we are not in the
45 scope of any class, this is zero. */
46
47int current_class_depth;
48
49/* In order to deal with nested classes, we keep a stack of classes.
50 The topmost entry is the innermost class, and is the entry at index
51 CURRENT_CLASS_DEPTH */
52
53typedef struct class_stack_node {
54 /* The name of the class. */
55 tree name;
56
57 /* The _TYPE node for the class. */
58 tree type;
59
60 /* The access specifier pending for new declarations in the scope of
61 this class. */
62 tree access;
63
64 /* If were defining TYPE, the names used in this class. */
65 splay_tree names_used;
66
67 /* Nonzero if this class is no longer open, because of a call to
68 push_to_top_level. */
69 size_t hidden;
70}* class_stack_node_t;
71
72struct vtbl_init_data
73{
74 /* The base for which we're building initializers. */
75 tree binfo;
76 /* The type of the most-derived type. */
77 tree derived;
78 /* The binfo for the dynamic type. This will be TYPE_BINFO (derived),
79 unless ctor_vtbl_p is true. */
80 tree rtti_binfo;
81 /* The negative-index vtable initializers built up so far. These
82 are in order from least negative index to most negative index. */
83 vec<constructor_elt, va_gc> *inits;
84 /* The binfo for the virtual base for which we're building
85 vcall offset initializers. */
86 tree vbase;
87 /* The functions in vbase for which we have already provided vcall
88 offsets. */
89 vec<tree, va_gc> *fns;
90 /* The vtable index of the next vcall or vbase offset. */
91 tree index;
92 /* Nonzero if we are building the initializer for the primary
93 vtable. */
94 int primary_vtbl_p;
95 /* Nonzero if we are building the initializer for a construction
96 vtable. */
97 int ctor_vtbl_p;
98 /* True when adding vcall offset entries to the vtable. False when
99 merely computing the indices. */
100 bool generate_vcall_entries;
101};
102
103/* The type of a function passed to walk_subobject_offsets. */
104typedef int (*subobject_offset_fn) (tree, tree, splay_tree);
105
106/* The stack itself. This is a dynamically resized array. The
107 number of elements allocated is CURRENT_CLASS_STACK_SIZE. */
108static int current_class_stack_size;
109static class_stack_node_t current_class_stack;
110
111/* The size of the largest empty class seen in this translation unit. */
112static GTY (()) tree sizeof_biggest_empty_class;
113
114static tree get_vfield_name (tree);
115static void finish_struct_anon (tree);
116static tree get_vtable_name (tree);
117static void get_basefndecls (tree, tree, vec<tree> *);
118static int build_primary_vtable (tree, tree);
119static int build_secondary_vtable (tree);
120static void finish_vtbls (tree);
121static void modify_vtable_entry (tree, tree, tree, tree, tree *);
122static void finish_struct_bits (tree);
123static int alter_access (tree, tree, tree);
124static void handle_using_decl (tree, tree);
125static tree dfs_modify_vtables (tree, void *);
126static tree modify_all_vtables (tree, tree);
127static void determine_primary_bases (tree);
128static void maybe_warn_about_overly_private_class (tree);
129static void add_implicitly_declared_members (tree, tree*, int, int);
130static tree fixed_type_or_null (tree, int *, int *);
131static tree build_simple_base_path (tree expr, tree binfo);
132static void build_vtbl_initializer (tree, tree, tree, tree, int *,
133 vec<constructor_elt, va_gc> **);
134static bool check_bitfield_decl (tree);
135static bool check_field_decl (tree, tree, int *, int *);
136static void check_field_decls (tree, tree *, int *, int *);
137static void build_base_fields (record_layout_info, splay_tree, tree *);
138static void check_methods (tree);
139static void remove_zero_width_bit_fields (tree);
140static bool accessible_nvdtor_p (tree);
141
142/* Used by find_flexarrays and related functions. */
143struct flexmems_t;
144static void diagnose_flexarrays (tree, const flexmems_t *);
145static void find_flexarrays (tree, flexmems_t *, bool = false,
146 tree = NULL_TREE(tree) __null, tree = NULL_TREE(tree) __null);
147static void check_flexarrays (tree, flexmems_t * = NULL__null, bool = false);
148static void check_bases (tree, int *, int *);
149static void check_bases_and_members (tree);
150static tree create_vtable_ptr (tree, tree *);
151static void include_empty_classes (record_layout_info);
152static void layout_class_type (tree, tree *);
153static void propagate_binfo_offsets (tree, tree);
154static void layout_virtual_bases (record_layout_info, splay_tree);
155static void build_vbase_offset_vtbl_entries (tree, vtbl_init_data *);
156static void add_vcall_offset_vtbl_entries_r (tree, vtbl_init_data *);
157static void add_vcall_offset_vtbl_entries_1 (tree, vtbl_init_data *);
158static void build_vcall_offset_vtbl_entries (tree, vtbl_init_data *);
159static void add_vcall_offset (tree, tree, vtbl_init_data *);
160static void layout_vtable_decl (tree, int);
161static tree dfs_find_final_overrider_pre (tree, void *);
162static tree dfs_find_final_overrider_post (tree, void *);
163static tree find_final_overrider (tree, tree, tree);
164static int make_new_vtable (tree, tree);
165static tree get_primary_binfo (tree);
166static int maybe_indent_hierarchy (FILE *, int, int);
167static tree dump_class_hierarchy_r (FILE *, dump_flags_t, tree, tree, int);
168static void dump_class_hierarchy (tree);
169static void dump_class_hierarchy_1 (FILE *, dump_flags_t, tree);
170static void dump_array (FILE *, tree);
171static void dump_vtable (tree, tree, tree);
172static void dump_vtt (tree, tree);
173static void dump_thunk (FILE *, int, tree);
174static tree build_vtable (tree, tree, tree);
175static void initialize_vtable (tree, vec<constructor_elt, va_gc> *);
176static void layout_nonempty_base_or_field (record_layout_info,
177 tree, tree, splay_tree);
178static void accumulate_vtbl_inits (tree, tree, tree, tree, tree,
179 vec<constructor_elt, va_gc> **);
180static void dfs_accumulate_vtbl_inits (tree, tree, tree, tree, tree,
181 vec<constructor_elt, va_gc> **);
182static void build_rtti_vtbl_entries (tree, vtbl_init_data *);
183static void build_vcall_and_vbase_vtbl_entries (tree, vtbl_init_data *);
184static void clone_constructors_and_destructors (tree);
185static void update_vtable_entry_for_fn (tree, tree, tree, tree *, unsigned);
186static void build_ctor_vtbl_group (tree, tree);
187static void build_vtt (tree);
188static tree binfo_ctor_vtable (tree);
189static void build_vtt_inits (tree, tree, vec<constructor_elt, va_gc> **,
190 tree *);
191static tree dfs_build_secondary_vptr_vtt_inits (tree, void *);
192static tree dfs_fixup_binfo_vtbls (tree, void *);
193static int record_subobject_offset (tree, tree, splay_tree);
194static int check_subobject_offset (tree, tree, splay_tree);
195static int walk_subobject_offsets (tree, subobject_offset_fn,
196 tree, splay_tree, tree, int);
197static int layout_conflict_p (tree, tree, splay_tree, int);
198static int splay_tree_compare_integer_csts (splay_tree_key k1,
199 splay_tree_key k2);
200static void maybe_warn_about_inaccessible_bases (tree);
201static bool type_requires_array_cookie (tree);
202static bool base_derived_from (tree, tree);
203static int empty_base_at_nonzero_offset_p (tree, tree, splay_tree);
204static tree end_of_base (tree);
205static tree get_vcall_index (tree, tree);
206static bool type_maybe_constexpr_default_constructor (tree);
207static bool type_maybe_constexpr_destructor (tree);
208static bool field_poverlapping_p (tree);
209
210/* Return a COND_EXPR that executes TRUE_STMT if this execution of the
211 'structor is in charge of 'structing virtual bases, or FALSE_STMT
212 otherwise. */
213
214tree
215build_if_in_charge (tree true_stmt, tree false_stmt)
216{
217 gcc_assert (DECL_HAS_IN_CHARGE_PARM_P (current_function_decl))((void)(!((__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (current_function_decl)->base.code) ==
TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast<
union tree_node *> ((((tree_check ((current_function_decl)
, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 217, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 217, __FUNCTION__))->decl_common.lang_specific); if (!((
(enum tree_code) (current_function_decl)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (current_function_decl)->base.code)
== TEMPLATE_DECL && ((struct tree_template_decl *)(const_cast
<union tree_node *> ((((tree_check ((current_function_decl
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 217, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((current_function_decl
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 217, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->base
.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 217, __FUNCTION__); &lt->u.fn; })->has_in_charge_parm_p
)) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 217, __FUNCTION__), 0 : 0))
;
218 tree cmp = build2 (NE_EXPR, boolean_type_nodeglobal_trees[TI_BOOLEAN_TYPE],
219 current_in_charge_parm((cfun + 0)->language)->x_in_charge_parm, integer_zero_nodeglobal_trees[TI_INTEGER_ZERO]);
220 tree type = unlowered_expr_type (true_stmt);
221 if (VOID_TYPE_P (type)(((enum tree_code) (type)->base.code) == VOID_TYPE))
222 type = unlowered_expr_type (false_stmt);
223 tree cond = build3 (COND_EXPR, type,
224 cmp, true_stmt, false_stmt);
225 return cond;
226}
227
228/* Convert to or from a base subobject. EXPR is an expression of type
229 `A' or `A*', an expression of type `B' or `B*' is returned. To
230 convert A to a base B, CODE is PLUS_EXPR and BINFO is the binfo for
231 the B base instance within A. To convert base A to derived B, CODE
232 is MINUS_EXPR and BINFO is the binfo for the A instance within B.
233 In this latter case, A must not be a morally virtual base of B.
234 NONNULL is true if EXPR is known to be non-NULL (this is only
235 needed when EXPR is of pointer type). CV qualifiers are preserved
236 from EXPR. */
237
238tree
239build_base_path (enum tree_code code,
240 tree expr,
241 tree binfo,
242 int nonnull,
243 tsubst_flags_t complain)
244{
245 tree v_binfo = NULL_TREE(tree) __null;
246 tree d_binfo = NULL_TREE(tree) __null;
247 tree probe;
248 tree offset;
249 tree target_type;
250 tree null_test = NULL__null;
251 tree ptr_target_type;
252 int fixed_type_p;
253 int want_pointer = TYPE_PTR_P (TREE_TYPE (expr))(((enum tree_code) (((contains_struct_check ((expr), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 253, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE
)
;
254 bool has_empty = false;
255 bool virtual_access;
256 bool rvalue = false;
257
258 if (expr == error_mark_nodeglobal_trees[TI_ERROR_MARK] || binfo == error_mark_nodeglobal_trees[TI_ERROR_MARK] || !binfo)
259 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
260
261 for (probe = binfo; probe; probe = BINFO_INHERITANCE_CHAIN (probe)((tree_check ((probe), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 261, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
)
262 {
263 d_binfo = probe;
264 if (is_empty_class (BINFO_TYPE (probe)((contains_struct_check (((tree_check ((probe), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 264, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 264, __FUNCTION__))->typed.type)
))
265 has_empty = true;
266 if (!v_binfo && BINFO_VIRTUAL_P (probe)((tree_check ((probe), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 266, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
267 v_binfo = probe;
268 }
269
270 probe = TYPE_MAIN_VARIANT (TREE_TYPE (expr))((tree_class_check ((((contains_struct_check ((expr), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 270, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 270, __FUNCTION__))->type_common.main_variant)
;
271 if (want_pointer)
272 probe = TYPE_MAIN_VARIANT (TREE_TYPE (probe))((tree_class_check ((((contains_struct_check ((probe), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 272, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 272, __FUNCTION__))->type_common.main_variant)
;
273 if (dependent_type_p (probe))
274 if (tree open = currently_open_class (probe))
275 probe = open;
276
277 if (code == PLUS_EXPR
278 && !SAME_BINFO_TYPE_P (BINFO_TYPE (d_binfo), probe)((((contains_struct_check (((tree_check ((d_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 278, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 278, __FUNCTION__))->typed.type)) == (probe))
)
279 {
280 /* This can happen when adjust_result_of_qualified_name_lookup can't
281 find a unique base binfo in a call to a member function. We
282 couldn't give the diagnostic then since we might have been calling
283 a static member function, so we do it now. In other cases, eg.
284 during error recovery (c++/71979), we may not have a base at all. */
285 if (complain & tf_error)
286 {
287 tree base = lookup_base (probe, BINFO_TYPE (d_binfo)((contains_struct_check (((tree_check ((d_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 287, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 287, __FUNCTION__))->typed.type)
,
288 ba_unique, NULL__null, complain);
289 gcc_assert (base == error_mark_node || !base)((void)(!(base == global_trees[TI_ERROR_MARK] || !base) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 289, __FUNCTION__), 0 : 0))
;
290 }
291 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
292 }
293
294 gcc_assert ((code == MINUS_EXPR((void)(!((code == MINUS_EXPR && ((((contains_struct_check
(((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 295, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 295, __FUNCTION__))->typed.type)) == (probe))) || code ==
PLUS_EXPR) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 296, __FUNCTION__), 0 : 0))
295 && SAME_BINFO_TYPE_P (BINFO_TYPE (binfo), probe))((void)(!((code == MINUS_EXPR && ((((contains_struct_check
(((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 295, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 295, __FUNCTION__))->typed.type)) == (probe))) || code ==
PLUS_EXPR) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 296, __FUNCTION__), 0 : 0))
296 || code == PLUS_EXPR)((void)(!((code == MINUS_EXPR && ((((contains_struct_check
(((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 295, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 295, __FUNCTION__))->typed.type)) == (probe))) || code ==
PLUS_EXPR) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 296, __FUNCTION__), 0 : 0))
;
297
298 if (binfo == d_binfo)
299 /* Nothing to do. */
300 return expr;
301
302 if (code == MINUS_EXPR && v_binfo)
303 {
304 if (complain & tf_error)
305 {
306 if (SAME_BINFO_TYPE_P (BINFO_TYPE (binfo), BINFO_TYPE (v_binfo))((((contains_struct_check (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 306, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 306, __FUNCTION__))->typed.type)) == (((contains_struct_check
(((tree_check ((v_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 306, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 306, __FUNCTION__))->typed.type)))
)
307 {
308 if (want_pointer)
309 error ("cannot convert from pointer to base class %qT to "
310 "pointer to derived class %qT because the base is "
311 "virtual", BINFO_TYPE (binfo)((contains_struct_check (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 311, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 311, __FUNCTION__))->typed.type)
, BINFO_TYPE (d_binfo)((contains_struct_check (((tree_check ((d_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 311, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 311, __FUNCTION__))->typed.type)
);
312 else
313 error ("cannot convert from base class %qT to derived "
314 "class %qT because the base is virtual",
315 BINFO_TYPE (binfo)((contains_struct_check (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 315, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 315, __FUNCTION__))->typed.type)
, BINFO_TYPE (d_binfo)((contains_struct_check (((tree_check ((d_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 315, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 315, __FUNCTION__))->typed.type)
);
316 }
317 else
318 {
319 if (want_pointer)
320 error ("cannot convert from pointer to base class %qT to "
321 "pointer to derived class %qT via virtual base %qT",
322 BINFO_TYPE (binfo)((contains_struct_check (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 322, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 322, __FUNCTION__))->typed.type)
, BINFO_TYPE (d_binfo)((contains_struct_check (((tree_check ((d_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 322, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 322, __FUNCTION__))->typed.type)
,
323 BINFO_TYPE (v_binfo)((contains_struct_check (((tree_check ((v_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 323, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 323, __FUNCTION__))->typed.type)
);
324 else
325 error ("cannot convert from base class %qT to derived "
326 "class %qT via virtual base %qT", BINFO_TYPE (binfo)((contains_struct_check (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 326, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 326, __FUNCTION__))->typed.type)
,
327 BINFO_TYPE (d_binfo)((contains_struct_check (((tree_check ((d_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 327, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 327, __FUNCTION__))->typed.type)
, BINFO_TYPE (v_binfo)((contains_struct_check (((tree_check ((v_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 327, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 327, __FUNCTION__))->typed.type)
);
328 }
329 }
330 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
331 }
332
333 if (!want_pointer)
334 {
335 rvalue = !lvalue_p (expr);
336 /* This must happen before the call to save_expr. */
337 expr = cp_build_addr_expr (expr, complain);
338 }
339 else
340 expr = mark_rvalue_use (expr);
341
342 offset = BINFO_OFFSET (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 342, __FUNCTION__, (TREE_BINFO)))->binfo.offset)
;
343 fixed_type_p = resolves_to_fixed_type_p (expr, &nonnull);
344 target_type = code == PLUS_EXPR ? BINFO_TYPE (binfo)((contains_struct_check (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 344, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 344, __FUNCTION__))->typed.type)
: BINFO_TYPE (d_binfo)((contains_struct_check (((tree_check ((d_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 344, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 344, __FUNCTION__))->typed.type)
;
345 /* TARGET_TYPE has been extracted from BINFO, and, is therefore always
346 cv-unqualified. Extract the cv-qualifiers from EXPR so that the
347 expression returned matches the input. */
348 target_type = cp_build_qualified_typecp_build_qualified_type_real ((target_type), (cp_type_quals (
((contains_struct_check ((((contains_struct_check ((expr), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 349, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 349, __FUNCTION__))->typed.type))), tf_warning_or_error)
349 (target_type, cp_type_quals (TREE_TYPE (TREE_TYPE (expr))))cp_build_qualified_type_real ((target_type), (cp_type_quals (
((contains_struct_check ((((contains_struct_check ((expr), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 349, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 349, __FUNCTION__))->typed.type))), tf_warning_or_error)
;
350 ptr_target_type = build_pointer_type (target_type);
351
352 /* Do we need to look in the vtable for the real offset? */
353 virtual_access = (v_binfo && fixed_type_p <= 0);
354
355 /* Don't bother with the calculations inside sizeof; they'll ICE if the
356 source type is incomplete and the pointer value doesn't matter. In a
357 template (even in instantiate_non_dependent_expr), we don't have vtables
358 set up properly yet, and the value doesn't matter there either; we're
359 just interested in the result of overload resolution. */
360 if (cp_unevaluated_operand != 0
361 || processing_template_declscope_chain->x_processing_template_decl
362 || in_template_function ())
363 {
364 expr = build_nop (ptr_target_type, expr);
365 goto indout;
366 }
367
368 if (!COMPLETE_TYPE_P (probe)(((tree_class_check ((probe), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 368, __FUNCTION__))->type_common.size) != (tree) __null)
)
369 {
370 if (complain & tf_error)
371 error ("cannot convert from %qT to base class %qT because %qT is "
372 "incomplete", BINFO_TYPE (d_binfo)((contains_struct_check (((tree_check ((d_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 372, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 372, __FUNCTION__))->typed.type)
, BINFO_TYPE (binfo)((contains_struct_check (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 372, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 372, __FUNCTION__))->typed.type)
,
373 BINFO_TYPE (d_binfo)((contains_struct_check (((tree_check ((d_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 373, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 373, __FUNCTION__))->typed.type)
);
374 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
375 }
376
377 /* If we're in an NSDMI, we don't have the full constructor context yet
378 that we need for converting to a virtual base, so just build a stub
379 CONVERT_EXPR and expand it later in bot_replace. */
380 if (virtual_access && fixed_type_p < 0
381 && current_scope () != current_function_decl)
382 {
383 expr = build1 (CONVERT_EXPR, ptr_target_type, expr);
384 CONVERT_EXPR_VBASE_PATH (expr)((tree_not_check2 (((tree_check ((expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 384, __FUNCTION__, (CONVERT_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 384, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= true;
385 goto indout;
386 }
387
388 /* Do we need to check for a null pointer? */
389 if (want_pointer && !nonnull)
390 {
391 /* If we know the conversion will not actually change the value
392 of EXPR, then we can avoid testing the expression for NULL.
393 We have to avoid generating a COMPONENT_REF for a base class
394 field, because other parts of the compiler know that such
395 expressions are always non-NULL. */
396 if (!virtual_access && integer_zerop (offset))
397 return build_nop (ptr_target_type, expr);
398 null_test = error_mark_nodeglobal_trees[TI_ERROR_MARK];
399 }
400
401 /* Protect against multiple evaluation if necessary. */
402 if (TREE_SIDE_EFFECTS (expr)((non_type_check ((expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 402, __FUNCTION__))->base.side_effects_flag)
&& (null_test || virtual_access))
403 expr = save_expr (expr);
404
405 /* Now that we've saved expr, build the real null test. */
406 if (null_test)
407 {
408 tree zero = cp_convert (TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 408, __FUNCTION__))->typed.type)
, nullptr_nodecp_global_trees[CPTI_NULLPTR], complain);
409 null_test = build2_loc (input_location, NE_EXPR, boolean_type_nodeglobal_trees[TI_BOOLEAN_TYPE],
410 expr, zero);
411 /* This is a compiler generated comparison, don't emit
412 e.g. -Wnonnull-compare warning for it. */
413 TREE_NO_WARNING (null_test)((null_test)->base.nowarning_flag) = 1;
414 }
415
416 /* If this is a simple base reference, express it as a COMPONENT_REF. */
417 if (code == PLUS_EXPR && !virtual_access
418 /* We don't build base fields for empty bases, and they aren't very
419 interesting to the optimizers anyway. */
420 && !has_empty)
421 {
422 expr = cp_build_fold_indirect_ref (expr);
423 expr = build_simple_base_path (expr, binfo);
424 if (rvalue && lvalue_p (expr))
425 expr = move (expr);
426 if (want_pointer)
427 expr = build_address (expr);
428 target_type = TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 428, __FUNCTION__))->typed.type)
;
429 goto out;
430 }
431
432 if (virtual_access)
433 {
434 /* Going via virtual base V_BINFO. We need the static offset
435 from V_BINFO to BINFO, and the dynamic offset from D_BINFO to
436 V_BINFO. That offset is an entry in D_BINFO's vtable. */
437 tree v_offset;
438
439 if (fixed_type_p < 0 && in_base_initializer((cfun + 0)->language)->x_in_base_initializer)
440 {
441 /* In a base member initializer, we cannot rely on the
442 vtable being set up. We have to indirect via the
443 vtt_parm. */
444 tree t;
445
446 t = TREE_TYPE (TYPE_VFIELD (current_class_type))((contains_struct_check ((((tree_check3 ((scope_chain->class_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 446, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.minval)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 446, __FUNCTION__))->typed.type)
;
447 t = build_pointer_type (t);
448 v_offset = fold_convert (t, current_vtt_parm)fold_convert_loc (((location_t) 0), t, ((cfun + 0)->language
)->x_vtt_parm)
;
449 v_offset = cp_build_fold_indirect_ref (v_offset);
450 }
451 else
452 {
453 tree t = expr;
454 if (sanitize_flags_p (SANITIZE_VPTR)
455 && fixed_type_p == 0)
456 {
457 t = cp_ubsan_maybe_instrument_cast_to_vbase (input_location,
458 probe, expr);
459 if (t == NULL_TREE(tree) __null)
460 t = expr;
461 }
462 v_offset = build_vfield_ref (cp_build_fold_indirect_ref (t),
463 TREE_TYPE (TREE_TYPE (expr))((contains_struct_check ((((contains_struct_check ((expr), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 463, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 463, __FUNCTION__))->typed.type)
);
464 }
465
466 if (v_offset == error_mark_nodeglobal_trees[TI_ERROR_MARK])
467 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
468
469 v_offset = fold_build_pointer_plus (v_offset, BINFO_VPTR_FIELD (v_binfo))fold_build_pointer_plus_loc (((location_t) 0), v_offset, ((tree_check
((v_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 469, __FUNCTION__, (TREE_BINFO)))->binfo.vptr_field))
;
470 v_offset = build1 (NOP_EXPR,
471 build_pointer_type (ptrdiff_type_nodeglobal_trees[TI_PTRDIFF_TYPE]),
472 v_offset);
473 v_offset = cp_build_fold_indirect_ref (v_offset);
474 TREE_CONSTANT (v_offset)((non_type_check ((v_offset), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 474, __FUNCTION__))->base.constant_flag)
= 1;
475
476 offset = convert_to_integer (ptrdiff_type_nodeglobal_trees[TI_PTRDIFF_TYPE],
477 size_diffop_loc (input_location, offset,
478 BINFO_OFFSET (v_binfo)((tree_check ((v_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 478, __FUNCTION__, (TREE_BINFO)))->binfo.offset)
));
479
480 if (!integer_zerop (offset))
481 v_offset = build2 (code, ptrdiff_type_nodeglobal_trees[TI_PTRDIFF_TYPE], v_offset, offset);
482
483 if (fixed_type_p < 0)
484 /* Negative fixed_type_p means this is a constructor or destructor;
485 virtual base layout is fixed in in-charge [cd]tors, but not in
486 base [cd]tors. */
487 offset = build_if_in_charge
488 (convert_to_integer (ptrdiff_type_nodeglobal_trees[TI_PTRDIFF_TYPE], BINFO_OFFSET (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 488, __FUNCTION__, (TREE_BINFO)))->binfo.offset)
),
489 v_offset);
490 else
491 offset = v_offset;
492 }
493
494 if (want_pointer)
495 target_type = ptr_target_type;
496
497 if (!integer_zerop (offset))
498 {
499 offset = fold_convert (sizetype, offset)fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_sizetype
], offset)
;
500 if (code == MINUS_EXPR)
501 offset = fold_build1_loc (input_location, NEGATE_EXPR, sizetypesizetype_tab[(int) stk_sizetype], offset);
502 expr = fold_build_pointer_plus (expr, offset)fold_build_pointer_plus_loc (((location_t) 0), expr, offset);
503 }
504 else
505 null_test = NULL__null;
506
507 expr = build1 (NOP_EXPR, ptr_target_type, expr);
508
509 indout:
510 if (!want_pointer)
511 {
512 expr = cp_build_fold_indirect_ref (expr);
513 if (rvalue)
514 expr = move (expr);
515 }
516
517 out:
518 if (null_test)
519 {
520 expr = fold_build3_loc (input_location, COND_EXPR, target_type, null_test,
521 expr, build_zero_cst (target_type));
522 /* Avoid warning for the whole conditional expression (in addition
523 to NULL_TEST itself -- see above) in case the result is used in
524 a nonnull context that the front end -Wnonnull checks. */
525 TREE_NO_WARNING (expr)((expr)->base.nowarning_flag) = 1;
526 }
527
528 return expr;
529}
530
531/* Subroutine of build_base_path; EXPR and BINFO are as in that function.
532 Perform a derived-to-base conversion by recursively building up a
533 sequence of COMPONENT_REFs to the appropriate base fields. */
534
535static tree
536build_simple_base_path (tree expr, tree binfo)
537{
538 tree type = BINFO_TYPE (binfo)((contains_struct_check (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 538, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 538, __FUNCTION__))->typed.type)
;
539 tree d_binfo = BINFO_INHERITANCE_CHAIN (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 539, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
;
540 tree field;
541
542 if (d_binfo == NULL_TREE(tree) __null)
543 {
544 tree temp;
545
546 gcc_assert (TYPE_MAIN_VARIANT (TREE_TYPE (expr)) == type)((void)(!(((tree_class_check ((((contains_struct_check ((expr
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 546, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 546, __FUNCTION__))->type_common.main_variant) == type) ?
fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 546, __FUNCTION__), 0 : 0))
;
547
548 /* Transform `(a, b).x' into `(*(a, &b)).x', `(a ? b : c).x'
549 into `(*(a ? &b : &c)).x', and so on. A COND_EXPR is only
550 an lvalue in the front end; only _DECLs and _REFs are lvalues
551 in the back end. */
552 temp = unary_complex_lvalue (ADDR_EXPR, expr);
553 if (temp)
554 expr = cp_build_fold_indirect_ref (temp);
555
556 return expr;
557 }
558
559 /* Recurse. */
560 expr = build_simple_base_path (expr, d_binfo);
561
562 for (field = TYPE_FIELDS (BINFO_TYPE (d_binfo))((tree_check3 ((((contains_struct_check (((tree_check ((d_binfo
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 562, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 562, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 562, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
;
563 field; field = DECL_CHAIN (field)(((contains_struct_check (((contains_struct_check ((field), (
TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 563, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 563, __FUNCTION__))->common.chain))
)
564 /* Is this the base field created by build_base_field? */
565 if (TREE_CODE (field)((enum tree_code) (field)->base.code) == FIELD_DECL
566 && DECL_FIELD_IS_BASE (field)((contains_struct_check (((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 566, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 566, __FUNCTION__))->decl_common.lang_flag_6)
567 && TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 567, __FUNCTION__))->typed.type)
== type
568 /* If we're looking for a field in the most-derived class,
569 also check the field offset; we can have two base fields
570 of the same type if one is an indirect virtual base and one
571 is a direct non-virtual base. */
572 && (BINFO_INHERITANCE_CHAIN (d_binfo)((tree_check ((d_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 572, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
573 || tree_int_cst_equal (byte_position (field),
574 BINFO_OFFSET (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 574, __FUNCTION__, (TREE_BINFO)))->binfo.offset)
)))
575 {
576 /* We don't use build_class_member_access_expr here, as that
577 has unnecessary checks, and more importantly results in
578 recursive calls to dfs_walk_once. */
579 int type_quals = cp_type_quals (TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 579, __FUNCTION__))->typed.type)
);
580
581 expr = build3 (COMPONENT_REF,
582 cp_build_qualified_type (type, type_quals)cp_build_qualified_type_real ((type), (type_quals), tf_warning_or_error
)
,
583 expr, field, NULL_TREE(tree) __null);
584 /* Mark the expression const or volatile, as appropriate.
585 Even though we've dealt with the type above, we still have
586 to mark the expression itself. */
587 if (type_quals & TYPE_QUAL_CONST)
588 TREE_READONLY (expr)((non_type_check ((expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 588, __FUNCTION__))->base.readonly_flag)
= 1;
589 if (type_quals & TYPE_QUAL_VOLATILE)
590 TREE_THIS_VOLATILE (expr)((expr)->base.volatile_flag) = 1;
591
592 return expr;
593 }
594
595 /* Didn't find the base field?!? */
596 gcc_unreachable ()(fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 596, __FUNCTION__))
;
597}
598
599/* Convert OBJECT to the base TYPE. OBJECT is an expression whose
600 type is a class type or a pointer to a class type. In the former
601 case, TYPE is also a class type; in the latter it is another
602 pointer type. If CHECK_ACCESS is true, an error message is emitted
603 if TYPE is inaccessible. If OBJECT has pointer type, the value is
604 assumed to be non-NULL. */
605
606tree
607convert_to_base (tree object, tree type, bool check_access, bool nonnull,
608 tsubst_flags_t complain)
609{
610 tree binfo;
611 tree object_type;
612
613 if (TYPE_PTR_P (TREE_TYPE (object))(((enum tree_code) (((contains_struct_check ((object), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 613, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE
)
)
614 {
615 object_type = TREE_TYPE (TREE_TYPE (object))((contains_struct_check ((((contains_struct_check ((object), (
TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 615, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 615, __FUNCTION__))->typed.type)
;
616 type = TREE_TYPE (type)((contains_struct_check ((type), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 616, __FUNCTION__))->typed.type)
;
617 }
618 else
619 object_type = TREE_TYPE (object)((contains_struct_check ((object), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 619, __FUNCTION__))->typed.type)
;
620
621 binfo = lookup_base (object_type, type, check_access ? ba_check : ba_unique,
622 NULL__null, complain);
623 if (!binfo || binfo == error_mark_nodeglobal_trees[TI_ERROR_MARK])
624 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
625
626 return build_base_path (PLUS_EXPR, object, binfo, nonnull, complain);
627}
628
629/* EXPR is an expression with unqualified class type. BASE is a base
630 binfo of that class type. Returns EXPR, converted to the BASE
631 type. This function assumes that EXPR is the most derived class;
632 therefore virtual bases can be found at their static offsets. */
633
634tree
635convert_to_base_statically (tree expr, tree base)
636{
637 tree expr_type;
638
639 expr_type = TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 639, __FUNCTION__))->typed.type)
;
640 if (!SAME_BINFO_TYPE_P (BINFO_TYPE (base), expr_type)((((contains_struct_check (((tree_check ((base), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 640, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 640, __FUNCTION__))->typed.type)) == (expr_type))
)
641 {
642 /* If this is a non-empty base, use a COMPONENT_REF. */
643 if (!is_empty_class (BINFO_TYPE (base)((contains_struct_check (((tree_check ((base), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 643, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 643, __FUNCTION__))->typed.type)
))
644 return build_simple_base_path (expr, base);
645
646 /* We use fold_build2 and fold_convert below to simplify the trees
647 provided to the optimizers. It is not safe to call these functions
648 when processing a template because they do not handle C++-specific
649 trees. */
650 gcc_assert (!processing_template_decl)((void)(!(!scope_chain->x_processing_template_decl) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 650, __FUNCTION__), 0 : 0))
;
651 expr = cp_build_addr_expr (expr, tf_warning_or_error);
652 if (!integer_zerop (BINFO_OFFSET (base)((tree_check ((base), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 652, __FUNCTION__, (TREE_BINFO)))->binfo.offset)
))
653 expr = fold_build_pointer_plus_loc (input_location,
654 expr, BINFO_OFFSET (base)((tree_check ((base), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 654, __FUNCTION__, (TREE_BINFO)))->binfo.offset)
);
655 expr = fold_convert (build_pointer_type (BINFO_TYPE (base)), expr)fold_convert_loc (((location_t) 0), build_pointer_type (((contains_struct_check
(((tree_check ((base), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 655, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 655, __FUNCTION__))->typed.type)), expr)
;
656 expr = build_fold_indirect_ref_loc (input_location, expr);
657 }
658
659 return expr;
660}
661
662/* True IFF EXPR is a reference to an empty base class "subobject", as built in
663 convert_to_base_statically. We look for the result of the fold_convert
664 call, a NOP_EXPR from one pointer type to another, where the target is an
665 empty base of the original type. */
666
667bool
668is_empty_base_ref (tree expr)
669{
670 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == INDIRECT_REF)
671 expr = TREE_OPERAND (expr, 0)(*((const_cast<tree*> (tree_operand_check ((expr), (0),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 671, __FUNCTION__)))))
;
672 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) != NOP_EXPR)
673 return false;
674 tree type = TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 674, __FUNCTION__))->typed.type)
;
675 if (!POINTER_TYPE_P (type)(((enum tree_code) (type)->base.code) == POINTER_TYPE || (
(enum tree_code) (type)->base.code) == REFERENCE_TYPE)
)
676 return false;
677 type = TREE_TYPE (type)((contains_struct_check ((type), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 677, __FUNCTION__))->typed.type)
;
678 if (!is_empty_class (type))
679 return false;
680 STRIP_NOPS (expr)(expr) = tree_strip_nop_conversions ((const_cast<union tree_node
*> (((expr)))))
;
681 tree fromtype = TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 681, __FUNCTION__))->typed.type)
;
682 if (!POINTER_TYPE_P (fromtype)(((enum tree_code) (fromtype)->base.code) == POINTER_TYPE ||
((enum tree_code) (fromtype)->base.code) == REFERENCE_TYPE
)
)
683 return false;
684 fromtype = TREE_TYPE (fromtype)((contains_struct_check ((fromtype), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 684, __FUNCTION__))->typed.type)
;
685 return (CLASS_TYPE_P (fromtype)(((((enum tree_code) (fromtype)->base.code)) == RECORD_TYPE
|| (((enum tree_code) (fromtype)->base.code)) == UNION_TYPE
) && ((tree_class_check ((fromtype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 685, __FUNCTION__))->type_common.lang_flag_5))
686 && !same_type_ignoring_top_level_qualifiers_p (fromtype, type)
687 && DERIVED_FROM_P (type, fromtype)(lookup_base ((fromtype), (type), ba_any, __null, tf_none) !=
(tree) __null)
);
688}
689
690tree
691build_vfield_ref (tree datum, tree type)
692{
693 tree vfield, vcontext;
694
695 if (datum == error_mark_nodeglobal_trees[TI_ERROR_MARK]
696 /* Can happen in case of duplicate base types (c++/59082). */
697 || !TYPE_VFIELD (type)((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 697, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.minval)
)
698 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
699
700 /* First, convert to the requested type. */
701 if (!same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (datum)((contains_struct_check ((datum), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 701, __FUNCTION__))->typed.type)
, type))
702 datum = convert_to_base (datum, type, /*check_access=*/false,
703 /*nonnull=*/true, tf_warning_or_error);
704
705 /* Second, the requested type may not be the owner of its own vptr.
706 If not, convert to the base class that owns it. We cannot use
707 convert_to_base here, because VCONTEXT may appear more than once
708 in the inheritance hierarchy of TYPE, and thus direct conversion
709 between the types may be ambiguous. Following the path back up
710 one step at a time via primary bases avoids the problem. */
711 vfield = TYPE_VFIELD (type)((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 711, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.minval)
;
712 vcontext = DECL_CONTEXT (vfield)((contains_struct_check ((vfield), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 712, __FUNCTION__))->decl_minimal.context)
;
713 while (!same_type_ignoring_top_level_qualifiers_p (vcontext, type))
714 {
715 datum = build_simple_base_path (datum, CLASSTYPE_PRIMARY_BINFO (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 715, __FUNCTION__))->type_with_lang_specific.lang_specific
))->primary_base)
);
716 type = TREE_TYPE (datum)((contains_struct_check ((datum), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 716, __FUNCTION__))->typed.type)
;
717 }
718
719 return build3 (COMPONENT_REF, TREE_TYPE (vfield)((contains_struct_check ((vfield), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 719, __FUNCTION__))->typed.type)
, datum, vfield, NULL_TREE(tree) __null);
720}
721
722/* Given an object INSTANCE, return an expression which yields the
723 vtable element corresponding to INDEX. There are many special
724 cases for INSTANCE which we take care of here, mainly to avoid
725 creating extra tree nodes when we don't have to. */
726
727tree
728build_vtbl_ref (tree instance, tree idx)
729{
730 tree aref;
731 tree vtbl = NULL_TREE(tree) __null;
732
733 /* Try to figure out what a reference refers to, and
734 access its virtual function table directly. */
735
736 int cdtorp = 0;
737 tree fixed_type = fixed_type_or_null (instance, NULL__null, &cdtorp);
738
739 tree basetype = non_reference (TREE_TYPE (instance)((contains_struct_check ((instance), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 739, __FUNCTION__))->typed.type)
);
740
741 if (fixed_type && !cdtorp)
742 {
743 tree binfo = lookup_base (fixed_type, basetype,
744 ba_unique, NULL__null, tf_none);
745 if (binfo && binfo != error_mark_nodeglobal_trees[TI_ERROR_MARK])
746 vtbl = unshare_expr (BINFO_VTABLE (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 746, __FUNCTION__, (TREE_BINFO)))->binfo.vtable)
);
747 }
748
749 if (!vtbl)
750 vtbl = build_vfield_ref (instance, basetype);
751
752 aref = build_array_ref (input_location, vtbl, idx);
753 TREE_CONSTANT (aref)((non_type_check ((aref), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 753, __FUNCTION__))->base.constant_flag)
|= TREE_CONSTANT (vtbl)((non_type_check ((vtbl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 753, __FUNCTION__))->base.constant_flag)
&& TREE_CONSTANT (idx)((non_type_check ((idx), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 753, __FUNCTION__))->base.constant_flag)
;
754
755 return aref;
756}
757
758/* Given a stable object pointer INSTANCE_PTR, return an expression which
759 yields a function pointer corresponding to vtable element INDEX. */
760
761tree
762build_vfn_ref (tree instance_ptr, tree idx)
763{
764 tree aref;
765
766 aref = build_vtbl_ref (cp_build_fold_indirect_ref (instance_ptr), idx);
767
768 /* When using function descriptors, the address of the
769 vtable entry is treated as a function pointer. */
770 if (TARGET_VTABLE_USES_DESCRIPTORS0)
771 aref = build1 (NOP_EXPR, TREE_TYPE (aref)((contains_struct_check ((aref), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 771, __FUNCTION__))->typed.type)
,
772 cp_build_addr_expr (aref, tf_warning_or_error));
773
774 /* Remember this as a method reference, for later devirtualization. */
775 aref = build3 (OBJ_TYPE_REF, TREE_TYPE (aref)((contains_struct_check ((aref), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 775, __FUNCTION__))->typed.type)
, aref, instance_ptr, idx);
776
777 return aref;
778}
779
780/* Return the name of the virtual function table (as an IDENTIFIER_NODE)
781 for the given TYPE. */
782
783static tree
784get_vtable_name (tree type)
785{
786 return mangle_vtbl_for_type (type);
787}
788
789/* DECL is an entity associated with TYPE, like a virtual table or an
790 implicitly generated constructor. Determine whether or not DECL
791 should have external or internal linkage at the object file
792 level. This routine does not deal with COMDAT linkage and other
793 similar complexities; it simply sets TREE_PUBLIC if it possible for
794 entities in other translation units to contain copies of DECL, in
795 the abstract. */
796
797void
798set_linkage_according_to_type (tree /*type*/, tree decl)
799{
800 TREE_PUBLIC (decl)((decl)->base.public_flag) = 1;
801 determine_visibility (decl);
802}
803
804/* Create a VAR_DECL for a primary or secondary vtable for CLASS_TYPE.
805 (For a secondary vtable for B-in-D, CLASS_TYPE should be D, not B.)
806 Use NAME for the name of the vtable, and VTABLE_TYPE for its type. */
807
808static tree
809build_vtable (tree class_type, tree name, tree vtable_type)
810{
811 tree decl;
812
813 decl = build_lang_decl (VAR_DECL, name, vtable_type);
814 /* vtable names are already mangled; give them their DECL_ASSEMBLER_NAME
815 now to avoid confusion in mangle_decl. */
816 SET_DECL_ASSEMBLER_NAME (decl, name)overwrite_decl_assembler_name (decl, name);
817 DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 817, __FUNCTION__))->decl_minimal.context)
= class_type;
818 DECL_ARTIFICIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 818, __FUNCTION__))->decl_common.artificial_flag)
= 1;
819 TREE_STATIC (decl)((decl)->base.static_flag) = 1;
820 TREE_READONLY (decl)((non_type_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 820, __FUNCTION__))->base.readonly_flag)
= 1;
821 DECL_VIRTUAL_P (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 821, __FUNCTION__))->decl_common.virtual_flag)
= 1;
822 SET_DECL_ALIGN (decl, TARGET_VTABLE_ENTRY_ALIGN)(((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 822, __FUNCTION__))->decl_common.align) = ffs_hwi ((((global_options
.x_ix86_isa_flags & (1UL << 58)) != 0) ? 32 : ((8) *
(((global_options.x_ix86_isa_flags & (1UL << 1)) !=
0) ? 8 : 4)))))
;
823 DECL_USER_ALIGN (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 823, __FUNCTION__))->base.u.bits.user_align)
= true;
824 DECL_VTABLE_OR_VTT_P (decl)((contains_struct_check (((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 824, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 824, __FUNCTION__))->decl_common.virtual_flag)
= 1;
825 set_linkage_according_to_type (class_type, decl);
826 /* The vtable has not been defined -- yet. */
827 DECL_EXTERNAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 827, __FUNCTION__))->decl_common.decl_flag_1)
= 1;
828 DECL_NOT_REALLY_EXTERN (decl)(((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 828, __FUNCTION__))->decl_common.lang_specific)->u.base
.not_really_extern)
= 1;
829
830 /* Mark the VAR_DECL node representing the vtable itself as a
831 "gratuitous" one, thereby forcing dwarfout.c to ignore it. It
832 is rather important that such things be ignored because any
833 effort to actually generate DWARF for them will run into
834 trouble when/if we encounter code like:
835
836 #pragma interface
837 struct S { virtual void member (); };
838
839 because the artificial declaration of the vtable itself (as
840 manufactured by the g++ front end) will say that the vtable is
841 a static member of `S' but only *after* the debug output for
842 the definition of `S' has already been output. This causes
843 grief because the DWARF entry for the definition of the vtable
844 will try to refer back to an earlier *declaration* of the
845 vtable as a static member of `S' and there won't be one. We
846 might be able to arrange to have the "vtable static member"
847 attached to the member list for `S' before the debug info for
848 `S' get written (which would solve the problem) but that would
849 require more intrusive changes to the g++ front end. */
850 DECL_IGNORED_P (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 850, __FUNCTION__))->decl_common.ignored_flag)
= 1;
851
852 return decl;
853}
854
855/* Get the VAR_DECL of the vtable for TYPE. TYPE need not be polymorphic,
856 or even complete. If this does not exist, create it. If COMPLETE is
857 nonzero, then complete the definition of it -- that will render it
858 impossible to actually build the vtable, but is useful to get at those
859 which are known to exist in the runtime. */
860
861tree
862get_vtable_decl (tree type, int complete)
863{
864 tree decl;
865
866 if (CLASSTYPE_VTABLES (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 866, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vtables)
)
867 return CLASSTYPE_VTABLES (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 867, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vtables)
;
868
869 decl = build_vtable (type, get_vtable_name (type), vtbl_type_nodecp_global_trees[CPTI_VTBL_TYPE]);
870 CLASSTYPE_VTABLES (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 870, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vtables)
= decl;
871
872 if (complete)
873 {
874 DECL_EXTERNAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 874, __FUNCTION__))->decl_common.decl_flag_1)
= 1;
875 cp_finish_decl (decl, NULL_TREE(tree) __null, false, NULL_TREE(tree) __null, 0);
876 }
877
878 return decl;
879}
880
881/* Build the primary virtual function table for TYPE. If BINFO is
882 non-NULL, build the vtable starting with the initial approximation
883 that it is the same as the one which is the head of the association
884 list. Returns a nonzero value if a new vtable is actually
885 created. */
886
887static int
888build_primary_vtable (tree binfo, tree type)
889{
890 tree decl;
891 tree virtuals;
892
893 decl = get_vtable_decl (type, /*complete=*/0);
894
895 if (binfo)
896 {
897 if (BINFO_NEW_VTABLE_MARKED (binfo)(((tree_not_check2 (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 897, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 897, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
)
898 /* We have already created a vtable for this base, so there's
899 no need to do it again. */
900 return 0;
901
902 virtuals = copy_list (BINFO_VIRTUALS (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 902, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
);
903 TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 903, __FUNCTION__))->typed.type)
= TREE_TYPE (get_vtbl_decl_for_binfo (binfo))((contains_struct_check ((get_vtbl_decl_for_binfo (binfo)), (
TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 903, __FUNCTION__))->typed.type)
;
904 DECL_SIZE (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 904, __FUNCTION__))->decl_common.size)
= TYPE_SIZE (TREE_TYPE (decl))((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 904, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 904, __FUNCTION__))->type_common.size)
;
905 DECL_SIZE_UNIT (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 905, __FUNCTION__))->decl_common.size_unit)
= TYPE_SIZE_UNIT (TREE_TYPE (decl))((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 905, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 905, __FUNCTION__))->type_common.size_unit)
;
906 }
907 else
908 {
909 gcc_assert (TREE_TYPE (decl) == vtbl_type_node)((void)(!(((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 909, __FUNCTION__))->typed.type) == cp_global_trees[CPTI_VTBL_TYPE
]) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 909, __FUNCTION__), 0 : 0))
;
910 virtuals = NULL_TREE(tree) __null;
911 }
912
913 /* Initialize the association list for this type, based
914 on our first approximation. */
915 BINFO_VTABLE (TYPE_BINFO (type))((tree_check ((((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 915, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 915, __FUNCTION__, (TREE_BINFO)))->binfo.vtable)
= decl;
916 BINFO_VIRTUALS (TYPE_BINFO (type))((tree_check ((((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 916, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 916, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
= virtuals;
917 SET_BINFO_NEW_VTABLE_MARKED (TYPE_BINFO (type))((((tree_not_check2 (((tree_check ((((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 917, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 917, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 917, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) = 1, ((void)(!(!((tree_not_check2 (((tree_check
((((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 917, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 917, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 917, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5) || ((tree_check ((((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 917, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 917, __FUNCTION__, (TREE_BINFO)))->base.static_flag)) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 917, __FUNCTION__), 0 : 0)), ((void)(!(((tree_check3 ((((contains_struct_check
(((tree_check ((((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 917, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 917, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 917, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 917, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.minval)) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 917, __FUNCTION__), 0 : 0)))
;
918 return 1;
919}
920
921/* Give BINFO a new virtual function table which is initialized
922 with a skeleton-copy of its original initialization. The only
923 entry that changes is the `delta' entry, so we can really
924 share a lot of structure.
925
926 FOR_TYPE is the most derived type which caused this table to
927 be needed.
928
929 Returns nonzero if we haven't met BINFO before.
930
931 The order in which vtables are built (by calling this function) for
932 an object must remain the same, otherwise a binary incompatibility
933 can result. */
934
935static int
936build_secondary_vtable (tree binfo)
937{
938 if (BINFO_NEW_VTABLE_MARKED (binfo)(((tree_not_check2 (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 938, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 938, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
)
939 /* We already created a vtable for this base. There's no need to
940 do it again. */
941 return 0;
942
943 /* Remember that we've created a vtable for this BINFO, so that we
944 don't try to do so again. */
945 SET_BINFO_NEW_VTABLE_MARKED (binfo)((((tree_not_check2 (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 945, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 945, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) = 1, ((void)(!(!((tree_not_check2 (((tree_check
((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 945, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 945, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5) || ((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 945, __FUNCTION__, (TREE_BINFO)))->base.static_flag)) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 945, __FUNCTION__), 0 : 0)), ((void)(!(((tree_check3 ((((contains_struct_check
(((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 945, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 945, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 945, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.minval)) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 945, __FUNCTION__), 0 : 0)))
;
946
947 /* Make fresh virtual list, so we can smash it later. */
948 BINFO_VIRTUALS (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 948, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
= copy_list (BINFO_VIRTUALS (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 948, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
);
949
950 /* Secondary vtables are laid out as part of the same structure as
951 the primary vtable. */
952 BINFO_VTABLE (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 952, __FUNCTION__, (TREE_BINFO)))->binfo.vtable)
= NULL_TREE(tree) __null;
953 return 1;
954}
955
956/* Create a new vtable for BINFO which is the hierarchy dominated by
957 T. Return nonzero if we actually created a new vtable. */
958
959static int
960make_new_vtable (tree t, tree binfo)
961{
962 if (binfo == TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 962, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
)
963 /* In this case, it is *type*'s vtable we are modifying. We start
964 with the approximation that its vtable is that of the
965 immediate base class. */
966 return build_primary_vtable (binfo, t);
967 else
968 /* This is our very own copy of `basetype' to play with. Later,
969 we will fill in all the virtual functions that override the
970 virtual functions in these base classes which are not defined
971 by the current type. */
972 return build_secondary_vtable (binfo);
973}
974
975/* Make *VIRTUALS, an entry on the BINFO_VIRTUALS list for BINFO
976 (which is in the hierarchy dominated by T) list FNDECL as its
977 BV_FN. DELTA is the required constant adjustment from the `this'
978 pointer where the vtable entry appears to the `this' required when
979 the function is actually called. */
980
981static void
982modify_vtable_entry (tree t,
983 tree binfo,
984 tree fndecl,
985 tree delta,
986 tree *virtuals)
987{
988 tree v;
989
990 v = *virtuals;
991
992 if (fndecl != BV_FN (v)(((tree_check ((v), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 992, __FUNCTION__, (TREE_LIST)))->list.value))
993 || !tree_int_cst_equal (delta, BV_DELTA (v)(((tree_check ((v), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 993, __FUNCTION__, (TREE_LIST)))->list.purpose))
))
994 {
995 /* We need a new vtable for BINFO. */
996 if (make_new_vtable (t, binfo))
997 {
998 /* If we really did make a new vtable, we also made a copy
999 of the BINFO_VIRTUALS list. Now, we have to find the
1000 corresponding entry in that list. */
1001 *virtuals = BINFO_VIRTUALS (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1001, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
;
1002 while (BV_FN (*virtuals)(((tree_check ((*virtuals), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1002, __FUNCTION__, (TREE_LIST)))->list.value))
!= BV_FN (v)(((tree_check ((v), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1002, __FUNCTION__, (TREE_LIST)))->list.value))
)
1003 *virtuals = TREE_CHAIN (*virtuals)((contains_struct_check ((*virtuals), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1003, __FUNCTION__))->common.chain)
;
1004 v = *virtuals;
1005 }
1006
1007 BV_DELTA (v)(((tree_check ((v), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1007, __FUNCTION__, (TREE_LIST)))->list.purpose))
= delta;
1008 BV_VCALL_INDEX (v)(((contains_struct_check ((v), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1008, __FUNCTION__))->typed.type))
= NULL_TREE(tree) __null;
1009 BV_FN (v)(((tree_check ((v), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1009, __FUNCTION__, (TREE_LIST)))->list.value))
= fndecl;
1010 }
1011}
1012
1013
1014/* Add method METHOD to class TYPE. If VIA_USING indicates whether
1015 METHOD is being injected via a using_decl. Returns true if the
1016 method could be added to the method vec. */
1017
1018bool
1019add_method (tree type, tree method, bool via_using)
1020{
1021 if (method == error_mark_nodeglobal_trees[TI_ERROR_MARK])
1022 return false;
1023
1024 gcc_assert (!DECL_EXTERN_C_P (method))((void)(!(!((((contains_struct_check ((method), (TS_DECL_COMMON
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1024, __FUNCTION__))->decl_common.lang_specific) ? ((contains_struct_check
((method), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1024, __FUNCTION__))->decl_common.lang_specific)->u.base
.language : (((enum tree_code) (method)->base.code) == FUNCTION_DECL
? lang_c : lang_cplusplus)) == lang_c)) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1024, __FUNCTION__), 0 : 0))
;
1025
1026 tree *slot = find_member_slot (type, DECL_NAME (method)((contains_struct_check ((method), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1026, __FUNCTION__))->decl_minimal.name)
);
1027 tree current_fns = slot ? *slot : NULL_TREE(tree) __null;
1028
1029 /* See below. */
1030 int losem = -1;
1031
1032 /* Check to see if we've already got this method. */
1033 for (ovl_iterator iter (current_fns); iter; ++iter)
1034 {
1035 tree fn = *iter;
1036
1037 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) != TREE_CODE (method)((enum tree_code) (method)->base.code))
1038 continue;
1039
1040 /* Two using-declarations can coexist, we'll complain about ambiguity in
1041 overload resolution. */
1042 if (via_using && iter.using_p ()
1043 /* Except handle inherited constructors specially. */
1044 && ! DECL_CONSTRUCTOR_P (fn)((tree_check (((((enum tree_code) (fn)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1044, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1044, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
)
)
1045 continue;
1046
1047 /* [over.load] Member function declarations with the
1048 same name and the same parameter types cannot be
1049 overloaded if any of them is a static member
1050 function declaration.
1051
1052 [over.load] Member function declarations with the same name and
1053 the same parameter-type-list as well as member function template
1054 declarations with the same name, the same parameter-type-list, and
1055 the same template parameter lists cannot be overloaded if any of
1056 them, but not all, have a ref-qualifier.
1057
1058 [namespace.udecl] When a using-declaration brings names
1059 from a base class into a derived class scope, member
1060 functions in the derived class override and/or hide member
1061 functions with the same name and parameter types in a base
1062 class (rather than conflicting). */
1063 tree fn_type = TREE_TYPE (fn)((contains_struct_check ((fn), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1063, __FUNCTION__))->typed.type)
;
1064 tree method_type = TREE_TYPE (method)((contains_struct_check ((method), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1064, __FUNCTION__))->typed.type)
;
1065
1066 /* Compare the quals on the 'this' parm. Don't compare
1067 the whole types, as used functions are treated as
1068 coming from the using class in overload resolution. */
1069 if (! 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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1069, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1069, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1069, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1069, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1069, __FUNCTION__); &lt->u.fn; })->static_function
)
1070 && ! DECL_STATIC_FUNCTION_P (method)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (method)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1070, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1070, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (method)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (method)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1070, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1070, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1070, __FUNCTION__); &lt->u.fn; })->static_function
)
1071 /* Either both or neither need to be ref-qualified for
1072 differing quals to allow overloading. */
1073 && (FUNCTION_REF_QUALIFIED (fn_type)((tree_not_check2 (((tree_check2 ((fn_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1073, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1073, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
1074 == FUNCTION_REF_QUALIFIED (method_type)((tree_not_check2 (((tree_check2 ((method_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1074, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1074, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
)
1075 && (type_memfn_quals (fn_type) != type_memfn_quals (method_type)
1076 || type_memfn_rqual (fn_type) != type_memfn_rqual (method_type)))
1077 continue;
1078
1079 tree real_fn = fn;
1080 tree real_method = method;
1081
1082 /* Templates and conversion ops must match return types. */
1083 if ((DECL_CONV_FN_P (fn)((((tree_not_check2 (((tree_check ((((contains_struct_check (
(fn), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1083, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1083, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1083, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) & ((tree_not_check2 (((tree_check ((((contains_struct_check
((fn), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1083, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1083, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1083, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1) & (!((tree_not_check2 (((tree_check ((((contains_struct_check
((fn), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1083, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1083, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1083, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))
|| TREE_CODE (fn)((enum tree_code) (fn)->base.code) == TEMPLATE_DECL)
1084 && !same_type_p (TREE_TYPE (fn_type), TREE_TYPE (method_type))comptypes ((((contains_struct_check ((fn_type), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1084, __FUNCTION__))->typed.type)), (((contains_struct_check
((method_type), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1084, __FUNCTION__))->typed.type)), 0)
)
1085 continue;
1086
1087 /* For templates, the template parameters must be identical. */
1088 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == TEMPLATE_DECL)
1089 {
1090 if (!comp_template_parms (DECL_TEMPLATE_PARMS (fn)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1090, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments
,
1091 DECL_TEMPLATE_PARMS (method)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1091, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments
))
1092 continue;
1093
1094 real_fn = DECL_TEMPLATE_RESULT (fn)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1094, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
1095 real_method = DECL_TEMPLATE_RESULT (method)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1095, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
1096 }
1097
1098 tree parms1 = TYPE_ARG_TYPES (fn_type)((tree_check2 ((fn_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1098, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
;
1099 tree parms2 = TYPE_ARG_TYPES (method_type)((tree_check2 ((method_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1099, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
;
1100 if (! DECL_STATIC_FUNCTION_P (real_fn)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (real_fn)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((real_fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1100, __FUNCTION__, (TEMPLATE_DECL))))))))->result : real_fn
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1100, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (real_fn)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (real_fn)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((real_fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1100, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((real_fn
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1100, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1100, __FUNCTION__); &lt->u.fn; })->static_function
)
)
1101 parms1 = TREE_CHAIN (parms1)((contains_struct_check ((parms1), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1101, __FUNCTION__))->common.chain)
;
1102 if (! DECL_STATIC_FUNCTION_P (real_method)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (real_method)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((real_method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1102, __FUNCTION__, (TEMPLATE_DECL))))))))->result : real_method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1102, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (real_method)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (real_method)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((real_method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1102, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((real_method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1102, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1102, __FUNCTION__); &lt->u.fn; })->static_function
)
)
1103 parms2 = TREE_CHAIN (parms2)((contains_struct_check ((parms2), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1103, __FUNCTION__))->common.chain)
;
1104
1105 /* Bring back parameters omitted from an inherited ctor. The
1106 method and the function can have different omittedness. */
1107 if (ctor_omit_inherited_parms (real_fn))
1108 parms1 = FUNCTION_FIRST_USER_PARMTYPE (DECL_CLONED_FUNCTION (real_fn))skip_artificial_parms_for (((((contains_struct_check (((tree_check
((real_fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1108, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1108, __FUNCTION__))->decl_common.lang_specific)->u.fn
.u5.cloned_function)), ((tree_check2 ((((contains_struct_check
(((((contains_struct_check (((tree_check ((real_fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1108, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1108, __FUNCTION__))->decl_common.lang_specific)->u.fn
.u5.cloned_function)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1108, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1108, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
;
1109 if (ctor_omit_inherited_parms (real_method))
1110 parms2 = (FUNCTION_FIRST_USER_PARMTYPEskip_artificial_parms_for (((((contains_struct_check (((tree_check
((real_method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1111, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1111, __FUNCTION__))->decl_common.lang_specific)->u.fn
.u5.cloned_function)), ((tree_check2 ((((contains_struct_check
(((((contains_struct_check (((tree_check ((real_method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1111, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1111, __FUNCTION__))->decl_common.lang_specific)->u.fn
.u5.cloned_function)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1111, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1111, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
1111 (DECL_CLONED_FUNCTION (real_method))skip_artificial_parms_for (((((contains_struct_check (((tree_check
((real_method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1111, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1111, __FUNCTION__))->decl_common.lang_specific)->u.fn
.u5.cloned_function)), ((tree_check2 ((((contains_struct_check
(((((contains_struct_check (((tree_check ((real_method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1111, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1111, __FUNCTION__))->decl_common.lang_specific)->u.fn
.u5.cloned_function)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1111, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1111, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
);
1112
1113 if (!compparms (parms1, parms2))
1114 continue;
1115
1116 if (!equivalently_constrained (fn, method))
1117 {
1118 if (processing_template_declscope_chain->x_processing_template_decl)
1119 /* We can't check satisfaction in dependent context, wait until
1120 the class is instantiated. */
1121 continue;
1122
1123 special_function_kind sfk = special_memfn_p (method);
1124
1125 if (sfk == sfk_none
1126 || DECL_INHERITED_CTOR (fn)((((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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1126, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1126, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && ((tree_check (((((enum
tree_code) (fn)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1126, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1126, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1126, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1126, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1126, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1126, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1126, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null)
1127 || TREE_CODE (fn)((enum tree_code) (fn)->base.code) == TEMPLATE_DECL)
1128 /* Member function templates and non-special member functions
1129 coexist if they are not equivalently constrained. A member
1130 function is not hidden by an inherited constructor. */
1131 continue;
1132
1133 /* P0848: For special member functions, deleted, unsatisfied, or
1134 less constrained overloads are ineligible. We implement this
1135 by removing them from CLASSTYPE_MEMBER_VEC. Destructors don't
1136 use the notion of eligibility, and the selected destructor can
1137 be deleted, but removing unsatisfied or less constrained
1138 overloads has the same effect as overload resolution. */
1139 bool dtor = (sfk == sfk_destructor);
1140 if (losem == -1)
1141 losem = ((!dtor && DECL_DELETED_FN (method)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (method)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1141, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1141, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (method)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (method)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1141, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1141, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1141, __FUNCTION__); &lt->u.fn; })->min.base.threadprivate_or_deleted_p
)
)
1142 || !constraints_satisfied_p (method));
1143 bool losef = ((!dtor && 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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1143, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1143, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1143, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1143, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1143, __FUNCTION__); &lt->u.fn; })->min.base.threadprivate_or_deleted_p
)
)
1144 || !constraints_satisfied_p (fn));
1145 int win;
1146 if (losem || losef)
1147 win = losem - losef;
1148 else
1149 win = more_constrained (fn, method);
1150 if (win > 0)
1151 /* Leave FN in the method vec, discard METHOD. */
1152 return false;
1153 else if (win < 0)
1154 {
1155 /* Remove FN, add METHOD. */
1156 current_fns = iter.remove_node (current_fns);
1157 continue;
1158 }
1159 else
1160 /* Let them coexist for now. */
1161 continue;
1162 }
1163
1164 /* If these are versions of the same function, process and
1165 move on. */
1166 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == FUNCTION_DECL
1167 && maybe_version_functions (method, fn, true))
1168 continue;
1169
1170 if (DECL_INHERITED_CTOR (method)((((enum tree_code) (method)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (method)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1170, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1170, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && ((tree_check (((((enum
tree_code) (method)->base.code) == TEMPLATE_DECL ? ((struct
tree_template_decl *)(const_cast<union tree_node *> ((
((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1170, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1170, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (method)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1170, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1170, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (method)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (method)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1170, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1170, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1170, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null)
)
1171 {
1172 if (!DECL_INHERITED_CTOR (fn)((((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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1172, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1172, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && ((tree_check (((((enum
tree_code) (fn)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1172, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1172, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1172, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1172, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1172, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1172, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1172, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null)
)
1173 /* Defer to the other function. */
1174 return false;
1175
1176 tree basem = DECL_INHERITED_CTOR_BASE (method)(((((enum tree_code) (method)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (method)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && ((tree_check (((((enum
tree_code) (method)->base.code) == TEMPLATE_DECL ? ((struct
tree_template_decl *)(const_cast<union tree_node *> ((
((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (method)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (method)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (method)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null) ? ((contains_struct_check ((global_options.x_flag_new_inheriting_ctors
? strip_inheriting_ctors (method) : ((((enum tree_code) (method
)->base.code) == FUNCTION_DECL || (((enum tree_code) (method
)->base.code) == TEMPLATE_DECL && ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && ((tree_check (((((enum
tree_code) (method)->base.code) == TEMPLATE_DECL ? ((struct
tree_template_decl *)(const_cast<union tree_node *> ((
((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (method)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (method)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (method)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null)), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1176, __FUNCTION__))->decl_minimal.context) : (tree) __null
)
;
1177 tree basef = DECL_INHERITED_CTOR_BASE (fn)(((((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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && ((tree_check (((((enum
tree_code) (fn)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null) ? ((contains_struct_check ((global_options.x_flag_new_inheriting_ctors
? strip_inheriting_ctors (fn) : ((((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),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && ((tree_check (((((enum
tree_code) (fn)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null)), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1177, __FUNCTION__))->decl_minimal.context) : (tree) __null
)
;
1178 if (flag_new_inheriting_ctorsglobal_options.x_flag_new_inheriting_ctors)
1179 {
1180 if (basem == basef)
1181 {
1182 /* Inheriting the same constructor along different
1183 paths, combine them. */
1184 SET_DECL_INHERITED_CTOR(__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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__); &lt->u.fn; })->context = (ovl_make
(((((enum tree_code) (method)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (method)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && ((tree_check (((((enum
tree_code) (method)->base.code) == TEMPLATE_DECL ? ((struct
tree_template_decl *)(const_cast<union tree_node *> ((
((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (method)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (method)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (method)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null), ((((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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && ((tree_check (((((enum
tree_code) (fn)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null))))
1185 (fn, ovl_make (DECL_INHERITED_CTOR (method),(__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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__); &lt->u.fn; })->context = (ovl_make
(((((enum tree_code) (method)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (method)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && ((tree_check (((((enum
tree_code) (method)->base.code) == TEMPLATE_DECL ? ((struct
tree_template_decl *)(const_cast<union tree_node *> ((
((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (method)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (method)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (method)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null), ((((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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && ((tree_check (((((enum
tree_code) (fn)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null))))
1186 DECL_INHERITED_CTOR (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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__); &lt->u.fn; })->context = (ovl_make
(((((enum tree_code) (method)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (method)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && ((tree_check (((((enum
tree_code) (method)->base.code) == TEMPLATE_DECL ? ((struct
tree_template_decl *)(const_cast<union tree_node *> ((
((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (method)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (method)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (method)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((method
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1185, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null), ((((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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && ((tree_check (((((enum
tree_code) (fn)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1186, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null))))
;
1187 /* And discard the new one. */
1188 return false;
1189 }
1190 else
1191 /* Inherited ctors can coexist until overload
1192 resolution. */
1193 continue;
1194 }
1195
1196 error_at (DECL_SOURCE_LOCATION (method)((contains_struct_check ((method), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1196, __FUNCTION__))->decl_minimal.locus)
,
1197 "%q#D conflicts with version inherited from %qT",
1198 method, basef);
1199 inform (DECL_SOURCE_LOCATION (fn)((contains_struct_check ((fn), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1199, __FUNCTION__))->decl_minimal.locus)
,
1200 "version inherited from %qT declared here",
1201 basef);
1202 return false;
1203 }
1204
1205 if (via_using)
1206 /* Defer to the local function. */
1207 return false;
1208 else if (flag_new_inheriting_ctorsglobal_options.x_flag_new_inheriting_ctors
1209 && DECL_INHERITED_CTOR (fn)((((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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1209, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1209, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && ((tree_check (((((enum
tree_code) (fn)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1209, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1209, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1209, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1209, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1209, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1209, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1209, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null)
)
1210 {
1211 /* Remove the inherited constructor. */
1212 current_fns = iter.remove_node (current_fns);
1213 continue;
1214 }
1215 else
1216 {
1217 error_at (DECL_SOURCE_LOCATION (method)((contains_struct_check ((method), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1217, __FUNCTION__))->decl_minimal.locus)
,
1218 "%q#D cannot be overloaded with %q#D", method, fn);
1219 inform (DECL_SOURCE_LOCATION (fn)((contains_struct_check ((fn), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1219, __FUNCTION__))->decl_minimal.locus)
,
1220 "previous declaration %q#D", fn);
1221 return false;
1222 }
1223 }
1224
1225 current_fns = ovl_insert (method, current_fns, via_using);
1226
1227 if (!COMPLETE_TYPE_P (type)(((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1227, __FUNCTION__))->type_common.size) != (tree) __null
)
&& !DECL_CONV_FN_P (method)((((tree_not_check2 (((tree_check ((((contains_struct_check (
(method), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1227, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1227, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1227, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) & ((tree_not_check2 (((tree_check ((((contains_struct_check
((method), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1227, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1227, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1227, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1) & (!((tree_not_check2 (((tree_check ((((contains_struct_check
((method), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1227, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1227, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1227, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))
1228 && !push_class_level_binding (DECL_NAME (method)((contains_struct_check ((method), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1228, __FUNCTION__))->decl_minimal.name)
, current_fns))
1229 return false;
1230
1231 if (!slot)
1232 slot = add_member_slot (type, DECL_NAME (method)((contains_struct_check ((method), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1232, __FUNCTION__))->decl_minimal.name)
);
1233
1234 /* Maintain TYPE_HAS_USER_CONSTRUCTOR, etc. */
1235 grok_special_member_properties (method);
1236
1237 *slot = current_fns;
1238
1239 return true;
1240}
1241
1242/* Subroutines of finish_struct. */
1243
1244/* Change the access of FDECL to ACCESS in T. Return 1 if change was
1245 legit, otherwise return 0. */
1246
1247static int
1248alter_access (tree t, tree fdecl, tree access)
1249{
1250 tree elem;
1251
1252 retrofit_lang_decl (fdecl);
1253
1254 gcc_assert (!DECL_DISCRIMINATOR_P (fdecl))((void)(!(!(((((enum tree_code) (fdecl)->base.code) == VAR_DECL
&& ((fdecl)->base.static_flag)) || (((enum tree_code
) (fdecl)->base.code) == TYPE_DECL && ((contains_struct_check
((fdecl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1254, __FUNCTION__))->decl_common.lang_flag_2))) &&
(((contains_struct_check ((fdecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1254, __FUNCTION__))->decl_minimal.context) && (
(enum tree_code) (((contains_struct_check ((fdecl), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1254, __FUNCTION__))->decl_minimal.context))->base.code
) == FUNCTION_DECL))) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1254, __FUNCTION__), 0 : 0))
;
1255
1256 elem = purpose_member (t, DECL_ACCESS (fdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
((fdecl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1256, __FUNCTION__))->decl_common.lang_specific); if (!(
(((enum tree_code) (fdecl)->base.code) == VAR_DECL || ((enum
tree_code) (fdecl)->base.code) == FUNCTION_DECL) || ((enum
tree_code) (fdecl)->base.code) == FIELD_DECL || ((enum tree_code
) (fdecl)->base.code) == CONST_DECL || ((enum tree_code) (
fdecl)->base.code) == TYPE_DECL || ((enum tree_code) (fdecl
)->base.code) == TEMPLATE_DECL || ((enum tree_code) (fdecl
)->base.code) == USING_DECL || ((enum tree_code) (fdecl)->
base.code) == CONCEPT_DECL)) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1256, __FUNCTION__); &lt->u.min; })->access)
);
1257 if (elem)
1258 {
1259 if (TREE_VALUE (elem)((tree_check ((elem), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1259, __FUNCTION__, (TREE_LIST)))->list.value)
!= access)
1260 {
1261 if (TREE_CODE (TREE_TYPE (fdecl))((enum tree_code) (((contains_struct_check ((fdecl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1261, __FUNCTION__))->typed.type))->base.code)
== FUNCTION_DECL)
1262 error ("conflicting access specifications for method"
1263 " %q+D, ignored", TREE_TYPE (fdecl)((contains_struct_check ((fdecl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1263, __FUNCTION__))->typed.type)
);
1264 else
1265 error ("conflicting access specifications for field %qE, ignored",
1266 DECL_NAME (fdecl)((contains_struct_check ((fdecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1266, __FUNCTION__))->decl_minimal.name)
);
1267 }
1268 else
1269 {
1270 /* They're changing the access to the same thing they changed
1271 it to before. That's OK. */
1272 ;
1273 }
1274 }
1275 else
1276 {
1277 perform_or_defer_access_check (TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1277, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
, fdecl, fdecl,
1278 tf_warning_or_error);
1279 DECL_ACCESS (fdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
((fdecl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1279, __FUNCTION__))->decl_common.lang_specific); if (!(
(((enum tree_code) (fdecl)->base.code) == VAR_DECL || ((enum
tree_code) (fdecl)->base.code) == FUNCTION_DECL) || ((enum
tree_code) (fdecl)->base.code) == FIELD_DECL || ((enum tree_code
) (fdecl)->base.code) == CONST_DECL || ((enum tree_code) (
fdecl)->base.code) == TYPE_DECL || ((enum tree_code) (fdecl
)->base.code) == TEMPLATE_DECL || ((enum tree_code) (fdecl
)->base.code) == USING_DECL || ((enum tree_code) (fdecl)->
base.code) == CONCEPT_DECL)) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1279, __FUNCTION__); &lt->u.min; })->access)
= tree_cons (t, access, DECL_ACCESS (fdecl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
((fdecl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1279, __FUNCTION__))->decl_common.lang_specific); if (!(
(((enum tree_code) (fdecl)->base.code) == VAR_DECL || ((enum
tree_code) (fdecl)->base.code) == FUNCTION_DECL) || ((enum
tree_code) (fdecl)->base.code) == FIELD_DECL || ((enum tree_code
) (fdecl)->base.code) == CONST_DECL || ((enum tree_code) (
fdecl)->base.code) == TYPE_DECL || ((enum tree_code) (fdecl
)->base.code) == TEMPLATE_DECL || ((enum tree_code) (fdecl
)->base.code) == USING_DECL || ((enum tree_code) (fdecl)->
base.code) == CONCEPT_DECL)) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1279, __FUNCTION__); &lt->u.min; })->access)
);
1280 return 1;
1281 }
1282 return 0;
1283}
1284
1285/* Return the access node for DECL's access in its enclosing class. */
1286
1287tree
1288declared_access (tree decl)
1289{
1290 return (TREE_PRIVATE (decl)((decl)->base.private_flag) ? access_private_nodeglobal_trees[TI_PRIVATE]
1291 : TREE_PROTECTED (decl)((decl)->base.protected_flag) ? access_protected_nodeglobal_trees[TI_PROTECTED]
1292 : access_public_nodeglobal_trees[TI_PUBLIC]);
1293}
1294
1295/* Process the USING_DECL, which is a member of T. */
1296
1297static void
1298handle_using_decl (tree using_decl, tree t)
1299{
1300 tree decl = USING_DECL_DECLS (using_decl)((contains_struct_check (((tree_check ((using_decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1300, __FUNCTION__, (USING_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1300, __FUNCTION__))->decl_common.initial)
;
1301 tree name = DECL_NAME (using_decl)((contains_struct_check ((using_decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1301, __FUNCTION__))->decl_minimal.name)
;
1302 tree access = declared_access (using_decl);
1303 tree flist = NULL_TREE(tree) __null;
1304 tree old_value;
1305
1306 gcc_assert (!processing_template_decl && decl)((void)(!(!scope_chain->x_processing_template_decl &&
decl) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1306, __FUNCTION__), 0 : 0))
;
1307
1308 old_value = lookup_member (t, name, /*protect=*/0, /*want_type=*/false,
1309 tf_warning_or_error);
1310 if (old_value)
1311 {
1312 old_value = OVL_FIRST (old_value)ovl_first (old_value);
1313
1314 if (DECL_P (old_value)(tree_code_type[(int) (((enum tree_code) (old_value)->base
.code))] == tcc_declaration)
&& DECL_CONTEXT (old_value)((contains_struct_check ((old_value), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1314, __FUNCTION__))->decl_minimal.context)
== t)
1315 /* OK */;
1316 else
1317 old_value = NULL_TREE(tree) __null;
1318 }
1319
1320 cp_emit_debug_info_for_using (decl, t);
1321
1322 if (is_overloaded_fn (decl))
1323 flist = decl;
1324
1325 if (! old_value)
1326 ;
1327 else if (is_overloaded_fn (old_value))
1328 {
1329 if (flist)
1330 /* It's OK to use functions from a base when there are functions with
1331 the same name already present in the current class. */;
1332 else
1333 {
1334 error_at (DECL_SOURCE_LOCATION (using_decl)((contains_struct_check ((using_decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1334, __FUNCTION__))->decl_minimal.locus)
, "%qD invalid in %q#T "
1335 "because of local method %q#D with same name",
1336 using_decl, t, old_value);
1337 inform (DECL_SOURCE_LOCATION (old_value)((contains_struct_check ((old_value), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1337, __FUNCTION__))->decl_minimal.locus)
,
1338 "local method %q#D declared here", old_value);
1339 return;
1340 }
1341 }
1342 else if (!DECL_ARTIFICIAL (old_value)((contains_struct_check ((old_value), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1342, __FUNCTION__))->decl_common.artificial_flag)
)
1343 {
1344 error_at (DECL_SOURCE_LOCATION (using_decl)((contains_struct_check ((using_decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1344, __FUNCTION__))->decl_minimal.locus)
, "%qD invalid in %q#T "
1345 "because of local member %q#D with same name",
1346 using_decl, t, old_value);
1347 inform (DECL_SOURCE_LOCATION (old_value)((contains_struct_check ((old_value), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1347, __FUNCTION__))->decl_minimal.locus)
,
1348 "local member %q#D declared here", old_value);
1349 return;
1350 }
1351
1352 iloc_sentinel ils (DECL_SOURCE_LOCATION (using_decl)((contains_struct_check ((using_decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1352, __FUNCTION__))->decl_minimal.locus)
);
1353
1354 /* Make type T see field decl FDECL with access ACCESS. */
1355 if (flist)
1356 for (ovl_iterator iter (flist); iter; ++iter)
1357 {
1358 add_method (t, *iter, true);
1359 alter_access (t, *iter, access);
1360 }
1361 else if (USING_DECL_UNRELATED_P (using_decl)((contains_struct_check (((tree_check ((using_decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1361, __FUNCTION__, (USING_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1361, __FUNCTION__))->decl_common.lang_flag_2)
)
1362 {
1363 /* C++20 using enum can import non-inherited enumerators into class
1364 scope. We implement that by making a copy of the CONST_DECL for which
1365 CONST_DECL_USING_P is true. */
1366 gcc_assert (TREE_CODE (decl) == CONST_DECL)((void)(!(((enum tree_code) (decl)->base.code) == CONST_DECL
) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1366, __FUNCTION__), 0 : 0))
;
1367
1368 tree copy = copy_decl (decl);
1369 DECL_CONTEXT (copy)((contains_struct_check ((copy), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1369, __FUNCTION__))->decl_minimal.context)
= t;
1370 DECL_ARTIFICIAL (copy)((contains_struct_check ((copy), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1370, __FUNCTION__))->decl_common.artificial_flag)
= true;
1371 /* We emitted debug info for the USING_DECL above; make sure we don't
1372 also emit anything for this clone. */
1373 DECL_IGNORED_P (copy)((contains_struct_check ((copy), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1373, __FUNCTION__))->decl_common.ignored_flag)
= true;
1374 DECL_SOURCE_LOCATION (copy)((contains_struct_check ((copy), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1374, __FUNCTION__))->decl_minimal.locus)
= DECL_SOURCE_LOCATION (using_decl)((contains_struct_check ((using_decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1374, __FUNCTION__))->decl_minimal.locus)
;
1375 finish_member_declaration (copy);
1376 DECL_ABSTRACT_ORIGIN (copy)((contains_struct_check ((copy), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1376, __FUNCTION__))->decl_common.abstract_origin)
= decl;
1377 }
1378 else
1379 alter_access (t, decl, access);
1380}
1381
1382/* Data structure for find_abi_tags_r, below. */
1383
1384struct abi_tag_data
1385{
1386 tree t; // The type that we're checking for missing tags.
1387 tree subob; // The subobject of T that we're getting tags from.
1388 tree tags; // error_mark_node for diagnostics, or a list of missing tags.
1389};
1390
1391/* Subroutine of find_abi_tags_r. Handle a single TAG found on the class TP
1392 in the context of P. TAG can be either an identifier (the DECL_NAME of
1393 a tag NAMESPACE_DECL) or a STRING_CST (a tag attribute). */
1394
1395static void
1396check_tag (tree tag, tree id, tree *tp, abi_tag_data *p)
1397{
1398 if (!IDENTIFIER_MARKED (id)((tree_not_check2 (((tree_check ((id), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1398, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1398, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
)
1399 {
1400 if (p->tags != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1401 {
1402 /* We're collecting tags from template arguments or from
1403 the type of a variable or function return type. */
1404 p->tags = tree_cons (NULL_TREE(tree) __null, tag, p->tags);
1405
1406 /* Don't inherit this tag multiple times. */
1407 IDENTIFIER_MARKED (id)((tree_not_check2 (((tree_check ((id), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1407, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1407, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
= true;
1408
1409 if (TYPE_P (p->t)(tree_code_type[(int) (((enum tree_code) (p->t)->base.code
))] == tcc_type)
)
1410 {
1411 /* Tags inherited from type template arguments are only used
1412 to avoid warnings. */
1413 ABI_TAG_IMPLICIT (p->tags)((tree_not_check2 (((tree_check ((p->tags), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1413, __FUNCTION__, (TREE_LIST)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1413, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= true;
1414 return;
1415 }
1416 /* For functions and variables we want to warn, too. */
1417 }
1418
1419 /* Otherwise we're diagnosing missing tags. */
1420 if (TREE_CODE (p->t)((enum tree_code) (p->t)->base.code) == FUNCTION_DECL)
1421 {
1422 auto_diagnostic_group d;
1423 if (warning (OPT_Wabi_tag, "%qD inherits the %E ABI tag "
1424 "that %qT (used in its return type) has",
1425 p->t, tag, *tp))
1426 inform (location_of (*tp), "%qT declared here", *tp);
1427 }
1428 else if (VAR_P (p->t)(((enum tree_code) (p->t)->base.code) == VAR_DECL))
1429 {
1430 auto_diagnostic_group d;
1431 if (warning (OPT_Wabi_tag, "%qD inherits the %E ABI tag "
1432 "that %qT (used in its type) has", p->t, tag, *tp))
1433 inform (location_of (*tp), "%qT declared here", *tp);
1434 }
1435 else if (TYPE_P (p->subob)(tree_code_type[(int) (((enum tree_code) (p->subob)->base
.code))] == tcc_type)
)
1436 {
1437 auto_diagnostic_group d;
1438 if (warning (OPT_Wabi_tag, "%qT does not have the %E ABI tag "
1439 "that base %qT has", p->t, tag, p->subob))
1440 inform (location_of (p->subob), "%qT declared here",
1441 p->subob);
1442 }
1443 else
1444 {
1445 auto_diagnostic_group d;
1446 if (warning (OPT_Wabi_tag, "%qT does not have the %E ABI tag "
1447 "that %qT (used in the type of %qD) has",
1448 p->t, tag, *tp, p->subob))
1449 {
1450 inform (location_of (p->subob), "%qD declared here",
1451 p->subob);
1452 inform (location_of (*tp), "%qT declared here", *tp);
1453 }
1454 }
1455 }
1456}
1457
1458/* Find all the ABI tags in the attribute list ATTR and either call
1459 check_tag (if TP is non-null) or set IDENTIFIER_MARKED to val. */
1460
1461static void
1462mark_or_check_attr_tags (tree attr, tree *tp, abi_tag_data *p, bool val)
1463{
1464 if (!attr)
1465 return;
1466 for (; (attr = lookup_attribute ("abi_tag", attr));
1467 attr = TREE_CHAIN (attr)((contains_struct_check ((attr), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1467, __FUNCTION__))->common.chain)
)
1468 for (tree list = TREE_VALUE (attr)((tree_check ((attr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1468, __FUNCTION__, (TREE_LIST)))->list.value)
; list;
1469 list = TREE_CHAIN (list)((contains_struct_check ((list), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1469, __FUNCTION__))->common.chain)
)
1470 {
1471 tree tag = TREE_VALUE (list)((tree_check ((list), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1471, __FUNCTION__, (TREE_LIST)))->list.value)
;
1472 tree id = get_identifier (TREE_STRING_POINTER (tag))(__builtin_constant_p (((const char *)((tree_check ((tag), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1472, __FUNCTION__, (STRING_CST)))->string.str))) ? get_identifier_with_length
((((const char *)((tree_check ((tag), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1472, __FUNCTION__, (STRING_CST)))->string.str))), strlen
(((const char *)((tree_check ((tag), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1472, __FUNCTION__, (STRING_CST)))->string.str)))) : get_identifier
(((const char *)((tree_check ((tag), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1472, __FUNCTION__, (STRING_CST)))->string.str))))
;
1473 if (tp)
1474 check_tag (tag, id, tp, p);
1475 else
1476 IDENTIFIER_MARKED (id)((tree_not_check2 (((tree_check ((id), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1476, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1476, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
= val;
1477 }
1478}
1479
1480/* Find all the ABI tags on T and its enclosing scopes and either call
1481 check_tag (if TP is non-null) or set IDENTIFIER_MARKED to val. */
1482
1483static void
1484mark_or_check_tags (tree t, tree *tp, abi_tag_data *p, bool val)
1485{
1486 while (t != global_namespacecp_global_trees[CPTI_GLOBAL])
1487 {
1488 tree attr;
1489 if (TYPE_P (t)(tree_code_type[(int) (((enum tree_code) (t)->base.code))]
== tcc_type)
)
1490 {
1491 attr = TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1491, __FUNCTION__))->type_common.attributes)
;
1492 t = CP_TYPE_CONTEXT (t)(!(! (((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1492, __FUNCTION__))->type_common.context)) || ((enum tree_code
) (((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1492, __FUNCTION__))->type_common.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((tree_class_check ((t), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1492, __FUNCTION__))->type_common.context) : cp_global_trees
[CPTI_GLOBAL])
;
1493 }
1494 else
1495 {
1496 attr = DECL_ATTRIBUTES (t)((contains_struct_check ((t), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1496, __FUNCTION__))->decl_common.attributes)
;
1497 t = CP_DECL_CONTEXT (t)(!(! (((contains_struct_check ((t), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1497, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((t), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1497, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((t), (
TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1497, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])
;
1498 }
1499 mark_or_check_attr_tags (attr, tp, p, val);
1500 }
1501}
1502
1503/* walk_tree callback for check_abi_tags: if the type at *TP involves any
1504 types with ABI tags, add the corresponding identifiers to the VEC in
1505 *DATA and set IDENTIFIER_MARKED. */
1506
1507static tree
1508find_abi_tags_r (tree *tp, int *walk_subtrees, void *data)
1509{
1510 if (TYPE_P (*tp)(tree_code_type[(int) (((enum tree_code) (*tp)->base.code)
)] == tcc_type)
&& *walk_subtrees == 1)
1511 /* Tell cp_walk_subtrees to look though typedefs. */
1512 *walk_subtrees = 2;
1513
1514 if (!OVERLOAD_TYPE_P (*tp)((((((enum tree_code) (*tp)->base.code)) == RECORD_TYPE ||
(((enum tree_code) (*tp)->base.code)) == UNION_TYPE) &&
((tree_class_check ((*tp), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1514, __FUNCTION__))->type_common.lang_flag_5)) || ((enum
tree_code) (*tp)->base.code) == ENUMERAL_TYPE)
)
1515 return NULL_TREE(tree) __null;
1516
1517 /* walk_tree shouldn't be walking into any subtrees of a RECORD_TYPE
1518 anyway, but let's make sure of it. */
1519 *walk_subtrees = false;
1520
1521 abi_tag_data *p = static_cast<struct abi_tag_data*>(data);
1522
1523 mark_or_check_tags (*tp, tp, p, false);
1524
1525 return NULL_TREE(tree) __null;
1526}
1527
1528/* walk_tree callback for mark_abi_tags: if *TP is a class, set
1529 IDENTIFIER_MARKED on its ABI tags. */
1530
1531static tree
1532mark_abi_tags_r (tree *tp, int *walk_subtrees, void *data)
1533{
1534 if (TYPE_P (*tp)(tree_code_type[(int) (((enum tree_code) (*tp)->base.code)
)] == tcc_type)
&& *walk_subtrees == 1)
1535 /* Tell cp_walk_subtrees to look though typedefs. */
1536 *walk_subtrees = 2;
1537
1538 if (!OVERLOAD_TYPE_P (*tp)((((((enum tree_code) (*tp)->base.code)) == RECORD_TYPE ||
(((enum tree_code) (*tp)->base.code)) == UNION_TYPE) &&
((tree_class_check ((*tp), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1538, __FUNCTION__))->type_common.lang_flag_5)) || ((enum
tree_code) (*tp)->base.code) == ENUMERAL_TYPE)
)
1539 return NULL_TREE(tree) __null;
1540
1541 /* walk_tree shouldn't be walking into any subtrees of a RECORD_TYPE
1542 anyway, but let's make sure of it. */
1543 *walk_subtrees = false;
1544
1545 bool *valp = static_cast<bool*>(data);
1546
1547 mark_or_check_tags (*tp, NULL__null, NULL__null, *valp);
1548
1549 return NULL_TREE(tree) __null;
1550}
1551
1552/* Set IDENTIFIER_MARKED on all the ABI tags on T and its enclosing
1553 scopes. */
1554
1555static void
1556mark_abi_tags (tree t, bool val)
1557{
1558 mark_or_check_tags (t, NULL__null, NULL__null, val);
1559 if (DECL_P (t)(tree_code_type[(int) (((enum tree_code) (t)->base.code))]
== tcc_declaration)
)
1560 {
1561 if (DECL_LANG_SPECIFIC (t)((contains_struct_check ((t), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1561, __FUNCTION__))->decl_common.lang_specific)
&& DECL_USE_TEMPLATE (t)(((contains_struct_check ((t), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1561, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template)
1562 && PRIMARY_TEMPLATE_P (DECL_TI_TEMPLATE (t))(((((contains_struct_check ((((tree_check ((((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((((struct
tree_template_info*)(tree_check (((((contains_struct_check (
(template_info_decl_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1562, __FUNCTION__)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1562, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1562, __FUNCTION__, (TEMPLATE_INFO))))->tmpl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1562, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1562, __FUNCTION__, (TREE_LIST)))->list.value)), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1562, __FUNCTION__))->typed.type))) == (((struct tree_template_info
*)(tree_check (((((contains_struct_check ((template_info_decl_check
((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1562, __FUNCTION__)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1562, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1562, __FUNCTION__, (TEMPLATE_INFO))))->tmpl))
)
1563 {
1564 /* Template arguments are part of the signature. */
1565 tree level = INNERMOST_TEMPLATE_ARGS (DECL_TI_ARGS (t))(get_innermost_template_args ((((struct tree_template_info*)(
tree_check (((((contains_struct_check ((template_info_decl_check
((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1565, __FUNCTION__)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1565, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1565, __FUNCTION__, (TEMPLATE_INFO))))->args), 1))
;
1566 for (int j = 0; j < TREE_VEC_LENGTH (level)((tree_check ((level), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1566, __FUNCTION__, (TREE_VEC)))->base.u.length)
; ++j)
1567 {
1568 tree arg = TREE_VEC_ELT (level, j)(*((const_cast<tree *> (tree_vec_elt_check ((level), (j
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1568, __FUNCTION__)))))
;
1569 cp_walk_tree_without_duplicates (&arg, mark_abi_tags_r, &val)walk_tree_without_duplicates_1 (&arg, mark_abi_tags_r, &
val, cp_walk_subtrees)
;
1570 }
1571 }
1572 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == FUNCTION_DECL)
1573 /* A function's parameter types are part of the signature, so
1574 we don't need to inherit any tags that are also in them. */
1575 for (tree arg = FUNCTION_FIRST_USER_PARMTYPE (t)skip_artificial_parms_for ((t), ((tree_check2 ((((contains_struct_check
((t), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1575, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1575, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
; arg;
1576 arg = TREE_CHAIN (arg)((contains_struct_check ((arg), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1576, __FUNCTION__))->common.chain)
)
1577 cp_walk_tree_without_duplicates (&TREE_VALUE (arg),walk_tree_without_duplicates_1 (&((tree_check ((arg), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1577, __FUNCTION__, (TREE_LIST)))->list.value), mark_abi_tags_r
, &val, cp_walk_subtrees)
1578 mark_abi_tags_r, &val)walk_tree_without_duplicates_1 (&((tree_check ((arg), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1577, __FUNCTION__, (TREE_LIST)))->list.value), mark_abi_tags_r
, &val, cp_walk_subtrees)
;
1579 }
1580}
1581
1582/* Check that T has all the ABI tags that subobject SUBOB has, or
1583 warn if not. If T is a (variable or function) declaration, also
1584 return any missing tags, and add them to T if JUST_CHECKING is false. */
1585
1586static tree
1587check_abi_tags (tree t, tree subob, bool just_checking = false)
1588{
1589 bool inherit = DECL_P (t)(tree_code_type[(int) (((enum tree_code) (t)->base.code))]
== tcc_declaration)
;
1590
1591 if (!inherit && !warn_abi_tagglobal_options.x_warn_abi_tag)
1592 return NULL_TREE(tree) __null;
1593
1594 tree decl = TYPE_P (t)(tree_code_type[(int) (((enum tree_code) (t)->base.code))]
== tcc_type)
? TYPE_NAME (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1594, __FUNCTION__))->type_common.name)
: t;
1595 if (!TREE_PUBLIC (decl)((decl)->base.public_flag))
1596 /* No need to worry about things local to this TU. */
1597 return NULL_TREE(tree) __null;
1598
1599 mark_abi_tags (t, true);
1600
1601 tree subtype = TYPE_P (subob)(tree_code_type[(int) (((enum tree_code) (subob)->base.code
))] == tcc_type)
? subob : TREE_TYPE (subob)((contains_struct_check ((subob), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1601, __FUNCTION__))->typed.type)
;
1602 struct abi_tag_data data = { t, subob, error_mark_nodeglobal_trees[TI_ERROR_MARK] };
1603 if (inherit)
1604 data.tags = NULL_TREE(tree) __null;
1605
1606 cp_walk_tree_without_duplicates (&subtype, find_abi_tags_r, &data)walk_tree_without_duplicates_1 (&subtype, find_abi_tags_r
, &data, cp_walk_subtrees)
;
1607
1608 if (!(inherit && data.tags))
1609 /* We don't need to do anything with data.tags. */;
1610 else if (just_checking)
1611 for (tree t = data.tags; t; t = TREE_CHAIN (t)((contains_struct_check ((t), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1611, __FUNCTION__))->common.chain)
)
1612 {
1613 tree id = get_identifier (TREE_STRING_POINTER (TREE_VALUE (t)))(__builtin_constant_p (((const char *)((tree_check ((((tree_check
((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1613, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1613, __FUNCTION__, (STRING_CST)))->string.str))) ? get_identifier_with_length
((((const char *)((tree_check ((((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1613, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1613, __FUNCTION__, (STRING_CST)))->string.str))), strlen
(((const char *)((tree_check ((((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1613, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1613, __FUNCTION__, (STRING_CST)))->string.str)))) : get_identifier
(((const char *)((tree_check ((((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1613, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1613, __FUNCTION__, (STRING_CST)))->string.str))))
;
1614 IDENTIFIER_MARKED (id)((tree_not_check2 (((tree_check ((id), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1614, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1614, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
= false;
1615 }
1616 else
1617 {
1618 tree attr = lookup_attribute ("abi_tag", DECL_ATTRIBUTES (t)((contains_struct_check ((t), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1618, __FUNCTION__))->decl_common.attributes)
);
1619 if (attr)
1620 TREE_VALUE (attr)((tree_check ((attr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1620, __FUNCTION__, (TREE_LIST)))->list.value)
= chainon (data.tags, TREE_VALUE (attr)((tree_check ((attr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1620, __FUNCTION__, (TREE_LIST)))->list.value)
);
1621 else
1622 DECL_ATTRIBUTES (t)((contains_struct_check ((t), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1622, __FUNCTION__))->decl_common.attributes)
1623 = tree_cons (abi_tag_identifiercp_global_trees[CPTI_ABI_TAG_IDENTIFIER], data.tags, DECL_ATTRIBUTES (t)((contains_struct_check ((t), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1623, __FUNCTION__))->decl_common.attributes)
);
1624 }
1625
1626 mark_abi_tags (t, false);
1627
1628 return data.tags;
1629}
1630
1631/* Check that DECL has all the ABI tags that are used in parts of its type
1632 that are not reflected in its mangled name. */
1633
1634void
1635check_abi_tags (tree decl)
1636{
1637 if (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL))
1638 check_abi_tags (decl, TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1638, __FUNCTION__))->typed.type)
);
1639 else if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == FUNCTION_DECL
1640 && !DECL_CONV_FN_P (decl)((((tree_not_check2 (((tree_check ((((contains_struct_check (
(decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1640, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1640, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1640, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) & ((tree_not_check2 (((tree_check ((((contains_struct_check
((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1640, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1640, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1640, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1) & (!((tree_not_check2 (((tree_check ((((contains_struct_check
((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1640, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1640, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1640, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))
1641 && !mangle_return_type_p (decl))
1642 check_abi_tags (decl, TREE_TYPE (TREE_TYPE (decl))((contains_struct_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1642, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1642, __FUNCTION__))->typed.type)
);
1643}
1644
1645/* Return any ABI tags that are used in parts of the type of DECL
1646 that are not reflected in its mangled name. This function is only
1647 used in backward-compatible mangling for ABI <11. */
1648
1649tree
1650missing_abi_tags (tree decl)
1651{
1652 if (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL))
1653 return check_abi_tags (decl, TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1653, __FUNCTION__))->typed.type)
, true);
1654 else if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == FUNCTION_DECL
1655 /* Don't check DECL_CONV_FN_P here like we do in check_abi_tags, so
1656 that we can use this function for setting need_abi_warning
1657 regardless of the current flag_abi_version. */
1658 && !mangle_return_type_p (decl))
1659 return check_abi_tags (decl, TREE_TYPE (TREE_TYPE (decl))((contains_struct_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1659, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1659, __FUNCTION__))->typed.type)
, true);
1660 else
1661 return NULL_TREE(tree) __null;
1662}
1663
1664void
1665inherit_targ_abi_tags (tree t)
1666{
1667 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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1667, __FUNCTION__))->type_common.lang_flag_5))
1668 || CLASSTYPE_TEMPLATE_INFO (t)(((tree_class_check (((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1668, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1668, __FUNCTION__))->type_non_common.lang_1))
== NULL_TREE(tree) __null)
1669 return;
1670
1671 mark_abi_tags (t, true);
1672
1673 tree args = CLASSTYPE_TI_ARGS (t)((struct tree_template_info*)(tree_check (((((tree_class_check
(((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1673, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1673, __FUNCTION__))->type_non_common.lang_1))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1673, __FUNCTION__, (TEMPLATE_INFO))))->args
;
1674 struct abi_tag_data data = { t, NULL_TREE(tree) __null, NULL_TREE(tree) __null };
1675 for (int i = 0; i < TMPL_ARGS_DEPTH (args)((args && ((tree_check ((args), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1675, __FUNCTION__, (TREE_VEC)))->base.u.length) &&
(*((const_cast<tree *> (tree_vec_elt_check ((args), (0
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1675, __FUNCTION__))))) && ((enum tree_code) ((*((const_cast
<tree *> (tree_vec_elt_check ((args), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1675, __FUNCTION__))))))->base.code) == TREE_VEC) ? ((tree_check
((args), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1675, __FUNCTION__, (TREE_VEC)))->base.u.length) : 1)
; ++i)
1676 {
1677 tree level = TMPL_ARGS_LEVEL (args, i+1)((args && ((tree_check ((args), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1677, __FUNCTION__, (TREE_VEC)))->base.u.length) &&
(*((const_cast<tree *> (tree_vec_elt_check ((args), (0
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1677, __FUNCTION__))))) && ((enum tree_code) ((*((const_cast
<tree *> (tree_vec_elt_check ((args), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1677, __FUNCTION__))))))->base.code) == TREE_VEC) ? (*((
const_cast<tree *> (tree_vec_elt_check ((args), ((i+1) -
1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1677, __FUNCTION__))))) : (args))
;
1678 for (int j = 0; j < TREE_VEC_LENGTH (level)((tree_check ((level), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1678, __FUNCTION__, (TREE_VEC)))->base.u.length)
; ++j)
1679 {
1680 tree arg = TREE_VEC_ELT (level, j)(*((const_cast<tree *> (tree_vec_elt_check ((level), (j
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1680, __FUNCTION__)))))
;
1681 data.subob = arg;
1682 cp_walk_tree_without_duplicates (&arg, find_abi_tags_r, &data)walk_tree_without_duplicates_1 (&arg, find_abi_tags_r, &
data, cp_walk_subtrees)
;
1683 }
1684 }
1685
1686 // If we found some tags on our template arguments, add them to our
1687 // abi_tag attribute.
1688 if (data.tags)
1689 {
1690 tree attr = lookup_attribute ("abi_tag", TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1690, __FUNCTION__))->type_common.attributes)
);
1691 if (attr)
1692 TREE_VALUE (attr)((tree_check ((attr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1692, __FUNCTION__, (TREE_LIST)))->list.value)
= chainon (data.tags, TREE_VALUE (attr)((tree_check ((attr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1692, __FUNCTION__, (TREE_LIST)))->list.value)
);
1693 else
1694 TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1694, __FUNCTION__))->type_common.attributes)
1695 = tree_cons (abi_tag_identifiercp_global_trees[CPTI_ABI_TAG_IDENTIFIER], data.tags, TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1695, __FUNCTION__))->type_common.attributes)
);
1696 }
1697
1698 mark_abi_tags (t, false);
1699}
1700
1701/* Return true, iff class T has a non-virtual destructor that is
1702 accessible from outside the class heirarchy (i.e. is public, or
1703 there's a suitable friend. */
1704
1705static bool
1706accessible_nvdtor_p (tree t)
1707{
1708 tree dtor = CLASSTYPE_DESTRUCTOR (t)(get_class_binding_direct (t, cp_global_trees[CPTI_DTOR_IDENTIFIER
]))
;
1709
1710 /* An implicitly declared destructor is always public. And,
1711 if it were virtual, we would have created it by now. */
1712 if (!dtor)
1713 return true;
1714
1715 if (DECL_VINDEX (dtor)((tree_check ((dtor), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1715, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
)
1716 return false; /* Virtual */
1717
1718 if (!TREE_PRIVATE (dtor)((dtor)->base.private_flag) && !TREE_PROTECTED (dtor)((dtor)->base.protected_flag))
1719 return true; /* Public */
1720
1721 if (CLASSTYPE_FRIEND_CLASSES (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1721, __FUNCTION__))->type_with_lang_specific.lang_specific
))->friend_classes)
1722 || DECL_FRIENDLIST (TYPE_MAIN_DECL (t))(((contains_struct_check ((((((contains_struct_check (((tree_class_check
((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1722, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1722, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1722, __FUNCTION__))->common.chain)))), (TS_DECL_COMMON)
, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1722, __FUNCTION__))->decl_common.initial))
)
1723 return true; /* Has friends */
1724
1725 return false;
1726}
1727
1728/* Run through the base classes of T, updating CANT_HAVE_CONST_CTOR_P,
1729 and NO_CONST_ASN_REF_P. Also set flag bits in T based on
1730 properties of the bases. */
1731
1732static void
1733check_bases (tree t,
1734 int* cant_have_const_ctor_p,
1735 int* no_const_asn_ref_p)
1736{
1737 int i;
1738 bool seen_non_virtual_nearly_empty_base_p = 0;
1739 int seen_tm_mask = 0;
1740 tree base_binfo;
1741 tree binfo;
1742 tree field = NULL_TREE(tree) __null;
1743
1744 if (!CLASSTYPE_NON_STD_LAYOUT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1744, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
)
1745 for (field = TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1745, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
; field; field = DECL_CHAIN (field)(((contains_struct_check (((contains_struct_check ((field), (
TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1745, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1745, __FUNCTION__))->common.chain))
)
1746 if (TREE_CODE (field)((enum tree_code) (field)->base.code) == FIELD_DECL)
1747 break;
1748
1749 for (binfo = TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1749, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
, i = 0;
1750 BINFO_BASE_ITERATE (binfo, i, base_binfo)((&(tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1750, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)->
iterate ((i), &(base_binfo)))
; i++)
1751 {
1752 tree basetype = TREE_TYPE (base_binfo)((contains_struct_check ((base_binfo), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1752, __FUNCTION__))->typed.type)
;
1753
1754 gcc_assert (COMPLETE_TYPE_P (basetype))((void)(!((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1754, __FUNCTION__))->type_common.size) != (tree) __null
)) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1754, __FUNCTION__), 0 : 0))
;
1755
1756 if (CLASSTYPE_FINAL (basetype)((tree_check3 ((basetype), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1756, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->base.default_def_flag)
)
1757 error ("cannot derive from %<final%> base %qT in derived type %qT",
1758 basetype, t);
1759
1760 /* If any base class is non-literal, so is the derived class. */
1761 if (!CLASSTYPE_LITERAL_P (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1761, __FUNCTION__))->type_with_lang_specific.lang_specific
))->is_literal)
)
1762 CLASSTYPE_LITERAL_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1762, __FUNCTION__))->type_with_lang_specific.lang_specific
))->is_literal)
= false;
1763
1764 /* If the base class doesn't have copy constructors or
1765 assignment operators that take const references, then the
1766 derived class cannot have such a member automatically
1767 generated. */
1768 if (TYPE_HAS_COPY_CTOR (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1768, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
1769 && ! TYPE_HAS_CONST_COPY_CTOR (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1769, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_const_copy_ctor)
)
1770 *cant_have_const_ctor_p = 1;
1771 if (TYPE_HAS_COPY_ASSIGN (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1771, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
1772 && !TYPE_HAS_CONST_COPY_ASSIGN (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1772, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_const_copy_assign)
)
1773 *no_const_asn_ref_p = 1;
1774
1775 if (BINFO_VIRTUAL_P (base_binfo)((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1775, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
1776 /* A virtual base does not effect nearly emptiness. */
1777 ;
1778 else if (CLASSTYPE_NEARLY_EMPTY_P (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1778, __FUNCTION__))->type_with_lang_specific.lang_specific
))->nearly_empty_p)
)
1779 {
1780 if (seen_non_virtual_nearly_empty_base_p)
1781 /* And if there is more than one nearly empty base, then the
1782 derived class is not nearly empty either. */
1783 CLASSTYPE_NEARLY_EMPTY_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1783, __FUNCTION__))->type_with_lang_specific.lang_specific
))->nearly_empty_p)
= 0;
1784 else
1785 /* Remember we've seen one. */
1786 seen_non_virtual_nearly_empty_base_p = 1;
1787 }
1788 else if (!is_empty_class (basetype))
1789 /* If the base class is not empty or nearly empty, then this
1790 class cannot be nearly empty. */
1791 CLASSTYPE_NEARLY_EMPTY_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1791, __FUNCTION__))->type_with_lang_specific.lang_specific
))->nearly_empty_p)
= 0;
1792
1793 /* A lot of properties from the bases also apply to the derived
1794 class. */
1795 TYPE_NEEDS_CONSTRUCTING (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1795, __FUNCTION__))->type_common.needs_constructing_flag
)
|= TYPE_NEEDS_CONSTRUCTING (basetype)((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1795, __FUNCTION__))->type_common.needs_constructing_flag
)
;
1796 TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)(((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1796, __FUNCTION__))->type_common.lang_flag_4))
1797 |= TYPE_HAS_NONTRIVIAL_DESTRUCTOR (basetype)(((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1797, __FUNCTION__))->type_common.lang_flag_4))
;
1798 TYPE_HAS_COMPLEX_COPY_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1798, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_assign)
1799 |= (TYPE_HAS_COMPLEX_COPY_ASSIGN (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1799, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_assign)
1800 || !TYPE_HAS_COPY_ASSIGN (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1800, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
);
1801 TYPE_HAS_COMPLEX_COPY_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1801, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_ctor)
|= (TYPE_HAS_COMPLEX_COPY_CTOR (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1801, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_ctor)
1802 || !TYPE_HAS_COPY_CTOR (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1802, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
);
1803 TYPE_HAS_COMPLEX_MOVE_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1803, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_assign)
1804 |= TYPE_HAS_COMPLEX_MOVE_ASSIGN (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1804, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_assign)
;
1805 TYPE_HAS_COMPLEX_MOVE_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1805, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_ctor)
|= TYPE_HAS_COMPLEX_MOVE_CTOR (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1805, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_ctor)
;
1806 TYPE_POLYMORPHIC_P (t)(((tree_not_check2 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1806, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
|= TYPE_POLYMORPHIC_P (basetype)(((tree_not_check2 ((basetype), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1806, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
;
1807 CLASSTYPE_CONTAINS_EMPTY_CLASS_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1807, __FUNCTION__))->type_with_lang_specific.lang_specific
))->contains_empty_class_p)
1808 |= CLASSTYPE_CONTAINS_EMPTY_CLASS_P (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1808, __FUNCTION__))->type_with_lang_specific.lang_specific
))->contains_empty_class_p)
;
1809 TYPE_HAS_COMPLEX_DFLT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1809, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_dflt)
|= (!TYPE_HAS_DEFAULT_CONSTRUCTOR (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1809, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_default_ctor)
1810 || TYPE_HAS_COMPLEX_DFLT (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1810, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_dflt)
);
1811 SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1813, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init = ((((tree_class_check ((t), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1812, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1812, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0) | (((tree_class_check ((basetype
), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1813, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1813, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0)))
1812 (t, CLASSTYPE_READONLY_FIELDS_NEED_INIT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1813, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init = ((((tree_class_check ((t), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1812, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1812, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0) | (((tree_class_check ((basetype
), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1813, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1813, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0)))
1813 | CLASSTYPE_READONLY_FIELDS_NEED_INIT (basetype))((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1813, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init = ((((tree_class_check ((t), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1812, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1812, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0) | (((tree_class_check ((basetype
), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1813, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1813, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0)))
;
1814 SET_CLASSTYPE_REF_FIELDS_NEED_INIT((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1816, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init = ((((tree_class_check ((t), (tcc_type)
, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1815, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1815, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init : 0) | (((tree_class_check ((basetype),
(tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1816, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1816, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init : 0)))
1815 (t, CLASSTYPE_REF_FIELDS_NEED_INIT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1816, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init = ((((tree_class_check ((t), (tcc_type)
, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1815, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1815, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init : 0) | (((tree_class_check ((basetype),
(tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1816, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1816, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init : 0)))
1816 | CLASSTYPE_REF_FIELDS_NEED_INIT (basetype))((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1816, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init = ((((tree_class_check ((t), (tcc_type)
, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1815, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1815, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init : 0) | (((tree_class_check ((basetype),
(tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1816, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1816, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init : 0)))
;
1817 if (TYPE_HAS_MUTABLE_P (basetype)(cp_has_mutable_p (basetype)))
1818 CLASSTYPE_HAS_MUTABLE (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1818, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_mutable)
= 1;
1819
1820 /* A standard-layout class is a class that:
1821 ...
1822 * has no non-standard-layout base classes, */
1823 CLASSTYPE_NON_STD_LAYOUT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1823, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
|= CLASSTYPE_NON_STD_LAYOUT (basetype)((((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1823, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
;
1824 if (!CLASSTYPE_NON_STD_LAYOUT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1824, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
)
1825 {
1826 tree basefield;
1827 /* ...has no base classes of the same type as the first non-static
1828 data member... */
1829 if (field && DECL_CONTEXT (field)((contains_struct_check ((field), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1829, __FUNCTION__))->decl_minimal.context)
== t
1830 && (same_type_ignoring_top_level_qualifiers_p
1831 (TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1831, __FUNCTION__))->typed.type)
, basetype)))
1832 CLASSTYPE_NON_STD_LAYOUT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1832, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
= 1;
1833 /* DR 1813:
1834 ...has at most one base class subobject of any given type... */
1835 else if (CLASSTYPE_REPEATED_BASE_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1835, __FUNCTION__))->type_with_lang_specific.lang_specific
))->repeated_base)
)
1836 CLASSTYPE_NON_STD_LAYOUT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1836, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
= 1;
1837 else
1838 /* ...either has no non-static data members in the most-derived
1839 class and at most one base class with non-static data
1840 members, or has no base classes with non-static data
1841 members. FIXME This was reworded in DR 1813. */
1842 for (basefield = TYPE_FIELDS (basetype)((tree_check3 ((basetype), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1842, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
; basefield;
1843 basefield = DECL_CHAIN (basefield)(((contains_struct_check (((contains_struct_check ((basefield
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1843, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1843, __FUNCTION__))->common.chain))
)
1844 if (TREE_CODE (basefield)((enum tree_code) (basefield)->base.code) == FIELD_DECL
1845 && !(DECL_FIELD_IS_BASE (basefield)((contains_struct_check (((tree_check ((basefield), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1845, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1845, __FUNCTION__))->decl_common.lang_flag_6)
1846 && integer_zerop (DECL_SIZE (basefield)((contains_struct_check ((basefield), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1846, __FUNCTION__))->decl_common.size)
)))
1847 {
1848 if (field)
1849 CLASSTYPE_NON_STD_LAYOUT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1849, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
= 1;
1850 else
1851 field = basefield;
1852 break;
1853 }
1854 }
1855
1856 /* Don't bother collecting tm attributes if transactional memory
1857 support is not enabled. */
1858 if (flag_tmglobal_options.x_flag_tm)
1859 {
1860 tree tm_attr = find_tm_attribute (TYPE_ATTRIBUTES (basetype)((tree_class_check ((basetype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1860, __FUNCTION__))->type_common.attributes)
);
1861 if (tm_attr)
1862 seen_tm_mask |= tm_attr_to_mask (tm_attr);
1863 }
1864
1865 check_abi_tags (t, basetype);
1866 }
1867
1868 /* If one of the base classes had TM attributes, and the current class
1869 doesn't define its own, then the current class inherits one. */
1870 if (seen_tm_mask && !find_tm_attribute (TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1870, __FUNCTION__))->type_common.attributes)
))
1871 {
1872 tree tm_attr = tm_mask_to_attr (least_bit_hwi (seen_tm_mask));
1873 TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1873, __FUNCTION__))->type_common.attributes)
= tree_cons (tm_attr, NULL__null, TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1873, __FUNCTION__))->type_common.attributes)
);
1874 }
1875}
1876
1877/* Determine all the primary bases within T. Sets BINFO_PRIMARY_BASE_P for
1878 those that are primaries. Sets BINFO_LOST_PRIMARY_P for those
1879 that have had a nearly-empty virtual primary base stolen by some
1880 other base in the hierarchy. Determines CLASSTYPE_PRIMARY_BASE for
1881 T. */
1882
1883static void
1884determine_primary_bases (tree t)
1885{
1886 unsigned i;
1887 tree primary = NULL_TREE(tree) __null;
1888 tree type_binfo = TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1888, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
1889 tree base_binfo;
1890
1891 /* Determine the primary bases of our bases. */
1892 for (base_binfo = TREE_CHAIN (type_binfo)((contains_struct_check ((type_binfo), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1892, __FUNCTION__))->common.chain)
; base_binfo;
1893 base_binfo = TREE_CHAIN (base_binfo)((contains_struct_check ((base_binfo), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1893, __FUNCTION__))->common.chain)
)
1894 {
1895 tree primary = CLASSTYPE_PRIMARY_BINFO (BINFO_TYPE (base_binfo))((((tree_class_check ((((contains_struct_check (((tree_check (
(base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1895, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1895, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1895, __FUNCTION__))->type_with_lang_specific.lang_specific
))->primary_base)
;
1896
1897 /* See if we're the non-virtual primary of our inheritance
1898 chain. */
1899 if (!BINFO_VIRTUAL_P (base_binfo)((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1899, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
1900 {
1901 tree parent = BINFO_INHERITANCE_CHAIN (base_binfo)((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1901, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
;
1902 tree parent_primary = CLASSTYPE_PRIMARY_BINFO (BINFO_TYPE (parent))((((tree_class_check ((((contains_struct_check (((tree_check (
(parent), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1902, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1902, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1902, __FUNCTION__))->type_with_lang_specific.lang_specific
))->primary_base)
;
1903
1904 if (parent_primary
1905 && SAME_BINFO_TYPE_P (BINFO_TYPE (base_binfo),((((contains_struct_check (((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1905, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1905, __FUNCTION__))->typed.type)) == (((contains_struct_check
(((tree_check ((parent_primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1906, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1906, __FUNCTION__))->typed.type)))
1906 BINFO_TYPE (parent_primary))((((contains_struct_check (((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1905, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1905, __FUNCTION__))->typed.type)) == (((contains_struct_check
(((tree_check ((parent_primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1906, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1906, __FUNCTION__))->typed.type)))
)
1907 /* We are the primary binfo. */
1908 BINFO_PRIMARY_P (base_binfo)((tree_not_check2 (((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1908, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1908, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
= 1;
1909 }
1910 /* Determine if we have a virtual primary base, and mark it so.
1911 */
1912 if (primary && BINFO_VIRTUAL_P (primary)((tree_check ((primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1912, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
1913 {
1914 tree this_primary = copied_binfo (primary, base_binfo);
1915
1916 if (BINFO_PRIMARY_P (this_primary)((tree_not_check2 (((tree_check ((this_primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1916, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1916, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
)
1917 /* Someone already claimed this base. */
1918 BINFO_LOST_PRIMARY_P (base_binfo)((tree_not_check2 (((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1918, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1918, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
= 1;
1919 else
1920 {
1921 tree delta;
1922
1923 BINFO_PRIMARY_P (this_primary)((tree_not_check2 (((tree_check ((this_primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1923, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1923, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
= 1;
1924 BINFO_INHERITANCE_CHAIN (this_primary)((tree_check ((this_primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1924, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
= base_binfo;
1925
1926 /* A virtual binfo might have been copied from within
1927 another hierarchy. As we're about to use it as a
1928 primary base, make sure the offsets match. */
1929 delta = size_diffop_loc (input_location,
1930 fold_convert (ssizetype,fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_ssizetype
], ((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1931, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
1931 BINFO_OFFSET (base_binfo))fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_ssizetype
], ((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1931, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
,
1932 fold_convert (ssizetype,fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_ssizetype
], ((tree_check ((this_primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1933, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
1933 BINFO_OFFSET (this_primary))fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_ssizetype
], ((tree_check ((this_primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1933, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
);
1934
1935 propagate_binfo_offsets (this_primary, delta);
1936 }
1937 }
1938 }
1939
1940 /* First look for a dynamic direct non-virtual base. */
1941 for (i = 0; BINFO_BASE_ITERATE (type_binfo, i, base_binfo)((&(tree_check ((type_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1941, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)->
iterate ((i), &(base_binfo)))
; i++)
1942 {
1943 tree basetype = BINFO_TYPE (base_binfo)((contains_struct_check (((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1943, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1943, __FUNCTION__))->typed.type)
;
1944
1945 if (TYPE_CONTAINS_VPTR_P (basetype)((((tree_not_check2 ((basetype), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1945, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) || ((((tree_class_check ((basetype), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1945, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vbases))
&& !BINFO_VIRTUAL_P (base_binfo)((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1945, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
1946 {
1947 primary = base_binfo;
1948 goto found;
1949 }
1950 }
1951
1952 /* A "nearly-empty" virtual base class can be the primary base
1953 class, if no non-virtual polymorphic base can be found. Look for
1954 a nearly-empty virtual dynamic base that is not already a primary
1955 base of something in the hierarchy. If there is no such base,
1956 just pick the first nearly-empty virtual base. */
1957
1958 for (base_binfo = TREE_CHAIN (type_binfo)((contains_struct_check ((type_binfo), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1958, __FUNCTION__))->common.chain)
; base_binfo;
1959 base_binfo = TREE_CHAIN (base_binfo)((contains_struct_check ((base_binfo), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1959, __FUNCTION__))->common.chain)
)
1960 if (BINFO_VIRTUAL_P (base_binfo)((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1960, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
1961 && CLASSTYPE_NEARLY_EMPTY_P (BINFO_TYPE (base_binfo))((((tree_class_check ((((contains_struct_check (((tree_check (
(base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1961, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1961, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1961, __FUNCTION__))->type_with_lang_specific.lang_specific
))->nearly_empty_p)
)
1962 {
1963 if (!BINFO_PRIMARY_P (base_binfo)((tree_not_check2 (((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1963, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1963, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
)
1964 {
1965 /* Found one that is not primary. */
1966 primary = base_binfo;
1967 goto found;
1968 }
1969 else if (!primary)
1970 /* Remember the first candidate. */
1971 primary = base_binfo;
1972 }
1973
1974 found:
1975 /* If we've got a primary base, use it. */
1976 if (primary)
1977 {
1978 tree basetype = BINFO_TYPE (primary)((contains_struct_check (((tree_check ((primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1978, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1978, __FUNCTION__))->typed.type)
;
1979
1980 CLASSTYPE_PRIMARY_BINFO (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1980, __FUNCTION__))->type_with_lang_specific.lang_specific
))->primary_base)
= primary;
1981 if (BINFO_PRIMARY_P (primary)((tree_not_check2 (((tree_check ((primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1981, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1981, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
)
1982 /* We are stealing a primary base. */
1983 BINFO_LOST_PRIMARY_P (BINFO_INHERITANCE_CHAIN (primary))((tree_not_check2 (((tree_check ((((tree_check ((primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1983, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1983, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1983, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
= 1;
1984 BINFO_PRIMARY_P (primary)((tree_not_check2 (((tree_check ((primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1984, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1984, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
= 1;
1985 if (BINFO_VIRTUAL_P (primary)((tree_check ((primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1985, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
1986 {
1987 tree delta;
1988
1989 BINFO_INHERITANCE_CHAIN (primary)((tree_check ((primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1989, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
= type_binfo;
1990 /* A virtual binfo might have been copied from within
1991 another hierarchy. As we're about to use it as a primary
1992 base, make sure the offsets match. */
1993 delta = size_diffop_loc (input_location, ssize_int (0)size_int_kind (0, stk_ssizetype),
1994 fold_convert (ssizetype, BINFO_OFFSET (primary))fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_ssizetype
], ((tree_check ((primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1994, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
);
1995
1996 propagate_binfo_offsets (primary, delta);
1997 }
1998
1999 primary = TYPE_BINFO (basetype)((tree_check3 ((basetype), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1999, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
2000
2001 TYPE_VFIELD (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2001, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.minval)
= TYPE_VFIELD (basetype)((tree_check3 ((basetype), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2001, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.minval)
;
2002 BINFO_VTABLE (type_binfo)((tree_check ((type_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2002, __FUNCTION__, (TREE_BINFO)))->binfo.vtable)
= BINFO_VTABLE (primary)((tree_check ((primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2002, __FUNCTION__, (TREE_BINFO)))->binfo.vtable)
;
2003 BINFO_VIRTUALS (type_binfo)((tree_check ((type_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2003, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
= BINFO_VIRTUALS (primary)((tree_check ((primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2003, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
;
2004 }
2005}
2006
2007/* Update the variant types of T. */
2008
2009void
2010fixup_type_variants (tree t)
2011{
2012 tree variants;
2013
2014 if (!t)
2015 return;
2016
2017 for (variants = TYPE_NEXT_VARIANT (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2017, __FUNCTION__))->type_common.next_variant)
;
2018 variants;
2019 variants = TYPE_NEXT_VARIANT (variants)((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2019, __FUNCTION__))->type_common.next_variant)
)
2020 {
2021 /* These fields are in the _TYPE part of the node, not in
2022 the TYPE_LANG_SPECIFIC component, so they are not shared. */
2023 TYPE_HAS_USER_CONSTRUCTOR (variants)(((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2023, __FUNCTION__))->type_common.lang_flag_1))
= TYPE_HAS_USER_CONSTRUCTOR (t)(((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2023, __FUNCTION__))->type_common.lang_flag_1))
;
2024 TYPE_NEEDS_CONSTRUCTING (variants)((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2024, __FUNCTION__))->type_common.needs_constructing_flag
)
= TYPE_NEEDS_CONSTRUCTING (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2024, __FUNCTION__))->type_common.needs_constructing_flag
)
;
2025 TYPE_HAS_NONTRIVIAL_DESTRUCTOR (variants)(((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2025, __FUNCTION__))->type_common.lang_flag_4))
2026 = TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)(((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2026, __FUNCTION__))->type_common.lang_flag_4))
;
2027
2028 TYPE_POLYMORPHIC_P (variants)(((tree_not_check2 ((variants), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2028, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
= TYPE_POLYMORPHIC_P (t)(((tree_not_check2 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2028, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
;
2029 CLASSTYPE_FINAL (variants)((tree_check3 ((variants), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2029, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->base.default_def_flag)
= CLASSTYPE_FINAL (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2029, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->base.default_def_flag)
;
2030
2031 TYPE_BINFO (variants)((tree_check3 ((variants), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2031, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
= TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2031, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
2032
2033 /* Copy whatever these are holding today. */
2034 TYPE_VFIELD (variants)((tree_check3 ((variants), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2034, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.minval)
= TYPE_VFIELD (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2034, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.minval)
;
2035 TYPE_FIELDS (variants)((tree_check3 ((variants), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2035, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
= TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2035, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
;
2036
2037 TYPE_SIZE (variants)((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2037, __FUNCTION__))->type_common.size)
= TYPE_SIZE (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2037, __FUNCTION__))->type_common.size)
;
2038 TYPE_SIZE_UNIT (variants)((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2038, __FUNCTION__))->type_common.size_unit)
= TYPE_SIZE_UNIT (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2038, __FUNCTION__))->type_common.size_unit)
;
2039 }
2040}
2041
2042/* KLASS is a class that we're applying may_alias to after the body is
2043 parsed. Fixup any POINTER_TO and REFERENCE_TO types. The
2044 canonical type(s) will be implicitly updated. */
2045
2046static void
2047fixup_may_alias (tree klass)
2048{
2049 tree t, v;
2050
2051 for (t = TYPE_POINTER_TO (klass)((tree_class_check ((klass), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2051, __FUNCTION__))->type_common.pointer_to)
; t; t = TYPE_NEXT_PTR_TO (t)((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2051, __FUNCTION__, (POINTER_TYPE)))->type_non_common.minval
)
)
2052 for (v = TYPE_MAIN_VARIANT (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2052, __FUNCTION__))->type_common.main_variant)
; v; v = TYPE_NEXT_VARIANT (v)((tree_class_check ((v), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2052, __FUNCTION__))->type_common.next_variant)
)
2053 TYPE_REF_CAN_ALIAS_ALL (v)((tree_check2 ((v), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2053, __FUNCTION__, (POINTER_TYPE), (REFERENCE_TYPE)))->
base.static_flag)
= true;
2054 for (t = TYPE_REFERENCE_TO (klass)((tree_class_check ((klass), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2054, __FUNCTION__))->type_common.reference_to)
; t; t = TYPE_NEXT_REF_TO (t)((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2054, __FUNCTION__, (REFERENCE_TYPE)))->type_non_common.
minval)
)
2055 for (v = TYPE_MAIN_VARIANT (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2055, __FUNCTION__))->type_common.main_variant)
; v; v = TYPE_NEXT_VARIANT (v)((tree_class_check ((v), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2055, __FUNCTION__))->type_common.next_variant)
)
2056 TYPE_REF_CAN_ALIAS_ALL (v)((tree_check2 ((v), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2056, __FUNCTION__, (POINTER_TYPE), (REFERENCE_TYPE)))->
base.static_flag)
= true;
2057}
2058
2059/* Early variant fixups: we apply attributes at the beginning of the class
2060 definition, and we need to fix up any variants that have already been
2061 made via elaborated-type-specifier so that check_qualified_type works. */
2062
2063void
2064fixup_attribute_variants (tree t)
2065{
2066 tree variants;
2067
2068 if (!t)
2069 return;
2070
2071 tree attrs = TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2071, __FUNCTION__))->type_common.attributes)
;
2072 unsigned align = TYPE_ALIGN (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2072, __FUNCTION__))->type_common.align ? ((unsigned)1) <<
((t)->type_common.align - 1) : 0)
;
2073 bool user_align = TYPE_USER_ALIGN (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2073, __FUNCTION__))->base.u.bits.user_align)
;
2074 bool may_alias = lookup_attribute ("may_alias", attrs);
2075 bool packed = TYPE_PACKED (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2075, __FUNCTION__))->base.u.bits.packed_flag)
;
2076
2077 if (may_alias)
2078 fixup_may_alias (t);
2079
2080 for (variants = TYPE_NEXT_VARIANT (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2080, __FUNCTION__))->type_common.next_variant)
;
2081 variants;
2082 variants = TYPE_NEXT_VARIANT (variants)((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2082, __FUNCTION__))->type_common.next_variant)
)
2083 {
2084 /* These are the two fields that check_qualified_type looks at and
2085 are affected by attributes. */
2086 TYPE_ATTRIBUTES (variants)((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2086, __FUNCTION__))->type_common.attributes)
= attrs;
2087 unsigned valign = align;
2088 if (TYPE_USER_ALIGN (variants)((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2088, __FUNCTION__))->base.u.bits.user_align)
)
2089 valign = MAX (valign, TYPE_ALIGN (variants))((valign) > (((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2089, __FUNCTION__))->type_common.align ? ((unsigned)1) <<
((variants)->type_common.align - 1) : 0)) ? (valign) : ((
(tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2089, __FUNCTION__))->type_common.align ? ((unsigned)1) <<
((variants)->type_common.align - 1) : 0)))
;
2090 else
2091 TYPE_USER_ALIGN (variants)((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2091, __FUNCTION__))->base.u.bits.user_align)
= user_align;
2092 SET_TYPE_ALIGN (variants, valign)((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2092, __FUNCTION__))->type_common.align = ffs_hwi (valign
))
;
2093 TYPE_PACKED (variants)((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2093, __FUNCTION__))->base.u.bits.packed_flag)
= packed;
2094 if (may_alias)
2095 fixup_may_alias (variants);
2096 }
2097}
2098
2099/* Set memoizing fields and bits of T (and its variants) for later
2100 use. */
2101
2102static void
2103finish_struct_bits (tree t)
2104{
2105 /* Fix up variants (if any). */
2106 fixup_type_variants (t);
2107
2108 if (BINFO_N_BASE_BINFOS (TYPE_BINFO (t))((&(tree_check ((((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2108, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2108, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)->
length ())
&& TYPE_POLYMORPHIC_P (t)(((tree_not_check2 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2108, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
)
2109 /* For a class w/o baseclasses, 'finish_struct' has set
2110 CLASSTYPE_PURE_VIRTUALS correctly (by definition).
2111 Similarly for a class whose base classes do not have vtables.
2112 When neither of these is true, we might have removed abstract
2113 virtuals (by providing a definition), added some (by declaring
2114 new ones), or redeclared ones from a base class. We need to
2115 recalculate what's really an abstract virtual at this point (by
2116 looking in the vtables). */
2117 get_pure_virtuals (t);
2118
2119 /* If this type has a copy constructor or a destructor, force its
2120 mode to be BLKmode, and force its TREE_ADDRESSABLE bit to be
2121 nonzero. This will cause it to be passed by invisible reference
2122 and prevent it from being returned in a register. */
2123 if (type_has_nontrivial_copy_init (t)
2124 || TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)(((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2124, __FUNCTION__))->type_common.lang_flag_4))
)
2125 {
2126 tree variants;
2127 SET_DECL_MODE (TYPE_MAIN_DECL (t), BLKmode)((contains_struct_check ((((((contains_struct_check (((tree_class_check
((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2127, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2127, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2127, __FUNCTION__))->common.chain)))), (TS_DECL_COMMON)
, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2127, __FUNCTION__))->decl_common.mode = (((void) 0, E_BLKmode
)))
;
2128 for (variants = t; variants; variants = TYPE_NEXT_VARIANT (variants)((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2128, __FUNCTION__))->type_common.next_variant)
)
2129 {
2130 SET_TYPE_MODE (variants, BLKmode)((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2130, __FUNCTION__))->type_common.mode = (((void) 0, E_BLKmode
)))
;
2131 TREE_ADDRESSABLE (variants)((variants)->base.addressable_flag) = 1;
2132 }
2133 }
2134}
2135
2136/* Issue warnings about T having private constructors, but no friends,
2137 and so forth.
2138
2139 HAS_NONPRIVATE_METHOD is nonzero if T has any non-private methods or
2140 static members. HAS_NONPRIVATE_STATIC_FN is nonzero if T has any
2141 non-private static member functions. */
2142
2143static void
2144maybe_warn_about_overly_private_class (tree t)
2145{
2146 int has_member_fn = 0;
2147 int has_nonprivate_method = 0;
2148 bool nonprivate_ctor = false;
2149
2150 if (!warn_ctor_dtor_privacyglobal_options.x_warn_ctor_dtor_privacy
2151 /* If the class has friends, those entities might create and
2152 access instances, so we should not warn. */
2153 || (CLASSTYPE_FRIEND_CLASSES (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2153, __FUNCTION__))->type_with_lang_specific.lang_specific
))->friend_classes)
2154 || DECL_FRIENDLIST (TYPE_MAIN_DECL (t))(((contains_struct_check ((((((contains_struct_check (((tree_class_check
((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2154, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2154, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2154, __FUNCTION__))->common.chain)))), (TS_DECL_COMMON)
, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2154, __FUNCTION__))->decl_common.initial))
)
2155 /* We will have warned when the template was declared; there's
2156 no need to warn on every instantiation. */
2157 || CLASSTYPE_TEMPLATE_INSTANTIATION (t)(((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2157, __FUNCTION__))->type_with_lang_specific.lang_specific
))->use_template) & 1)
)
2158 /* There's no reason to even consider warning about this
2159 class. */
2160 return;
2161
2162 /* We only issue one warning, if more than one applies, because
2163 otherwise, on code like:
2164
2165 class A {
2166 // Oops - forgot `public:'
2167 A();
2168 A(const A&);
2169 ~A();
2170 };
2171
2172 we warn several times about essentially the same problem. */
2173
2174 /* Check to see if all (non-constructor, non-destructor) member
2175 functions are private. (Since there are no friends or
2176 non-private statics, we can't ever call any of the private member
2177 functions.) */
2178 for (tree fn = TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2178, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
; fn; fn = DECL_CHAIN (fn)(((contains_struct_check (((contains_struct_check ((fn), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2178, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2178, __FUNCTION__))->common.chain))
)
2179 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == USING_DECL
2180 && DECL_NAME (fn)((contains_struct_check ((fn), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2180, __FUNCTION__))->decl_minimal.name)
== ctor_identifiercp_global_trees[CPTI_CTOR_IDENTIFIER]
2181 && !TREE_PRIVATE (fn)((fn)->base.private_flag))
2182 nonprivate_ctor = true;
2183 else if (!DECL_DECLARES_FUNCTION_P (fn)(((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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2183, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2183, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL))
)
2184 /* Not a function. */;
2185 else if (DECL_ARTIFICIAL (fn)((contains_struct_check ((fn), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2185, __FUNCTION__))->decl_common.artificial_flag)
)
2186 /* We're not interested in compiler-generated methods; they don't
2187 provide any way to call private members. */;
2188 else if (!TREE_PRIVATE (fn)((fn)->base.private_flag))
2189 {
2190 if (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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2190, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2190, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2190, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2190, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2190, __FUNCTION__); &lt->u.fn; })->static_function
)
)
2191 /* A non-private static member function is just like a
2192 friend; it can create and invoke private member
2193 functions, and be accessed without a class
2194 instance. */
2195 return;
2196
2197 has_nonprivate_method = 1;
2198 /* Keep searching for a static member function. */
2199 }
2200 else if (!DECL_CONSTRUCTOR_P (fn)((tree_check (((((enum tree_code) (fn)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2200, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2200, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
)
&& !DECL_DESTRUCTOR_P (fn)((tree_check (((((enum tree_code) (fn)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2200, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2200, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
)
2201 has_member_fn = 1;
2202
2203 if (!has_nonprivate_method && has_member_fn)
2204 {
2205 /* There are no non-private methods, and there's at least one
2206 private member function that isn't a constructor or
2207 destructor. (If all the private members are
2208 constructors/destructors we want to use the code below that
2209 issues error messages specifically referring to
2210 constructors/destructors.) */
2211 unsigned i;
2212 tree binfo = TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2212, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
2213
2214 for (i = 0; i != BINFO_N_BASE_BINFOS (binfo)((&(tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2214, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)->
length ())
; i++)
2215 if (BINFO_BASE_ACCESS (binfo, i)(*((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2215, __FUNCTION__, (TREE_BINFO)))->binfo.base_accesses)
)[(i)]
!= access_private_nodeglobal_trees[TI_PRIVATE])
2216 {
2217 has_nonprivate_method = 1;
2218 break;
2219 }
2220 if (!has_nonprivate_method)
2221 {
2222 warning (OPT_Wctor_dtor_privacy,
2223 "all member functions in class %qT are private", t);
2224 return;
2225 }
2226 }
2227
2228 /* Even if some of the member functions are non-private, the class
2229 won't be useful for much if all the constructors or destructors
2230 are private: such an object can never be created or destroyed. */
2231 if (tree dtor = CLASSTYPE_DESTRUCTOR (t)(get_class_binding_direct (t, cp_global_trees[CPTI_DTOR_IDENTIFIER
]))
)
2232 if (TREE_PRIVATE (dtor)((dtor)->base.private_flag))
2233 {
2234 warning (OPT_Wctor_dtor_privacy,
2235 "%q#T only defines a private destructor and has no friends",
2236 t);
2237 return;
2238 }
2239
2240 /* Warn about classes that have private constructors and no friends. */
2241 if (TYPE_HAS_USER_CONSTRUCTOR (t)(((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2241, __FUNCTION__))->type_common.lang_flag_1))
2242 /* Implicitly generated constructors are always public. */
2243 && !CLASSTYPE_LAZY_DEFAULT_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2243, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_default_ctor)
)
2244 {
2245 tree copy_or_move = NULL_TREE(tree) __null;
2246
2247 /* If a non-template class does not define a copy
2248 constructor, one is defined for it, enabling it to avoid
2249 this warning. For a template class, this does not
2250 happen, and so we would normally get a warning on:
2251
2252 template <class T> class C { private: C(); };
2253
2254 To avoid this asymmetry, we check TYPE_HAS_COPY_CTOR. All
2255 complete non-template or fully instantiated classes have this
2256 flag set. */
2257 if (!TYPE_HAS_COPY_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2257, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
)
2258 nonprivate_ctor = true;
2259 else
2260 for (ovl_iterator iter (CLASSTYPE_CONSTRUCTORS (t)(get_class_binding_direct (t, cp_global_trees[CPTI_CTOR_IDENTIFIER
]))
);
2261 !nonprivate_ctor && iter; ++iter)
2262 if (TREE_PRIVATE (*iter)((*iter)->base.private_flag))
2263 continue;
2264 else if (copy_fn_p (*iter) || move_fn_p (*iter))
2265 /* Ideally, we wouldn't count any constructor that takes
2266 an argument of the class type as a parameter, because
2267 such things cannot be used to construct an instance of
2268 the class unless you already have one. */
2269 copy_or_move = *iter;
2270 else
2271 nonprivate_ctor = true;
2272
2273 if (!nonprivate_ctor)
2274 {
2275 bool w = warning (OPT_Wctor_dtor_privacy,
2276 "%q#T only defines private constructors and has "
2277 "no friends", t);
2278 if (w && copy_or_move)
2279 inform (DECL_SOURCE_LOCATION (copy_or_move)((contains_struct_check ((copy_or_move), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2279, __FUNCTION__))->decl_minimal.locus)
,
2280 "%q#D is public, but requires an existing %q#T object",
2281 copy_or_move, t);
2282 return;
2283 }
2284 }
2285}
2286
2287/* Make BINFO's vtable have N entries, including RTTI entries,
2288 vbase and vcall offsets, etc. Set its type and call the back end
2289 to lay it out. */
2290
2291static void
2292layout_vtable_decl (tree binfo, int n)
2293{
2294 tree atype;
2295 tree vtable;
2296
2297 atype = build_array_of_n_type (vtable_entry_typecp_global_trees[CPTI_VTABLE_ENTRY_TYPE], n);
2298 layout_type (atype);
2299
2300 /* We may have to grow the vtable. */
2301 vtable = get_vtbl_decl_for_binfo (binfo);
2302 if (!same_type_p (TREE_TYPE (vtable), atype)comptypes ((((contains_struct_check ((vtable), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2302, __FUNCTION__))->typed.type)), (atype), 0)
)
2303 {
2304 TREE_TYPE (vtable)((contains_struct_check ((vtable), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2304, __FUNCTION__))->typed.type)
= atype;
2305 DECL_SIZE (vtable)((contains_struct_check ((vtable), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2305, __FUNCTION__))->decl_common.size)
= DECL_SIZE_UNIT (vtable)((contains_struct_check ((vtable), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2305, __FUNCTION__))->decl_common.size_unit)
= NULL_TREE(tree) __null;
2306 layout_decl (vtable, 0);
2307 }
2308}
2309
2310/* True iff FNDECL and BASE_FNDECL (both non-static member functions)
2311 have the same signature. */
2312
2313int
2314same_signature_p (const_tree fndecl, const_tree base_fndecl)
2315{
2316 /* One destructor overrides another if they are the same kind of
2317 destructor. */
2318 if (DECL_DESTRUCTOR_P (base_fndecl)((tree_check (((((enum tree_code) (base_fndecl)->base.code
) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast
<union tree_node *> ((((tree_check ((base_fndecl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2318, __FUNCTION__, (TEMPLATE_DECL))))))))->result : base_fndecl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2318, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
&& DECL_DESTRUCTOR_P (fndecl)((tree_check (((((enum tree_code) (fndecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((fndecl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2318, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fndecl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2318, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
2319 && special_function_p (base_fndecl) == special_function_p (fndecl))
2320 return 1;
2321 /* But a non-destructor never overrides a destructor, nor vice
2322 versa, nor do different kinds of destructors override
2323 one-another. For example, a complete object destructor does not
2324 override a deleting destructor. */
2325 if (DECL_DESTRUCTOR_P (base_fndecl)((tree_check (((((enum tree_code) (base_fndecl)->base.code
) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast
<union tree_node *> ((((tree_check ((base_fndecl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2325, __FUNCTION__, (TEMPLATE_DECL))))))))->result : base_fndecl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2325, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
|| DECL_DESTRUCTOR_P (fndecl)((tree_check (((((enum tree_code) (fndecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((fndecl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2325, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fndecl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2325, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
)
2326 return 0;
2327
2328 if (DECL_NAME (fndecl)((contains_struct_check ((fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2328, __FUNCTION__))->decl_minimal.name)
== DECL_NAME (base_fndecl)((contains_struct_check ((base_fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2328, __FUNCTION__))->decl_minimal.name)
2329 || (DECL_CONV_FN_P (fndecl)((((tree_not_check2 (((tree_check ((((contains_struct_check (
(fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2329, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2329, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2329, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) & ((tree_not_check2 (((tree_check ((((contains_struct_check
((fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2329, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2329, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2329, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1) & (!((tree_not_check2 (((tree_check ((((contains_struct_check
((fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2329, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2329, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2329, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))
2330 && DECL_CONV_FN_P (base_fndecl)((((tree_not_check2 (((tree_check ((((contains_struct_check (
(base_fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2330, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2330, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2330, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) & ((tree_not_check2 (((tree_check ((((contains_struct_check
((base_fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2330, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2330, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2330, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1) & (!((tree_not_check2 (((tree_check ((((contains_struct_check
((base_fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2330, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2330, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2330, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))
2331 && same_type_p (DECL_CONV_FN_TYPE (fndecl),comptypes ((((contains_struct_check (((((void)(!(((((tree_not_check2
(((tree_check ((((contains_struct_check ((fndecl), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) & ((tree_not_check2 (((tree_check ((((contains_struct_check
((fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1) & (!((tree_not_check2 (((tree_check ((((contains_struct_check
((fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__), 0 : 0)), ((contains_struct_check ((fndecl
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__))->decl_minimal.name))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__))->typed.type)), (((contains_struct_check
(((((void)(!(((((tree_not_check2 (((tree_check ((((contains_struct_check
((base_fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) & ((tree_not_check2 (((tree_check ((((contains_struct_check
((base_fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1) & (!((tree_not_check2 (((tree_check ((((contains_struct_check
((base_fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__), 0 : 0)), ((contains_struct_check ((base_fndecl
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__))->decl_minimal.name))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__))->typed.type)), 0)
2332 DECL_CONV_FN_TYPE (base_fndecl))comptypes ((((contains_struct_check (((((void)(!(((((tree_not_check2
(((tree_check ((((contains_struct_check ((fndecl), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) & ((tree_not_check2 (((tree_check ((((contains_struct_check
((fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1) & (!((tree_not_check2 (((tree_check ((((contains_struct_check
((fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__), 0 : 0)), ((contains_struct_check ((fndecl
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__))->decl_minimal.name))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2331, __FUNCTION__))->typed.type)), (((contains_struct_check
(((((void)(!(((((tree_not_check2 (((tree_check ((((contains_struct_check
((base_fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) & ((tree_not_check2 (((tree_check ((((contains_struct_check
((base_fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1) & (!((tree_not_check2 (((tree_check ((((contains_struct_check
((base_fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__), 0 : 0)), ((contains_struct_check ((base_fndecl
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__))->decl_minimal.name))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2332, __FUNCTION__))->typed.type)), 0)
))
2333 {
2334 tree fntype = TREE_TYPE (fndecl)((contains_struct_check ((fndecl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2334, __FUNCTION__))->typed.type)
;
2335 tree base_fntype = TREE_TYPE (base_fndecl)((contains_struct_check ((base_fndecl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2335, __FUNCTION__))->typed.type)
;
2336 if (type_memfn_quals (fntype) == type_memfn_quals (base_fntype)
2337 && type_memfn_rqual (fntype) == type_memfn_rqual (base_fntype)
2338 && compparms (FUNCTION_FIRST_USER_PARMTYPE (fndecl)skip_artificial_parms_for ((fndecl), ((tree_check2 ((((contains_struct_check
((fndecl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2338, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2338, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
,
2339 FUNCTION_FIRST_USER_PARMTYPE (base_fndecl)skip_artificial_parms_for ((base_fndecl), ((tree_check2 ((((contains_struct_check
((base_fndecl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2339, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2339, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
))
2340 return 1;
2341 }
2342 return 0;
2343}
2344
2345/* Returns TRUE if DERIVED is a binfo containing the binfo BASE as a
2346 subobject. */
2347
2348static bool
2349base_derived_from (tree derived, tree base)
2350{
2351 tree probe;
2352
2353 for (probe = base; probe; probe = BINFO_INHERITANCE_CHAIN (probe)((tree_check ((probe), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2353, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
)
2354 {
2355 if (probe == derived)
2356 return true;
2357 else if (BINFO_VIRTUAL_P (probe)((tree_check ((probe), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2357, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
2358 /* If we meet a virtual base, we can't follow the inheritance
2359 any more. See if the complete type of DERIVED contains
2360 such a virtual base. */
2361 return (binfo_for_vbase (BINFO_TYPE (probe)((contains_struct_check (((tree_check ((probe), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2361, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2361, __FUNCTION__))->typed.type)
, BINFO_TYPE (derived)((contains_struct_check (((tree_check ((derived), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2361, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2361, __FUNCTION__))->typed.type)
)
2362 != NULL_TREE(tree) __null);
2363 }
2364 return false;
2365}
2366
2367struct find_final_overrider_data {
2368 /* The function for which we are trying to find a final overrider. */
2369 tree fn;
2370 /* The base class in which the function was declared. */
2371 tree declaring_base;
2372 /* The candidate overriders. */
2373 tree candidates;
2374 /* Path to most derived. */
2375 vec<tree> path;
2376};
2377
2378/* Add the overrider along the current path to FFOD->CANDIDATES.
2379 Returns true if an overrider was found; false otherwise. */
2380
2381static bool
2382dfs_find_final_overrider_1 (tree binfo,
2383 find_final_overrider_data *ffod,
2384 unsigned depth)
2385{
2386 tree method;
2387
2388 /* If BINFO is not the most derived type, try a more derived class.
2389 A definition there will overrider a definition here. */
2390 if (depth)
2391 {
2392 depth--;
2393 if (dfs_find_final_overrider_1
2394 (ffod->path[depth], ffod, depth))
2395 return true;
2396 }
2397
2398 method = look_for_overrides_here (BINFO_TYPE (binfo)((contains_struct_check (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2398, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2398, __FUNCTION__))->typed.type)
, ffod->fn);
2399 if (method)
2400 {
2401 tree *candidate = &ffod->candidates;
2402
2403 /* Remove any candidates overridden by this new function. */
2404 while (*candidate)
2405 {
2406 /* If *CANDIDATE overrides METHOD, then METHOD
2407 cannot override anything else on the list. */
2408 if (base_derived_from (TREE_VALUE (*candidate)((tree_check ((*candidate), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2408, __FUNCTION__, (TREE_LIST)))->list.value)
, binfo))
2409 return true;
2410 /* If METHOD overrides *CANDIDATE, remove *CANDIDATE. */
2411 if (base_derived_from (binfo, TREE_VALUE (*candidate)((tree_check ((*candidate), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2411, __FUNCTION__, (TREE_LIST)))->list.value)
))
2412 *candidate = TREE_CHAIN (*candidate)((contains_struct_check ((*candidate), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2412, __FUNCTION__))->common.chain)
;
2413 else
2414 candidate = &TREE_CHAIN (*candidate)((contains_struct_check ((*candidate), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2414, __FUNCTION__))->common.chain)
;
2415 }
2416
2417 /* Add the new function. */
2418 ffod->candidates = tree_cons (method, binfo, ffod->candidates);
2419 return true;
2420 }
2421
2422 return false;
2423}
2424
2425/* Called from find_final_overrider via dfs_walk. */
2426
2427static tree
2428dfs_find_final_overrider_pre (tree binfo, void *data)
2429{
2430 find_final_overrider_data *ffod = (find_final_overrider_data *) data;
2431
2432 if (binfo == ffod->declaring_base)
2433 dfs_find_final_overrider_1 (binfo, ffod, ffod->path.length ());
2434 ffod->path.safe_push (binfo);
2435
2436 return NULL_TREE(tree) __null;
2437}
2438
2439static tree
2440dfs_find_final_overrider_post (tree /*binfo*/, void *data)
2441{
2442 find_final_overrider_data *ffod = (find_final_overrider_data *) data;
2443 ffod->path.pop ();
2444
2445 return NULL_TREE(tree) __null;
2446}
2447
2448/* Returns a TREE_LIST whose TREE_PURPOSE is the final overrider for
2449 FN and whose TREE_VALUE is the binfo for the base where the
2450 overriding occurs. BINFO (in the hierarchy dominated by the binfo
2451 DERIVED) is the base object in which FN is declared. */
2452
2453static tree
2454find_final_overrider (tree derived, tree binfo, tree fn)
2455{
2456 find_final_overrider_data ffod;
2457
2458 /* Getting this right is a little tricky. This is valid:
2459
2460 struct S { virtual void f (); };
2461 struct T { virtual void f (); };
2462 struct U : public S, public T { };
2463
2464 even though calling `f' in `U' is ambiguous. But,
2465
2466 struct R { virtual void f(); };
2467 struct S : virtual public R { virtual void f (); };
2468 struct T : virtual public R { virtual void f (); };
2469 struct U : public S, public T { };
2470
2471 is not -- there's no way to decide whether to put `S::f' or
2472 `T::f' in the vtable for `R'.
2473
2474 The solution is to look at all paths to BINFO. If we find
2475 different overriders along any two, then there is a problem. */
2476 if (DECL_THUNK_P (fn)(((enum tree_code) (fn)->base.code) == FUNCTION_DECL &&
((contains_struct_check ((fn), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2476, __FUNCTION__))->decl_common.lang_specific) &&
__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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2476, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2476, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2476, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2476, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2476, __FUNCTION__); &lt->u.fn; })->thunk_p)
)
2477 fn = THUNK_TARGET (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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2477, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2477, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2477, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2477, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2477, __FUNCTION__); &lt->u.fn; })->befriending_classes
)
;
2478
2479 /* Determine the depth of the hierarchy. */
2480 ffod.fn = fn;
2481 ffod.declaring_base = binfo;
2482 ffod.candidates = NULL_TREE(tree) __null;
2483 ffod.path.create (30);
2484
2485 dfs_walk_all (derived, dfs_find_final_overrider_pre,
2486 dfs_find_final_overrider_post, &ffod);
2487
2488 ffod.path.release ();
2489
2490 /* If there was no winner, issue an error message. */
2491 if (!ffod.candidates || TREE_CHAIN (ffod.candidates)((contains_struct_check ((ffod.candidates), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2491, __FUNCTION__))->common.chain)
)
2492 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2493
2494 return ffod.candidates;
2495}
2496
2497/* Return the index of the vcall offset for FN when TYPE is used as a
2498 virtual base. */
2499
2500static tree
2501get_vcall_index (tree fn, tree type)
2502{
2503 vec<tree_pair_s, va_gc> *indices = CLASSTYPE_VCALL_INDICES (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2503, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vcall_indices)
;
2504 tree_pair_p p;
2505 unsigned ix;
2506
2507 FOR_EACH_VEC_SAFE_ELT (indices, ix, p)for (ix = 0; vec_safe_iterate ((indices), (ix), &(p)); ++
(ix))
2508 if ((DECL_DESTRUCTOR_P (fn)((tree_check (((((enum tree_code) (fn)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2508, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2508, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
&& DECL_DESTRUCTOR_P (p->purpose)((tree_check (((((enum tree_code) (p->purpose)->base.code
) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast
<union tree_node *> ((((tree_check ((p->purpose), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2508, __FUNCTION__, (TEMPLATE_DECL))))))))->result : p->
purpose)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2508, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
)
2509 || same_signature_p (fn, p->purpose))
2510 return p->value;
2511
2512 /* There should always be an appropriate index. */
2513 gcc_unreachable ()(fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2513, __FUNCTION__))
;
2514}
2515
2516/* Given a DECL_VINDEX of a virtual function found in BINFO, return the final
2517 overrider at that index in the vtable. This should only be used when we
2518 know that BINFO is correct for the dynamic type of the object. */
2519
2520tree
2521lookup_vfn_in_binfo (tree idx, tree binfo)
2522{
2523 int ix = tree_to_shwi (idx);
2524 if (TARGET_VTABLE_USES_DESCRIPTORS0)
2525 ix /= MAX (TARGET_VTABLE_USES_DESCRIPTORS, 1)((0) > (1) ? (0) : (1));
2526 while (BINFO_PRIMARY_P (binfo)((tree_not_check2 (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2526, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2526, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
)
2527 /* BINFO_VIRTUALS in a primary base isn't accurate, find the derived
2528 class that actually owns the vtable. */
2529 binfo = BINFO_INHERITANCE_CHAIN (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2529, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
;
2530 tree virtuals = BINFO_VIRTUALS (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2530, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
;
2531 return TREE_VALUE (chain_index (ix, virtuals))((tree_check ((chain_index (ix, virtuals)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2531, __FUNCTION__, (TREE_LIST)))->list.value)
;
2532}
2533
2534/* Update an entry in the vtable for BINFO, which is in the hierarchy
2535 dominated by T. FN is the old function; VIRTUALS points to the
2536 corresponding position in the new BINFO_VIRTUALS list. IX is the index
2537 of that entry in the list. */
2538
2539static void
2540update_vtable_entry_for_fn (tree t, tree binfo, tree fn, tree* virtuals,
2541 unsigned ix)
2542{
2543 tree b;
2544 tree overrider;
2545 tree delta;
2546 tree virtual_base;
2547 tree first_defn;
2548 tree overrider_fn, overrider_target;
2549 tree target_fn = DECL_THUNK_P (fn)(((enum tree_code) (fn)->base.code) == FUNCTION_DECL &&
((contains_struct_check ((fn), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2549, __FUNCTION__))->decl_common.lang_specific) &&
__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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2549, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2549, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2549, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2549, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2549, __FUNCTION__); &lt->u.fn; })->thunk_p)
? THUNK_TARGET (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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2549, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2549, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2549, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2549, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2549, __FUNCTION__); &lt->u.fn; })->befriending_classes
)
: fn;
2550 tree over_return, base_return;
2551 bool lost = false;
2552
2553 /* Find the nearest primary base (possibly binfo itself) which defines
2554 this function; this is the class the caller will convert to when
2555 calling FN through BINFO. */
2556 for (b = binfo; ; b = get_primary_binfo (b))
2557 {
2558 gcc_assert (b)((void)(!(b) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2558, __FUNCTION__), 0 : 0))
;
2559 if (look_for_overrides_here (BINFO_TYPE (b)((contains_struct_check (((tree_check ((b), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2559, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2559, __FUNCTION__))->typed.type)
, target_fn))
2560 break;
2561
2562 /* The nearest definition is from a lost primary. */
2563 if (BINFO_LOST_PRIMARY_P (b)((tree_not_check2 (((tree_check ((b), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2563, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2563, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
)
2564 lost = true;
2565 }
2566 first_defn = b;
2567
2568 /* Find the final overrider. */
2569 overrider = find_final_overrider (TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2569, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
, b, target_fn);
2570 if (overrider == error_mark_nodeglobal_trees[TI_ERROR_MARK])
2571 {
2572 error ("no unique final overrider for %qD in %qT", target_fn, t);
2573 return;
2574 }
2575 overrider_target = overrider_fn = TREE_PURPOSE (overrider)((tree_check ((overrider), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2575, __FUNCTION__, (TREE_LIST)))->list.purpose)
;
2576
2577 /* Check for adjusting covariant return types. */
2578 over_return = TREE_TYPE (TREE_TYPE (overrider_target))((contains_struct_check ((((contains_struct_check ((overrider_target
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2578, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2578, __FUNCTION__))->typed.type)
;
2579 base_return = TREE_TYPE (TREE_TYPE (target_fn))((contains_struct_check ((((contains_struct_check ((target_fn
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2579, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2579, __FUNCTION__))->typed.type)
;
2580
2581 if (INDIRECT_TYPE_P (over_return)((((enum tree_code) (over_return)->base.code) == POINTER_TYPE
) || (((enum tree_code) (over_return)->base.code) == REFERENCE_TYPE
))
2582 && TREE_CODE (over_return)((enum tree_code) (over_return)->base.code) == TREE_CODE (base_return)((enum tree_code) (base_return)->base.code)
2583 && CLASS_TYPE_P (TREE_TYPE (over_return))(((((enum tree_code) (((contains_struct_check ((over_return),
(TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2583, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE
|| (((enum tree_code) (((contains_struct_check ((over_return
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2583, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE
) && ((tree_class_check ((((contains_struct_check ((over_return
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2583, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2583, __FUNCTION__))->type_common.lang_flag_5))
2584 && CLASS_TYPE_P (TREE_TYPE (base_return))(((((enum tree_code) (((contains_struct_check ((base_return),
(TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2584, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE
|| (((enum tree_code) (((contains_struct_check ((base_return
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2584, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE
) && ((tree_class_check ((((contains_struct_check ((base_return
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2584, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2584, __FUNCTION__))->type_common.lang_flag_5))
2585 /* If the overrider is invalid, don't even try. */
2586 && !DECL_INVALID_OVERRIDER_P (overrider_target)(((contains_struct_check ((overrider_target), (TS_DECL_COMMON
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2586, __FUNCTION__))->decl_common.lang_flag_4))
)
2587 {
2588 /* If FN is a covariant thunk, we must figure out the adjustment
2589 to the final base FN was converting to. As OVERRIDER_TARGET might
2590 also be converting to the return type of FN, we have to
2591 combine the two conversions here. */
2592 tree fixed_offset, virtual_offset;
2593
2594 over_return = TREE_TYPE (over_return)((contains_struct_check ((over_return), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2594, __FUNCTION__))->typed.type)
;
2595 base_return = TREE_TYPE (base_return)((contains_struct_check ((base_return), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2595, __FUNCTION__))->typed.type)
;
2596
2597 if (DECL_THUNK_P (fn)(((enum tree_code) (fn)->base.code) == FUNCTION_DECL &&
((contains_struct_check ((fn), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2597, __FUNCTION__))->decl_common.lang_specific) &&
__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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2597, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2597, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2597, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2597, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2597, __FUNCTION__); &lt->u.fn; })->thunk_p)
)
2598 {
2599 gcc_assert (DECL_RESULT_THUNK_P (fn))((void)(!(((((enum tree_code) (fn)->base.code) == FUNCTION_DECL
&& ((contains_struct_check ((fn), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2599, __FUNCTION__))->decl_common.lang_specific) &&
__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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2599, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2599, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2599, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2599, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2599, __FUNCTION__); &lt->u.fn; })->thunk_p) &&
!__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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2599, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2599, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2599, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2599, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2599, __FUNCTION__); &lt->u.fn; })->this_thunk_p)
) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2599, __FUNCTION__), 0 : 0))
;
2600 fixed_offset = ssize_int (THUNK_FIXED_OFFSET (fn))size_int_kind ((((contains_struct_check ((__extension__ ({ __typeof
(fn) const __t = (fn); if (((enum tree_code) (__t)->base.
code) != FUNCTION_DECL || !__t->decl_common.lang_specific ||
!__t->decl_common.lang_specific->u.fn.thunk_p) tree_check_failed
(__t, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2600, __FUNCTION__, 0); __t; })), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2600, __FUNCTION__))->decl_common.lang_specific)->u.fn
.u5.fixed_offset), stk_ssizetype)
;
2601 virtual_offset = THUNK_VIRTUAL_OFFSET (fn)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2601, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2601, __FUNCTION__))->decl_common.lang_specific); if (!(
(((enum tree_code) ((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2601, __FUNCTION__, (FUNCTION_DECL))))->base.code) == VAR_DECL
|| ((enum tree_code) ((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2601, __FUNCTION__, (FUNCTION_DECL))))->base.code) == FUNCTION_DECL
) || ((enum tree_code) ((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2601, __FUNCTION__, (FUNCTION_DECL))))->base.code) == FIELD_DECL
|| ((enum tree_code) ((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2601, __FUNCTION__, (FUNCTION_DECL))))->base.code) == CONST_DECL
|| ((enum tree_code) ((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2601, __FUNCTION__, (FUNCTION_DECL))))->base.code) == TYPE_DECL
|| ((enum tree_code) ((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2601, __FUNCTION__, (FUNCTION_DECL))))->base.code) == TEMPLATE_DECL
|| ((enum tree_code) ((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2601, __FUNCTION__, (FUNCTION_DECL))))->base.code) == USING_DECL
|| ((enum tree_code) ((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2601, __FUNCTION__, (FUNCTION_DECL))))->base.code) == CONCEPT_DECL
)) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2601, __FUNCTION__); &lt->u.min; })->access)
;
2602 }
2603 else
2604 fixed_offset = virtual_offset = NULL_TREE(tree) __null;
2605
2606 if (virtual_offset)
2607 /* Find the equivalent binfo within the return type of the
2608 overriding function. We will want the vbase offset from
2609 there. */
2610 virtual_offset = binfo_for_vbase (BINFO_TYPE (virtual_offset)((contains_struct_check (((tree_check ((virtual_offset), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2610, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2610, __FUNCTION__))->typed.type)
,
2611 over_return);
2612 else if (!same_type_ignoring_top_level_qualifiers_p
2613 (over_return, base_return))
2614 {
2615 /* There was no existing virtual thunk (which takes
2616 precedence). So find the binfo of the base function's
2617 return type within the overriding function's return type.
2618 Fortunately we know the covariancy is valid (it
2619 has already been checked), so we can just iterate along
2620 the binfos, which have been chained in inheritance graph
2621 order. Of course it is lame that we have to repeat the
2622 search here anyway -- we should really be caching pieces
2623 of the vtable and avoiding this repeated work. */
2624 tree thunk_binfo = NULL_TREE(tree) __null;
2625 tree base_binfo = TYPE_BINFO (base_return)((tree_check3 ((base_return), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2625, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
2626
2627 /* Find the base binfo within the overriding function's
2628 return type. We will always find a thunk_binfo, except
2629 when the covariancy is invalid (which we will have
2630 already diagnosed). */
2631 if (base_binfo)
2632 for (thunk_binfo = TYPE_BINFO (over_return)((tree_check3 ((over_return), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2632, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
; thunk_binfo;
2633 thunk_binfo = TREE_CHAIN (thunk_binfo)((contains_struct_check ((thunk_binfo), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2633, __FUNCTION__))->common.chain)
)
2634 if (SAME_BINFO_TYPE_P (BINFO_TYPE (thunk_binfo),((((contains_struct_check (((tree_check ((thunk_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2634, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2634, __FUNCTION__))->typed.type)) == (((contains_struct_check
(((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2635, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2635, __FUNCTION__))->typed.type)))
2635 BINFO_TYPE (base_binfo))((((contains_struct_check (((tree_check ((thunk_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2634, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2634, __FUNCTION__))->typed.type)) == (((contains_struct_check
(((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2635, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2635, __FUNCTION__))->typed.type)))
)
2636 break;
2637 gcc_assert (thunk_binfo || errorcount)((void)(!(thunk_binfo || (global_dc)->diagnostic_count[(int
) (DK_ERROR)]) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2637, __FUNCTION__), 0 : 0))
;
2638
2639 /* See if virtual inheritance is involved. */
2640 for (virtual_offset = thunk_binfo;
2641 virtual_offset;
2642 virtual_offset = BINFO_INHERITANCE_CHAIN (virtual_offset)((tree_check ((virtual_offset), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2642, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
)
2643 if (BINFO_VIRTUAL_P (virtual_offset)((tree_check ((virtual_offset), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2643, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
2644 break;
2645
2646 if (virtual_offset
2647 || (thunk_binfo && !BINFO_OFFSET_ZEROP (thunk_binfo)(integer_zerop (((tree_check ((thunk_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2647, __FUNCTION__, (TREE_BINFO)))->binfo.offset)))
))
2648 {
2649 tree offset = fold_convert (ssizetype, BINFO_OFFSET (thunk_binfo))fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_ssizetype
], ((tree_check ((thunk_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2649, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
;
2650
2651 if (virtual_offset)
2652 {
2653 /* We convert via virtual base. Adjust the fixed
2654 offset to be from there. */
2655 offset =
2656 size_diffop (offset,size_diffop_loc (((location_t) 0), offset, fold_convert_loc (
((location_t) 0), sizetype_tab[(int) stk_ssizetype], ((tree_check
((virtual_offset), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2658, __FUNCTION__, (TREE_BINFO)))->binfo.offset)))
2657 fold_convert (ssizetype,size_diffop_loc (((location_t) 0), offset, fold_convert_loc (
((location_t) 0), sizetype_tab[(int) stk_ssizetype], ((tree_check
((virtual_offset), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2658, __FUNCTION__, (TREE_BINFO)))->binfo.offset)))
2658 BINFO_OFFSET (virtual_offset)))size_diffop_loc (((location_t) 0), offset, fold_convert_loc (
((location_t) 0), sizetype_tab[(int) stk_ssizetype], ((tree_check
((virtual_offset), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2658, __FUNCTION__, (TREE_BINFO)))->binfo.offset)))
;
2659 }
2660 if (fixed_offset)
2661 /* There was an existing fixed offset, this must be
2662 from the base just converted to, and the base the
2663 FN was thunking to. */
2664 fixed_offset = size_binop (PLUS_EXPR, fixed_offset, offset)size_binop_loc (((location_t) 0), PLUS_EXPR, fixed_offset, offset
)
;
2665 else
2666 fixed_offset = offset;
2667 }
2668 }
2669
2670 if (fixed_offset || virtual_offset)
2671 /* Replace the overriding function with a covariant thunk. We
2672 will emit the overriding function in its own slot as
2673 well. */
2674 overrider_fn = make_thunk (overrider_target, /*this_adjusting=*/0,
2675 fixed_offset, virtual_offset);
2676 }
2677 else
2678 gcc_assert (DECL_INVALID_OVERRIDER_P (overrider_target) ||((void)(!((((contains_struct_check ((overrider_target), (TS_DECL_COMMON
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2678, __FUNCTION__))->decl_common.lang_flag_4)) || !(((enum
tree_code) (fn)->base.code) == FUNCTION_DECL && (
(contains_struct_check ((fn), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2679, __FUNCTION__))->decl_common.lang_specific) &&
__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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2679, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2679, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2679, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2679, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2679, __FUNCTION__); &lt->u.fn; })->thunk_p)) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2679, __FUNCTION__), 0 : 0))
2679 !DECL_THUNK_P (fn))((void)(!((((contains_struct_check ((overrider_target), (TS_DECL_COMMON
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2678, __FUNCTION__))->decl_common.lang_flag_4)) || !(((enum
tree_code) (fn)->base.code) == FUNCTION_DECL && (
(contains_struct_check ((fn), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2679, __FUNCTION__))->decl_common.lang_specific) &&
__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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2679, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2679, __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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2679, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2679, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2679, __FUNCTION__); &lt->u.fn; })->thunk_p)) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2679, __FUNCTION__), 0 : 0))
;
2680
2681 /* If we need a covariant thunk, then we may need to adjust first_defn.
2682 The ABI specifies that the thunks emitted with a function are
2683 determined by which bases the function overrides, so we need to be
2684 sure that we're using a thunk for some overridden base; even if we
2685 know that the necessary this adjustment is zero, there may not be an
2686 appropriate zero-this-adjustment thunk for us to use since thunks for
2687 overriding virtual bases always use the vcall offset.
2688
2689 Furthermore, just choosing any base that overrides this function isn't
2690 quite right, as this slot won't be used for calls through a type that
2691 puts a covariant thunk here. Calling the function through such a type
2692 will use a different slot, and that slot is the one that determines
2693 the thunk emitted for that base.
2694
2695 So, keep looking until we find the base that we're really overriding
2696 in this slot: the nearest primary base that doesn't use a covariant
2697 thunk in this slot. */
2698 if (overrider_target != overrider_fn)
2699 {
2700 if (BINFO_TYPE (b)((contains_struct_check (((tree_check ((b), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2700, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2700, __FUNCTION__))->typed.type)
== DECL_CONTEXT (overrider_target)((contains_struct_check ((overrider_target), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2700, __FUNCTION__))->decl_minimal.context)
)
2701 /* We already know that the overrider needs a covariant thunk. */
2702 b = get_primary_binfo (b);
2703 for (; ; b = get_primary_binfo (b))
2704 {
2705 tree main_binfo = TYPE_BINFO (BINFO_TYPE (b))((tree_check3 ((((contains_struct_check (((tree_check ((b), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2705, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2705, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2705, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
2706 tree bv = chain_index (ix, BINFO_VIRTUALS (main_binfo)((tree_check ((main_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2706, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
);
2707 if (!DECL_THUNK_P (TREE_VALUE (bv))(((enum tree_code) (((tree_check ((bv), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__, (TREE_LIST)))->list.value))->base
.code) == FUNCTION_DECL && ((contains_struct_check ((
((tree_check ((bv), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__, (TREE_LIST)))->list.value)), (TS_DECL_COMMON
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__))->decl_common.lang_specific) &&
__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (((tree_check ((bv), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__, (TREE_LIST)))->list.value))->base
.code) == TEMPLATE_DECL ? ((struct tree_template_decl *)(const_cast
<union tree_node *> ((((tree_check ((((tree_check ((bv)
, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__, (TEMPLATE_DECL))))))))->result : ((tree_check
((bv), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__, (TREE_LIST)))->list.value))), (TS_DECL_COMMON
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (((tree_check ((bv), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__, (TREE_LIST)))->list.value))->base
.code) == FUNCTION_DECL || (((enum tree_code) (((tree_check (
(bv), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__, (TREE_LIST)))->list.value))->base
.code) == TEMPLATE_DECL && ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((((tree_check
((bv), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((((tree_check
((bv), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2707, __FUNCTION__); &lt->u.fn; })->thunk_p)
)
2708 break;
2709 if (BINFO_LOST_PRIMARY_P (b)((tree_not_check2 (((tree_check ((b), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2709, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2709, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
)
2710 lost = true;
2711 }
2712 first_defn = b;
2713 }
2714
2715 /* Assume that we will produce a thunk that convert all the way to
2716 the final overrider, and not to an intermediate virtual base. */
2717 virtual_base = NULL_TREE(tree) __null;
2718
2719 /* See if we can convert to an intermediate virtual base first, and then
2720 use the vcall offset located there to finish the conversion. */
2721 for (; b; b = BINFO_INHERITANCE_CHAIN (b)((tree_check ((b), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2721, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
)
2722 {
2723 /* If we find the final overrider, then we can stop
2724 walking. */
2725 if (SAME_BINFO_TYPE_P (BINFO_TYPE (b),((((contains_struct_check (((tree_check ((b), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2725, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2725, __FUNCTION__))->typed.type)) == (((contains_struct_check
(((tree_check ((((tree_check ((overrider), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2726, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2726, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2726, __FUNCTION__))->typed.type)))
2726 BINFO_TYPE (TREE_VALUE (overrider)))((((contains_struct_check (((tree_check ((b), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2725, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2725, __FUNCTION__))->typed.type)) == (((contains_struct_check
(((tree_check ((((tree_check ((overrider), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2726, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2726, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2726, __FUNCTION__))->typed.type)))
)
2727 break;
2728
2729 /* If we find a virtual base, and we haven't yet found the
2730 overrider, then there is a virtual base between the
2731 declaring base (first_defn) and the final overrider. */
2732 if (BINFO_VIRTUAL_P (b)((tree_check ((b), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2732, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
2733 {
2734 virtual_base = b;
2735 break;
2736 }
2737 }
2738
2739 /* Compute the constant adjustment to the `this' pointer. The
2740 `this' pointer, when this function is called, will point at BINFO
2741 (or one of its primary bases, which are at the same offset). */
2742 if (virtual_base)
2743 /* The `this' pointer needs to be adjusted from the declaration to
2744 the nearest virtual base. */
2745 delta = size_diffop_loc (input_location,
2746 fold_convert (ssizetype, BINFO_OFFSET (virtual_base))fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_ssizetype
], ((tree_check ((virtual_base), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2746, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
,
2747 fold_convert (ssizetype, BINFO_OFFSET (first_defn))fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_ssizetype
], ((tree_check ((first_defn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2747, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
);
2748 else if (lost)
2749 /* If the nearest definition is in a lost primary, we don't need an
2750 entry in our vtable. Except possibly in a constructor vtable,
2751 if we happen to get our primary back. In that case, the offset
2752 will be zero, as it will be a primary base. */
2753 delta = size_zero_nodeglobal_trees[TI_SIZE_ZERO];
2754 else
2755 /* The `this' pointer needs to be adjusted from pointing to
2756 BINFO to pointing at the base where the final overrider
2757 appears. */
2758 delta = size_diffop_loc (input_location,
2759 fold_convert (ssizetype,fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_ssizetype
], ((tree_check ((((tree_check ((overrider), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2760, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2760, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
2760 BINFO_OFFSET (TREE_VALUE (overrider)))fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_ssizetype
], ((tree_check ((((tree_check ((overrider), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2760, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2760, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
,
2761 fold_convert (ssizetype, BINFO_OFFSET (binfo))fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_ssizetype
], ((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2761, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
);
2762
2763 modify_vtable_entry (t, binfo, overrider_fn, delta, virtuals);
2764
2765 if (virtual_base)
2766 BV_VCALL_INDEX (*virtuals)(((contains_struct_check ((*virtuals), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2766, __FUNCTION__))->typed.type))
2767 = get_vcall_index (overrider_target, BINFO_TYPE (virtual_base)((contains_struct_check (((tree_check ((virtual_base), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2767, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2767, __FUNCTION__))->typed.type)
);
2768 else
2769 BV_VCALL_INDEX (*virtuals)(((contains_struct_check ((*virtuals), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2769, __FUNCTION__))->typed.type))
= NULL_TREE(tree) __null;
2770
2771 BV_LOST_PRIMARY (*virtuals)(((tree_not_check2 ((*virtuals), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2771, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
= lost;
2772}
2773
2774/* Called from modify_all_vtables via dfs_walk. */
2775
2776static tree
2777dfs_modify_vtables (tree binfo, void* data)
2778{
2779 tree t = (tree) data;
2780 tree virtuals;
2781 tree old_virtuals;
2782 unsigned ix;
2783
2784 if (!TYPE_CONTAINS_VPTR_P (BINFO_TYPE (binfo))((((tree_not_check2 ((((contains_struct_check (((tree_check (
(binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2784, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2784, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2784, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) || ((((tree_class_check ((((contains_struct_check
(((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2784, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2784, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2784, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vbases))
)
2785 /* A base without a vtable needs no modification, and its bases
2786 are uninteresting. */
2787 return dfs_skip_bases((tree)1);
2788
2789 if (SAME_BINFO_TYPE_P (BINFO_TYPE (binfo), t)((((contains_struct_check (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2789, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2789, __FUNCTION__))->typed.type)) == (t))
2790 && !CLASSTYPE_HAS_PRIMARY_BASE_P (t)(((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2790, __FUNCTION__))->type_with_lang_specific.lang_specific
))->primary_base) != (tree) __null)
)
2791 /* Don't do the primary vtable, if it's new. */
2792 return NULL_TREE(tree) __null;
2793
2794 if (BINFO_PRIMARY_P (binfo)((tree_not_check2 (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2794, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2794, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
&& !BINFO_VIRTUAL_P (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2794, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
2795 /* There's no need to modify the vtable for a non-virtual primary
2796 base; we're not going to use that vtable anyhow. We do still
2797 need to do this for virtual primary bases, as they could become
2798 non-primary in a construction vtable. */
2799 return NULL_TREE(tree) __null;
2800
2801 make_new_vtable (t, binfo);
2802
2803 /* Now, go through each of the virtual functions in the virtual
2804 function table for BINFO. Find the final overrider, and update
2805 the BINFO_VIRTUALS list appropriately. */
2806 for (ix = 0, virtuals = BINFO_VIRTUALS (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2806, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
,
2807 old_virtuals = BINFO_VIRTUALS (TYPE_BINFO (BINFO_TYPE (binfo)))((tree_check ((((tree_check3 ((((contains_struct_check (((tree_check
((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2807, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2807, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2807, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2807, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
;
2808 virtuals;
2809 ix++, virtuals = TREE_CHAIN (virtuals)((contains_struct_check ((virtuals), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2809, __FUNCTION__))->common.chain)
,
2810 old_virtuals = TREE_CHAIN (old_virtuals)((contains_struct_check ((old_virtuals), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2810, __FUNCTION__))->common.chain)
)
2811 update_vtable_entry_for_fn (t,
2812 binfo,
2813 BV_FN (old_virtuals)(((tree_check ((old_virtuals), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2813, __FUNCTION__, (TREE_LIST)))->list.value))
,
2814 &virtuals, ix);
2815
2816 return NULL_TREE(tree) __null;
2817}
2818
2819/* Update all of the primary and secondary vtables for T. Create new
2820 vtables as required, and initialize their RTTI information. Each
2821 of the functions in VIRTUALS is declared in T and may override a
2822 virtual function from a base class; find and modify the appropriate
2823 entries to point to the overriding functions. Returns a list, in
2824 declaration order, of the virtual functions that are declared in T,
2825 but do not appear in the primary base class vtable, and which
2826 should therefore be appended to the end of the vtable for T. */
2827
2828static tree
2829modify_all_vtables (tree t, tree virtuals)
2830{
2831 tree binfo = TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2831, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
2832 tree *fnsp;
2833
2834 /* Mangle the vtable name before entering dfs_walk (c++/51884). */
2835 if (TYPE_CONTAINS_VPTR_P (t)((((tree_not_check2 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2835, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) || ((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2835, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vbases))
)
2836 get_vtable_decl (t, false);
2837
2838 /* Update all of the vtables. */
2839 dfs_walk_once (binfo, dfs_modify_vtables, NULL__null, t);
2840
2841 /* Add virtual functions not already in our primary vtable. These
2842 will be both those introduced by this class, and those overridden
2843 from secondary bases. It does not include virtuals merely
2844 inherited from secondary bases. */
2845 for (fnsp = &virtuals; *fnsp; )
2846 {
2847 tree fn = TREE_VALUE (*fnsp)((tree_check ((*fnsp), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2847, __FUNCTION__, (TREE_LIST)))->list.value)
;
2848
2849 if (!value_member (fn, BINFO_VIRTUALS (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2849, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
)
2850 || DECL_VINDEX (fn)((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2850, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
== error_mark_nodeglobal_trees[TI_ERROR_MARK])
2851 {
2852 /* We don't need to adjust the `this' pointer when
2853 calling this function. */
2854 BV_DELTA (*fnsp)(((tree_check ((*fnsp), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2854, __FUNCTION__, (TREE_LIST)))->list.purpose))
= integer_zero_nodeglobal_trees[TI_INTEGER_ZERO];
2855 BV_VCALL_INDEX (*fnsp)(((contains_struct_check ((*fnsp), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2855, __FUNCTION__))->typed.type))
= NULL_TREE(tree) __null;
2856
2857 /* This is a function not already in our vtable. Keep it. */
2858 fnsp = &TREE_CHAIN (*fnsp)((contains_struct_check ((*fnsp), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2858, __FUNCTION__))->common.chain)
;
2859 }
2860 else
2861 /* We've already got an entry for this function. Skip it. */
2862 *fnsp = TREE_CHAIN (*fnsp)((contains_struct_check ((*fnsp), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2862, __FUNCTION__))->common.chain)
;
2863 }
2864
2865 return virtuals;
2866}
2867
2868/* Get the base virtual function declarations in T that have the
2869 indicated NAME. */
2870
2871static void
2872get_basefndecls (tree name, tree t, vec<tree> *base_fndecls)
2873{
2874 bool found_decls = false;
2875
2876 /* Find virtual functions in T with the indicated NAME. */
2877 for (ovl_iterator iter (get_class_binding (t, name)); iter; ++iter)
2878 {
2879 tree method = *iter;
2880
2881 if (TREE_CODE (method)((enum tree_code) (method)->base.code) == FUNCTION_DECL && DECL_VINDEX (method)((tree_check ((method), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2881, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
)
2882 {
2883 base_fndecls->safe_push (method);
2884 found_decls = true;
2885 }
2886 }
2887
2888 if (found_decls)
2889 return;
2890
2891 int n_baseclasses = BINFO_N_BASE_BINFOS (TYPE_BINFO (t))((&(tree_check ((((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2891, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2891, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)->
length ())
;
2892 for (int i = 0; i < n_baseclasses; i++)
2893 {
2894 tree basetype = BINFO_TYPE (BINFO_BASE_BINFO (TYPE_BINFO (t), i))((contains_struct_check (((tree_check ((((*(&(tree_check (
(((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2894, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2894, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos))[
(i)])), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2894, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2894, __FUNCTION__))->typed.type)
;
2895 get_basefndecls (name, basetype, base_fndecls);
2896 }
2897}
2898
2899/* If this method overrides a virtual method from a base, then mark
2900 this member function as being virtual as well. Do 'final' and
2901 'override' checks too. */
2902
2903void
2904check_for_override (tree decl, tree ctype)
2905{
2906 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_DECL)
2907 /* In [temp.mem] we have:
2908
2909 A specialization of a member function template does not
2910 override a virtual function from a base class. */
2911 return;
2912
2913 /* IDENTIFIER_VIRTUAL_P indicates whether the name has ever been
2914 used for a vfunc. That avoids the expensive look_for_overrides
2915 call that when we know there's nothing to find. As conversion
2916 operators for the same type can have distinct identifiers, we
2917 cannot optimize those in that way. */
2918 if ((IDENTIFIER_VIRTUAL_P (DECL_NAME (decl))((tree_not_check2 (((tree_check ((((contains_struct_check ((decl
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2918, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2918, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2918, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
2919 || DECL_CONV_FN_P (decl)((((tree_not_check2 (((tree_check ((((contains_struct_check (
(decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2919, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2919, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2919, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) & ((tree_not_check2 (((tree_check ((((contains_struct_check
((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2919, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2919, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2919, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1) & (!((tree_not_check2 (((tree_check ((((contains_struct_check
((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2919, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2919, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2919, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))
)
2920 && look_for_overrides (ctype, decl)
2921 /* Check staticness after we've checked if we 'override'. */
2922 && !DECL_STATIC_FUNCTION_P (decl)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (decl)->base.code) == TEMPLATE_DECL ?
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2922, __FUNCTION__, (TEMPLATE_DECL))))))))->result : decl
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2922, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (decl)->base.code) == FUNCTION_DECL || (
((enum tree_code) (decl)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2922, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((decl
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2922, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2922, __FUNCTION__); &lt->u.fn; })->static_function
)
)
2923 {
2924 /* Set DECL_VINDEX to a value that is neither an INTEGER_CST nor
2925 the error_mark_node so that we know it is an overriding
2926 function. */
2927 DECL_VINDEX (decl)((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2927, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
= decl;
2928
2929 if (warn_overrideglobal_options.x_warn_override
2930 && !DECL_OVERRIDE_P (decl)(((tree_not_check2 ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2930, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
2931 && !DECL_FINAL_P (decl)((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2931, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.final
)
2932 && !DECL_DESTRUCTOR_P (decl)((tree_check (((((enum tree_code) (decl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2932, __FUNCTION__, (TEMPLATE_DECL))))))))->result : decl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2932, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
)
2933 warning_at (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2933, __FUNCTION__))->decl_minimal.locus)
, OPT_Wsuggest_override,
2934 "%qD can be marked override", decl);
2935 }
2936 else if (DECL_OVERRIDE_P (decl)(((tree_not_check2 ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2936, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
)
2937 error ("%q+#D marked %<override%>, but does not override", decl);
2938
2939 if (DECL_VIRTUAL_P (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2939, __FUNCTION__))->decl_common.virtual_flag)
)
2940 {
2941 /* Remember this identifier is virtual name. */
2942 IDENTIFIER_VIRTUAL_P (DECL_NAME (decl))((tree_not_check2 (((tree_check ((((contains_struct_check ((decl
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2942, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2942, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2942, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
= true;
2943
2944 if (!DECL_VINDEX (decl)((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2944, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
)
2945 /* It's a new vfunc. */
2946 DECL_VINDEX (decl)((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2946, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
= error_mark_nodeglobal_trees[TI_ERROR_MARK];
2947
2948 if (DECL_DESTRUCTOR_P (decl)((tree_check (((((enum tree_code) (decl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2948, __FUNCTION__, (TEMPLATE_DECL))))))))->result : decl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2948, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
)
2949 TYPE_HAS_NONTRIVIAL_DESTRUCTOR (ctype)(((tree_class_check ((ctype), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2949, __FUNCTION__))->type_common.lang_flag_4))
= true;
2950 }
2951 else if (DECL_FINAL_P (decl)((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2951, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.final
)
)
2952 error ("%q+#D marked %<final%>, but is not virtual", decl);
2953}
2954
2955/* Warn about hidden virtual functions that are not overridden in t.
2956 We know that constructors and destructors don't apply. */
2957
2958static void
2959warn_hidden (tree t)
2960{
2961 if (vec<tree, va_gc> *member_vec = CLASSTYPE_MEMBER_VEC (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2961, __FUNCTION__))->type_with_lang_specific.lang_specific
))->members)
)
2962 for (unsigned ix = member_vec->length (); ix--;)
2963 {
2964 tree fns = (*member_vec)[ix];
2965
2966 if (!OVL_P (fns)(((enum tree_code) (fns)->base.code) == FUNCTION_DECL || (
(enum tree_code) (fns)->base.code) == OVERLOAD)
)
2967 continue;
2968
2969 tree name = OVL_NAME (fns)((contains_struct_check ((ovl_first (fns)), (TS_DECL_MINIMAL)
, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2969, __FUNCTION__))->decl_minimal.name)
;
2970 auto_vec<tree, 20> base_fndecls;
2971 tree base_binfo;
2972 tree binfo;
2973 unsigned j;
2974
2975 /* Iterate through all of the base classes looking for possibly
2976 hidden functions. */
2977 for (binfo = TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2977, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
, j = 0;
2978 BINFO_BASE_ITERATE (binfo, j, base_binfo)((&(tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2978, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)->
iterate ((j), &(base_binfo)))
; j++)
2979 {
2980 tree basetype = BINFO_TYPE (base_binfo)((contains_struct_check (((tree_check ((base_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2980, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2980, __FUNCTION__))->typed.type)
;
2981 get_basefndecls (name, basetype, &base_fndecls);
2982 }
2983
2984 /* If there are no functions to hide, continue. */
2985 if (base_fndecls.is_empty ())
2986 continue;
2987
2988 /* Remove any overridden functions. */
2989 for (ovl_iterator iter (fns); iter; ++iter)
2990 {
2991 tree fndecl = *iter;
2992 if (TREE_CODE (fndecl)((enum tree_code) (fndecl)->base.code) == FUNCTION_DECL
2993 && DECL_VINDEX (fndecl)((tree_check ((fndecl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2993, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
)
2994 {
2995 /* If the method from the base class has the same
2996 signature as the method from the derived class, it
2997 has been overridden. */
2998 for (size_t k = 0; k < base_fndecls.length (); k++)
2999 if (base_fndecls[k]
3000 && same_signature_p (fndecl, base_fndecls[k]))
3001 base_fndecls[k] = NULL_TREE(tree) __null;
3002 }
3003 }
3004
3005 /* Now give a warning for all base functions without overriders,
3006 as they are hidden. */
3007 tree base_fndecl;
3008 FOR_EACH_VEC_ELT (base_fndecls, j, base_fndecl)for (j = 0; (base_fndecls).iterate ((j), &(base_fndecl));
++(j))
3009 if (base_fndecl)
3010 {
3011 auto_diagnostic_group d;
3012 /* Here we know it is a hider, and no overrider exists. */
3013 if (warning_at (location_of (base_fndecl),
3014 OPT_Woverloaded_virtual,
3015 "%qD was hidden", base_fndecl))
3016 inform (location_of (fns), " by %qD", fns);
3017 }
3018 }
3019}
3020
3021/* Recursive helper for finish_struct_anon. */
3022
3023static void
3024finish_struct_anon_r (tree field, bool complain)
3025{
3026 for (tree elt = TYPE_FIELDS (TREE_TYPE (field))((tree_check3 ((((contains_struct_check ((field), (TS_TYPED),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3026, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3026, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
; elt; elt = DECL_CHAIN (elt)(((contains_struct_check (((contains_struct_check ((elt), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3026, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3026, __FUNCTION__))->common.chain))
)
3027 {
3028 /* We're generally only interested in entities the user
3029 declared, but we also find nested classes by noticing
3030 the TYPE_DECL that we create implicitly. You're
3031 allowed to put one anonymous union inside another,
3032 though, so we explicitly tolerate that. We use
3033 TYPE_UNNAMED_P rather than ANON_AGGR_TYPE_P so that
3034 we also allow unnamed types used for defining fields. */
3035 if (DECL_ARTIFICIAL (elt)((contains_struct_check ((elt), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3035, __FUNCTION__))->decl_common.artificial_flag)
3036 && (!DECL_IMPLICIT_TYPEDEF_P (elt)(((enum tree_code) (elt)->base.code) == TYPE_DECL &&
((contains_struct_check ((elt), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3036, __FUNCTION__))->decl_common.lang_flag_2))
3037 || TYPE_UNNAMED_P (TREE_TYPE (elt))((((((tree_class_check ((((tree_class_check ((((contains_struct_check
((elt), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((((contains_struct_check ((elt), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((elt), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((elt), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((((contains_struct_check
((elt), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((((contains_struct_check ((elt), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((elt), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((elt), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__, (IDENTIFIER_NODE)))->base.private_flag
)) && !((tree_check ((((((tree_class_check ((((tree_class_check
((((contains_struct_check ((elt), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((((contains_struct_check ((elt), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((elt), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((elt), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3037, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))
))
3038 continue;
3039
3040 if (complain
3041 && (TREE_CODE (elt)((enum tree_code) (elt)->base.code) != FIELD_DECL
3042 || (TREE_PRIVATE (elt)((elt)->base.private_flag) || TREE_PROTECTED (elt)((elt)->base.protected_flag))))
3043 {
3044 /* We already complained about static data members in
3045 finish_static_data_member_decl. */
3046 if (!VAR_P (elt)(((enum tree_code) (elt)->base.code) == VAR_DECL))
3047 {
3048 auto_diagnostic_group d;
3049 if (permerror (DECL_SOURCE_LOCATION (elt)((contains_struct_check ((elt), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3049, __FUNCTION__))->decl_minimal.locus)
,
3050 TREE_CODE (TREE_TYPE (field))((enum tree_code) (((contains_struct_check ((field), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->typed.type))->base.code)
== UNION_TYPE
3051 ? "%q#D invalid; an anonymous union may "
3052 "only have public non-static data members"
3053 : "%q#D invalid; an anonymous struct may "
3054 "only have public non-static data members", elt))
3055 {
3056 static bool hint;
3057 if (flag_permissiveglobal_options.x_flag_permissive && !hint)
3058 {
3059 hint = true;
3060 inform (DECL_SOURCE_LOCATION (elt)((contains_struct_check ((elt), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3060, __FUNCTION__))->decl_minimal.locus)
,
3061 "this flexibility is deprecated and will be "
3062 "removed");
3063 }
3064 }
3065 }
3066 }
3067
3068 TREE_PRIVATE (elt)((elt)->base.private_flag) = TREE_PRIVATE (field)((field)->base.private_flag);
3069 TREE_PROTECTED (elt)((elt)->base.protected_flag) = TREE_PROTECTED (field)((field)->base.protected_flag);
3070
3071 /* Recurse into the anonymous aggregates to correctly handle
3072 access control (c++/24926):
3073
3074 class A {
3075 union {
3076 union {
3077 int i;
3078 };
3079 };
3080 };
3081
3082 int j=A().i; */
3083 if (DECL_NAME (elt)((contains_struct_check ((elt), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3083, __FUNCTION__))->decl_minimal.name)
== NULL_TREE(tree) __null
3084 && ANON_AGGR_TYPE_P (TREE_TYPE (elt))((((((enum tree_code) (((contains_struct_check ((elt), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3084, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE
|| (((enum tree_code) (((contains_struct_check ((elt), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3084, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE
) && ((tree_class_check ((((contains_struct_check ((elt
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3084, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3084, __FUNCTION__))->type_common.lang_flag_5)) &&
(((tree_class_check ((((contains_struct_check ((elt), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3084, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3084, __FUNCTION__))->type_with_lang_specific.lang_specific
))->anon_aggr)
)
3085 finish_struct_anon_r (elt, /*complain=*/false);
3086 }
3087}
3088
3089/* Check for things that are invalid. There are probably plenty of other
3090 things we should check for also. */
3091
3092static void
3093finish_struct_anon (tree t)
3094{
3095 for (tree field = TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3095, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
; field; field = DECL_CHAIN (field)(((contains_struct_check (((contains_struct_check ((field), (
TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3095, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3095, __FUNCTION__))->common.chain))
)
3096 {
3097 if (TREE_STATIC (field)((field)->base.static_flag))
3098 continue;
3099 if (TREE_CODE (field)((enum tree_code) (field)->base.code) != FIELD_DECL)
3100 continue;
3101
3102 if (DECL_NAME (field)((contains_struct_check ((field), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3102, __FUNCTION__))->decl_minimal.name)
== NULL_TREE(tree) __null
3103 && ANON_AGGR_TYPE_P (TREE_TYPE (field))((((((enum tree_code) (((contains_struct_check ((field), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3103, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE
|| (((enum tree_code) (((contains_struct_check ((field), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3103, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE
) && ((tree_class_check ((((contains_struct_check ((field
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3103, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3103, __FUNCTION__))->type_common.lang_flag_5)) &&
(((tree_class_check ((((contains_struct_check ((field), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3103, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3103, __FUNCTION__))->type_with_lang_specific.lang_specific
))->anon_aggr)
)
3104 finish_struct_anon_r (field, /*complain=*/true);
3105 }
3106}
3107
3108/* Add T to CLASSTYPE_DECL_LIST of current_class_type which
3109 will be used later during class template instantiation.
3110 When FRIEND_P is zero, T can be a static member data (VAR_DECL),
3111 a non-static member data (FIELD_DECL), a member function
3112 (FUNCTION_DECL), a nested type (RECORD_TYPE, ENUM_TYPE),
3113 a typedef (TYPE_DECL) or a member class template (TEMPLATE_DECL)
3114 When FRIEND_P is nonzero, T is either a friend class
3115 (RECORD_TYPE, TEMPLATE_DECL) or a friend function
3116 (FUNCTION_DECL, TEMPLATE_DECL). */
3117
3118void
3119maybe_add_class_template_decl_list (tree type, tree t, int friend_p)
3120{
3121 if (CLASSTYPE_TEMPLATE_INFO (type)(((tree_class_check (((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3121, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3121, __FUNCTION__))->type_non_common.lang_1))
3122 && TREE_CODE (t)((enum tree_code) (t)->base.code) != CONST_DECL)
3123 {
3124 tree purpose = friend_p ? NULL_TREE(tree) __null : type;
3125
3126 CLASSTYPE_DECL_LIST (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3126, __FUNCTION__))->type_with_lang_specific.lang_specific
))->decl_list)
3127 = tree_cons (purpose, t, CLASSTYPE_DECL_LIST (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3127, __FUNCTION__))->type_with_lang_specific.lang_specific
))->decl_list)
);
3128 }
3129}
3130
3131/* This function is called from declare_virt_assop_and_dtor via
3132 dfs_walk_all.
3133
3134 DATA is a type that direcly or indirectly inherits the base
3135 represented by BINFO. If BINFO contains a virtual assignment [copy
3136 assignment or move assigment] operator or a virtual constructor,
3137 declare that function in DATA if it hasn't been already declared. */
3138
3139static tree
3140dfs_declare_virt_assop_and_dtor (tree binfo, void *data)
3141{
3142 tree bv, fn, t = (tree)data;
3143 tree opname = assign_op_identifier(ovl_op_info[true][OVL_OP_NOP_EXPR].identifier);
3144
3145 gcc_assert (t && CLASS_TYPE_P (t))((void)(!(t && (((((enum tree_code) (t)->base.code
)) == RECORD_TYPE || (((enum tree_code) (t)->base.code)) ==
UNION_TYPE) && ((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3145, __FUNCTION__))->type_common.lang_flag_5))) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3145, __FUNCTION__), 0 : 0))
;
3146 gcc_assert (binfo && TREE_CODE (binfo) == TREE_BINFO)((void)(!(binfo && ((enum tree_code) (binfo)->base
.code) == TREE_BINFO) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3146, __FUNCTION__), 0 : 0))
;
3147
3148 if (!TYPE_CONTAINS_VPTR_P (BINFO_TYPE (binfo))((((tree_not_check2 ((((contains_struct_check (((tree_check (
(binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3148, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3148, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3148, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) || ((((tree_class_check ((((contains_struct_check
(((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3148, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3148, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3148, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vbases))
)
3149 /* A base without a vtable needs no modification, and its bases
3150 are uninteresting. */
3151 return dfs_skip_bases((tree)1);
3152
3153 if (BINFO_PRIMARY_P (binfo)((tree_not_check2 (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3153, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3153, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
)
3154 /* If this is a primary base, then we have already looked at the
3155 virtual functions of its vtable. */
3156 return NULL_TREE(tree) __null;
3157
3158 for (bv = BINFO_VIRTUALS (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3158, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
; bv; bv = TREE_CHAIN (bv)((contains_struct_check ((bv), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3158, __FUNCTION__))->common.chain)
)
3159 {
3160 fn = BV_FN (bv)(((tree_check ((bv), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3160, __FUNCTION__, (TREE_LIST)))->list.value))
;
3161
3162 if (DECL_NAME (fn)((contains_struct_check ((fn), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3162, __FUNCTION__))->decl_minimal.name)
== opname)
3163 {
3164 if (CLASSTYPE_LAZY_COPY_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3164, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_copy_assign)
)
3165 lazily_declare_fn (sfk_copy_assignment, t);
3166 if (CLASSTYPE_LAZY_MOVE_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3166, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_move_assign)
)
3167 lazily_declare_fn (sfk_move_assignment, t);
3168 }
3169 else if (DECL_DESTRUCTOR_P (fn)((tree_check (((((enum tree_code) (fn)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3169, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3169, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
3170 && CLASSTYPE_LAZY_DESTRUCTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3170, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_destructor)
)
3171 lazily_declare_fn (sfk_destructor, t);
3172 }
3173
3174 return NULL_TREE(tree) __null;
3175}
3176
3177/* If the class type T has a direct or indirect base that contains a
3178 virtual assignment operator or a virtual destructor, declare that
3179 function in T if it hasn't been already declared. */
3180
3181static void
3182declare_virt_assop_and_dtor (tree t)
3183{
3184 if (!(TYPE_POLYMORPHIC_P (t)(((tree_not_check2 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3184, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
3185 && (CLASSTYPE_LAZY_COPY_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3185, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_copy_assign)
3186 || CLASSTYPE_LAZY_MOVE_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3186, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_move_assign)
3187 || CLASSTYPE_LAZY_DESTRUCTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3187, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_destructor)
)))
3188 return;
3189
3190 dfs_walk_all (TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3190, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
,
3191 dfs_declare_virt_assop_and_dtor,
3192 NULL__null, t);
3193}
3194
3195/* Declare the inheriting constructor for class T inherited from base
3196 constructor CTOR with the parameter array PARMS of size NPARMS. */
3197
3198static void
3199one_inheriting_sig (tree t, tree ctor, tree *parms, int nparms)
3200{
3201 gcc_assert (TYPE_MAIN_VARIANT (t) == t)((void)(!(((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3201, __FUNCTION__))->type_common.main_variant) == t) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3201, __FUNCTION__), 0 : 0))
;
3202
3203 /* We don't declare an inheriting ctor that would be a default,
3204 copy or move ctor for derived or base. */
3205 if (nparms == 0)
3206 return;
3207 if (nparms == 1
3208 && TYPE_REF_P (parms[0])(((enum tree_code) (parms[0])->base.code) == REFERENCE_TYPE
)
)
3209 {
3210 tree parm = TYPE_MAIN_VARIANT (TREE_TYPE (parms[0]))((tree_class_check ((((contains_struct_check ((parms[0]), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3210, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3210, __FUNCTION__))->type_common.main_variant)
;
3211 if (parm == t || parm == DECL_CONTEXT (ctor)((contains_struct_check ((ctor), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3211, __FUNCTION__))->decl_minimal.context)
)
3212 return;
3213 }
3214
3215 tree parmlist = void_list_nodeglobal_trees[TI_VOID_LIST_NODE];
3216 for (int i = nparms - 1; i >= 0; i--)
3217 parmlist = tree_cons (NULL_TREE(tree) __null, parms[i], parmlist);
3218 tree fn = implicitly_declare_fn (sfk_inheriting_constructor,
3219 t, false, ctor, parmlist);
3220
3221 if (add_method (t, fn, false))
3222 {
3223 DECL_CHAIN (fn)(((contains_struct_check (((contains_struct_check ((fn), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3223, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3223, __FUNCTION__))->common.chain))
= TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3223, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
;
3224 TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3224, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
= fn;
3225 }
3226}
3227
3228/* Declare all the inheriting constructors for class T inherited from base
3229 constructor CTOR. */
3230
3231static void
3232one_inherited_ctor (tree ctor, tree t, tree using_decl)
3233{
3234 tree parms = FUNCTION_FIRST_USER_PARMTYPE (ctor)skip_artificial_parms_for ((ctor), ((tree_check2 ((((contains_struct_check
((ctor), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3234, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3234, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
;
3235
3236 if (flag_new_inheriting_ctorsglobal_options.x_flag_new_inheriting_ctors)
3237 {
3238 ctor = implicitly_declare_fn (sfk_inheriting_constructor,
3239 t, /*const*/false, ctor, parms);
3240 add_method (t, ctor, using_decl != NULL_TREE(tree) __null);
3241 return;
3242 }
3243
3244 tree *new_parms = XALLOCAVEC (tree, list_length (parms))((tree *) __builtin_alloca(sizeof (tree) * (list_length (parms
))))
;
3245 int i = 0;
3246 for (; parms && parms != void_list_nodeglobal_trees[TI_VOID_LIST_NODE]; parms = TREE_CHAIN (parms)((contains_struct_check ((parms), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3246, __FUNCTION__))->common.chain)
)
3247 {
3248 if (TREE_PURPOSE (parms)((tree_check ((parms), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3248, __FUNCTION__, (TREE_LIST)))->list.purpose)
)
3249 one_inheriting_sig (t, ctor, new_parms, i);
3250 new_parms[i++] = TREE_VALUE (parms)((tree_check ((parms), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3250, __FUNCTION__, (TREE_LIST)))->list.value)
;
3251 }
3252 one_inheriting_sig (t, ctor, new_parms, i);
3253 if (parms == NULL_TREE(tree) __null)
3254 {
3255 auto_diagnostic_group d;
3256 if (warning (OPT_Winherited_variadic_ctor,
3257 "the ellipsis in %qD is not inherited", ctor))
3258 inform (DECL_SOURCE_LOCATION (ctor)((contains_struct_check ((ctor), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3258, __FUNCTION__))->decl_minimal.locus)
, "%qD declared here", ctor);
3259 }
3260}
3261
3262/* Create default constructors, assignment operators, and so forth for
3263 the type indicated by T, if they are needed. CANT_HAVE_CONST_CTOR,
3264 and CANT_HAVE_CONST_ASSIGNMENT are nonzero if, for whatever reason,
3265 the class cannot have a default constructor, copy constructor
3266 taking a const reference argument, or an assignment operator taking
3267 a const reference, respectively. */
3268
3269static void
3270add_implicitly_declared_members (tree t, tree* access_decls,
3271 int cant_have_const_cctor,
3272 int cant_have_const_assignment)
3273{
3274 /* Destructor. */
3275 if (!CLASSTYPE_DESTRUCTOR (t)(get_class_binding_direct (t, cp_global_trees[CPTI_DTOR_IDENTIFIER
]))
)
3276 /* In general, we create destructors lazily. */
3277 CLASSTYPE_LAZY_DESTRUCTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3277, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_destructor)
= 1;
3278
3279 bool move_ok = false;
3280 if (cxx_dialect >= cxx11 && CLASSTYPE_LAZY_DESTRUCTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3280, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_destructor)
3281 && !TYPE_HAS_COPY_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3281, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
&& !TYPE_HAS_COPY_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3281, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
3282 && !classtype_has_move_assign_or_move_ctor_p (t, false))
3283 move_ok = true;
3284
3285 /* [class.ctor]
3286
3287 If there is no user-declared constructor for a class, a default
3288 constructor is implicitly declared. */
3289 if (! TYPE_HAS_USER_CONSTRUCTOR (t)(((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3289, __FUNCTION__))->type_common.lang_flag_1))
)
3290 {
3291 TYPE_HAS_DEFAULT_CONSTRUCTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3291, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_default_ctor)
= 1;
3292 CLASSTYPE_LAZY_DEFAULT_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3292, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_default_ctor)
= 1;
3293 if (cxx_dialect >= cxx11)
3294 TYPE_HAS_CONSTEXPR_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3294, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_constexpr_ctor)
3295 /* Don't force the declaration to get a hard answer; if the
3296 definition would have made the class non-literal, it will still be
3297 non-literal because of the base or member in question, and that
3298 gives a better diagnostic. */
3299 = type_maybe_constexpr_default_constructor (t);
3300 }
3301
3302 /* [class.ctor]
3303
3304 If a class definition does not explicitly declare a copy
3305 constructor, one is declared implicitly. */
3306 if (! TYPE_HAS_COPY_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3306, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
)
3307 {
3308 TYPE_HAS_COPY_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3308, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
= 1;
3309 TYPE_HAS_CONST_COPY_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3309, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_const_copy_ctor)
= !cant_have_const_cctor;
3310 CLASSTYPE_LAZY_COPY_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3310, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_copy_ctor)
= 1;
3311 if (move_ok)
3312 CLASSTYPE_LAZY_MOVE_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3312, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_move_ctor)
= 1;
3313 }
3314
3315 /* If there is no assignment operator, one will be created if and
3316 when it is needed. For now, just record whether or not the type
3317 of the parameter to the assignment operator will be a const or
3318 non-const reference. */
3319 if (!TYPE_HAS_COPY_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3319, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
)
3320 {
3321 TYPE_HAS_COPY_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3321, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
= 1;
3322 TYPE_HAS_CONST_COPY_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3322, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_const_copy_assign)
= !cant_have_const_assignment;
3323 CLASSTYPE_LAZY_COPY_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3323, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_copy_assign)
= 1;
3324 if (move_ok && !LAMBDA_TYPE_P (t)(((enum tree_code) (t)->base.code) == RECORD_TYPE &&
((((tree_class_check ((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((t), (tcc_type)
, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3324, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))
)
3325 CLASSTYPE_LAZY_MOVE_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3325, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_move_assign)
= 1;
3326 }
3327
3328 /* We can't be lazy about declaring functions that might override
3329 a virtual function from a base class. */
3330 declare_virt_assop_and_dtor (t);
3331
3332 /* If the class definition does not explicitly declare an == operator
3333 function, but declares a defaulted three-way comparison operator function,
3334 an == operator function is declared implicitly. */
3335 if (!classtype_has_op (t, EQ_EXPR))
3336 if (tree space = classtype_has_defaulted_op (t, SPACESHIP_EXPR))
3337 {
3338 tree eq = implicitly_declare_fn (sfk_comparison, t, false, space,
3339 NULL_TREE(tree) __null);
3340 bool is_friend = DECL_CONTEXT (space)((contains_struct_check ((space), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3340, __FUNCTION__))->decl_minimal.context)
!= t;
3341 if (is_friend)
3342 do_friend (NULL_TREE(tree) __null, DECL_NAME (eq)((contains_struct_check ((eq), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3342, __FUNCTION__))->decl_minimal.name)
, eq,
3343 NULL_TREE(tree) __null, NO_SPECIAL, true);
3344 else
3345 {
3346 add_method (t, eq, false);
3347 DECL_CHAIN (eq)(((contains_struct_check (((contains_struct_check ((eq), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3347, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3347, __FUNCTION__))->common.chain))
= TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3347, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
;
3348 TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3348, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
= eq;
3349 }
3350 maybe_add_class_template_decl_list (t, eq, is_friend);
3351 }
3352
3353 while (*access_decls)
3354 {
3355 tree using_decl = TREE_VALUE (*access_decls)((tree_check ((*access_decls), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3355, __FUNCTION__, (TREE_LIST)))->list.value)
;
3356 tree decl = USING_DECL_DECLS (using_decl)((contains_struct_check (((tree_check ((using_decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3356, __FUNCTION__, (USING_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3356, __FUNCTION__))->decl_common.initial)
;
3357 if (DECL_NAME (using_decl)((contains_struct_check ((using_decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3357, __FUNCTION__))->decl_minimal.name)
== ctor_identifiercp_global_trees[CPTI_CTOR_IDENTIFIER])
3358 {
3359 /* declare, then remove the decl */
3360 tree ctor_list = decl;
3361 location_t loc = input_location;
3362 input_location = DECL_SOURCE_LOCATION (using_decl)((contains_struct_check ((using_decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3362, __FUNCTION__))->decl_minimal.locus)
;
3363 for (ovl_iterator iter (ctor_list); iter; ++iter)
3364 one_inherited_ctor (*iter, t, using_decl);
3365 *access_decls = TREE_CHAIN (*access_decls)((contains_struct_check ((*access_decls), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3365, __FUNCTION__))->common.chain)
;
3366 input_location = loc;
3367 }
3368 else
3369 access_decls = &TREE_CHAIN (*access_decls)((contains_struct_check ((*access_decls), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3369, __FUNCTION__))->common.chain)
;
3370 }
3371}
3372
3373/* Cache of enum_min_precision values. */
3374static GTY((deletable)) hash_map<tree, int> *enum_to_min_precision;
3375
3376/* Return the minimum precision of a bit-field needed to store all
3377 enumerators of ENUMERAL_TYPE TYPE. */
3378
3379static int
3380enum_min_precision (tree type)
3381{
3382 type = TYPE_MAIN_VARIANT (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3382, __FUNCTION__))->type_common.main_variant)
;
3383 /* For unscoped enums without fixed underlying type and without mode
3384 attribute we can just use precision of the underlying type. */
3385 if (UNSCOPED_ENUM_P (type)(((enum tree_code) (type)->base.code) == ENUMERAL_TYPE &&
!((tree_check ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3385, __FUNCTION__, (ENUMERAL_TYPE)))->base.static_flag)
)
3386 && !ENUM_FIXED_UNDERLYING_TYPE_P (type)(((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3386, __FUNCTION__))->type_common.lang_flag_5))
3387 && !lookup_attribute ("mode", TYPE_ATTRIBUTES (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3387, __FUNCTION__))->type_common.attributes)
))
3388 return TYPE_PRECISION (ENUM_UNDERLYING_TYPE (type))((tree_class_check ((((contains_struct_check (((tree_check ((
type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3388, __FUNCTION__, (ENUMERAL_TYPE)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3388, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3388, __FUNCTION__))->type_common.precision)
;
3389
3390 if (enum_to_min_precision == NULL__null)
3391 enum_to_min_precision = hash_map<tree, int>::create_ggc (37);
3392
3393 bool existed;
3394 int &prec = enum_to_min_precision->get_or_insert (type, &existed);
3395 if (existed)
3396 return prec;
3397
3398 tree minnode, maxnode;
3399 if (TYPE_VALUES (type)((tree_check ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3399, __FUNCTION__, (ENUMERAL_TYPE)))->type_non_common.values
)
)
3400 {
3401 minnode = maxnode = NULL_TREE(tree) __null;
3402 for (tree values = TYPE_VALUES (type)((tree_check ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3402, __FUNCTION__, (ENUMERAL_TYPE)))->type_non_common.values
)
;
3403 values; values = TREE_CHAIN (values)((contains_struct_check ((values), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3403, __FUNCTION__))->common.chain)
)
3404 {
3405 tree decl = TREE_VALUE (values)((tree_check ((values), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3405, __FUNCTION__, (TREE_LIST)))->list.value)
;
3406 tree value = DECL_INITIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3406, __FUNCTION__))->decl_common.initial)
;
3407 if (value == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3408 value = integer_zero_nodeglobal_trees[TI_INTEGER_ZERO];
3409 if (!minnode)
3410 minnode = maxnode = value;
3411 else if (tree_int_cst_lt (maxnode, value))
3412 maxnode = value;
3413 else if (tree_int_cst_lt (value, minnode))
3414 minnode = value;
3415 }
3416 }
3417 else
3418 minnode = maxnode = integer_zero_nodeglobal_trees[TI_INTEGER_ZERO];
3419
3420 signop sgn = tree_int_cst_sgn (minnode) >= 0 ? UNSIGNED : SIGNED;
3421 int lowprec = tree_int_cst_min_precision (minnode, sgn);
3422 int highprec = tree_int_cst_min_precision (maxnode, sgn);
3423 prec = MAX (lowprec, highprec)((lowprec) > (highprec) ? (lowprec) : (highprec));
3424 return prec;
3425}
3426
3427/* FIELD is a bit-field. We are finishing the processing for its
3428 enclosing type. Issue any appropriate messages and set appropriate
3429 flags. Returns false if an error has been diagnosed. */
3430
3431static bool
3432check_bitfield_decl (tree field)
3433{
3434 tree type = TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3434, __FUNCTION__))->typed.type)
;
3435 tree w;
3436
3437 /* Extract the declared width of the bitfield, which has been
3438 temporarily stashed in DECL_BIT_FIELD_REPRESENTATIVE by grokbitfield. */
3439 w = DECL_BIT_FIELD_REPRESENTATIVE (field)((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3439, __FUNCTION__, (FIELD_DECL)))->field_decl.qualifier
)
;
3440 gcc_assert (w != NULL_TREE)((void)(!(w != (tree) __null) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3440, __FUNCTION__), 0 : 0))
;
3441 /* Remove the bit-field width indicator so that the rest of the
3442 compiler does not treat that value as a qualifier. */
3443 DECL_BIT_FIELD_REPRESENTATIVE (field)((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3443, __FUNCTION__, (FIELD_DECL)))->field_decl.qualifier
)
= NULL_TREE(tree) __null;
3444
3445 /* Detect invalid bit-field type. */
3446 if (!INTEGRAL_OR_ENUMERATION_TYPE_P (type)(((enum tree_code) (type)->base.code) == ENUMERAL_TYPE || (
((enum tree_code) (type)->base.code) == BOOLEAN_TYPE || ((
enum tree_code) (type)->base.code) == INTEGER_TYPE))
)
3447 {
3448 error_at (DECL_SOURCE_LOCATION (field)((contains_struct_check ((field), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3448, __FUNCTION__))->decl_minimal.locus)
,
3449 "bit-field %q#D with non-integral type %qT", field, type);
3450 w = error_mark_nodeglobal_trees[TI_ERROR_MARK];
3451 }
3452 else
3453 {
3454 location_t loc = input_location;
3455 /* Avoid the non_lvalue wrapper added by fold for PLUS_EXPRs. */
3456 STRIP_NOPS (w)(w) = tree_strip_nop_conversions ((const_cast<union tree_node
*> (((w)))))
;
3457
3458 /* detect invalid field size. */
3459 input_location = DECL_SOURCE_LOCATION (field)((contains_struct_check ((field), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3459, __FUNCTION__))->decl_minimal.locus)
;
3460 w = cxx_constant_value (w);
3461 input_location = loc;
3462
3463 if (TREE_CODE (w)((enum tree_code) (w)->base.code) != INTEGER_CST)
3464 {
3465 error ("bit-field %q+D width not an integer constant", field);
3466 w = error_mark_nodeglobal_trees[TI_ERROR_MARK];
3467 }
3468 else if (tree_int_cst_sgn (w) < 0)
3469 {
3470 error ("negative width in bit-field %q+D", field);
3471 w = error_mark_nodeglobal_trees[TI_ERROR_MARK];
3472 }
3473 else if (integer_zerop (w) && DECL_NAME (field)((contains_struct_check ((field), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3473, __FUNCTION__))->decl_minimal.name)
!= 0)
3474 {
3475 error ("zero width for bit-field %q+D", field);
3476 w = error_mark_nodeglobal_trees[TI_ERROR_MARK];
3477 }
3478 else if ((TREE_CODE (type)((enum tree_code) (type)->base.code) != ENUMERAL_TYPE
3479 && TREE_CODE (type)((enum tree_code) (type)->base.code) != BOOLEAN_TYPE
3480 && compare_tree_int (w, TYPE_PRECISION (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3480, __FUNCTION__))->type_common.precision)
) > 0)
3481 || ((TREE_CODE (type)((enum tree_code) (type)->base.code) == ENUMERAL_TYPE
3482 || TREE_CODE (type)((enum tree_code) (type)->base.code) == BOOLEAN_TYPE)
3483 && tree_int_cst_lt (TYPE_SIZE (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3483, __FUNCTION__))->type_common.size)
, w)))
3484 warning_at (DECL_SOURCE_LOCATION (field)((contains_struct_check ((field), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3484, __FUNCTION__))->decl_minimal.locus)
, 0,
3485 "width of %qD exceeds its type", field);
3486 else if (TREE_CODE (type)((enum tree_code) (type)->base.code) == ENUMERAL_TYPE)
3487 {
3488 int prec = enum_min_precision (type);
3489 if (compare_tree_int (w, prec) < 0)
3490 warning_at (DECL_SOURCE_LOCATION (field)((contains_struct_check ((field), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3490, __FUNCTION__))->decl_minimal.locus)
, 0,
3491 "%qD is too small to hold all values of %q#T",
3492 field, type);
3493 }
3494 }
3495
3496 if (w != error_mark_nodeglobal_trees[TI_ERROR_MARK])
3497 {
3498 DECL_SIZE (field)((contains_struct_check ((field), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3498, __FUNCTION__))->decl_common.size)
= fold_convert (bitsizetype, w)fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_bitsizetype
], w)
;
3499 DECL_BIT_FIELD (field)((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3499, __FUNCTION__, (FIELD_DECL)))->decl_common.decl_flag_1
)
= 1;
3500 return true;
3501 }
3502 else
3503 {
3504 /* Non-bit-fields are aligned for their type. */
3505 DECL_BIT_FIELD (field)((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3505, __FUNCTION__, (FIELD_DECL)))->decl_common.decl_flag_1
)
= 0;
3506 CLEAR_DECL_C_BIT_FIELD (field)(((contains_struct_check (((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3506, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3506, __FUNCTION__))->decl_common.lang_flag_4) = 0)
;
3507 return false;
3508 }
3509}
3510
3511/* FIELD is a non bit-field. We are finishing the processing for its
3512 enclosing type T. Issue any appropriate messages and set appropriate
3513 flags. */
3514
3515static bool
3516check_field_decl (tree field,
3517 tree t,
3518 int* cant_have_const_ctor,
3519 int* no_const_asn_ref)
3520{
3521 tree type = strip_array_types (TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3521, __FUNCTION__))->typed.type)
);
3522 bool any_default_members = false;
3523
3524 /* In C++98 an anonymous union cannot contain any fields which would change
3525 the settings of CANT_HAVE_CONST_CTOR and friends. */
3526 if (ANON_UNION_TYPE_P (type)(((enum tree_code) (type)->base.code) == UNION_TYPE &&
((((((enum tree_code) (type)->base.code)) == RECORD_TYPE ||
(((enum tree_code) (type)->base.code)) == UNION_TYPE) &&
((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3526, __FUNCTION__))->type_common.lang_flag_5)) &&
(((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3526, __FUNCTION__))->type_with_lang_specific.lang_specific
))->anon_aggr))
&& cxx_dialect < cxx11)
3527 ;
3528 /* And, we don't set TYPE_HAS_CONST_COPY_CTOR, etc., for anonymous
3529 structs. So, we recurse through their fields here. */
3530 else if (ANON_AGGR_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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3530, __FUNCTION__))->type_common.lang_flag_5)) &&
(((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3530, __FUNCTION__))->type_with_lang_specific.lang_specific
))->anon_aggr)
)
3531 {
3532 for (tree fields = TYPE_FIELDS (type)((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3532, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
; fields;
3533 fields = DECL_CHAIN (fields)(((contains_struct_check (((contains_struct_check ((fields), (
TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3533, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3533, __FUNCTION__))->common.chain))
)
3534 if (TREE_CODE (fields)((enum tree_code) (fields)->base.code) == FIELD_DECL)
3535 any_default_members |= check_field_decl (fields, t,
3536 cant_have_const_ctor,
3537 no_const_asn_ref);
3538 }
3539 /* Check members with class type for constructors, destructors,
3540 etc. */
3541 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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3541, __FUNCTION__))->type_common.lang_flag_5))
)
3542 {
3543 /* Never let anything with uninheritable virtuals
3544 make it through without complaint. */
3545 abstract_virtuals_error (field, type);
3546
3547 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == UNION_TYPE && cxx_dialect < cxx11)
3548 {
3549 static bool warned;
3550 int oldcount = errorcount(global_dc)->diagnostic_count[(int) (DK_ERROR)];
3551 if (TYPE_NEEDS_CONSTRUCTING (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3551, __FUNCTION__))->type_common.needs_constructing_flag
)
)
3552 error ("member %q+#D with constructor not allowed in union",
3553 field);
3554 if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)(((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3554, __FUNCTION__))->type_common.lang_flag_4))
)
3555 error ("member %q+#D with destructor not allowed in union", field);
3556 if (TYPE_HAS_COMPLEX_COPY_ASSIGN (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3556, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_assign)
)
3557 error ("member %q+#D with copy assignment operator not allowed in union",
3558 field);
3559 if (!warned && errorcount(global_dc)->diagnostic_count[(int) (DK_ERROR)] > oldcount)
3560 {
3561 inform (DECL_SOURCE_LOCATION (field)((contains_struct_check ((field), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3561, __FUNCTION__))->decl_minimal.locus)
, "unrestricted unions "
3562 "only available with %<-std=c++11%> or %<-std=gnu++11%>");
3563 warned = true;
3564 }
3565 }
3566 else
3567 {
3568 TYPE_NEEDS_CONSTRUCTING (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3568, __FUNCTION__))->type_common.needs_constructing_flag
)
|= TYPE_NEEDS_CONSTRUCTING (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3568, __FUNCTION__))->type_common.needs_constructing_flag
)
;
3569 TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)(((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3569, __FUNCTION__))->type_common.lang_flag_4))
3570 |= TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)(((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3570, __FUNCTION__))->type_common.lang_flag_4))
;
3571 TYPE_HAS_COMPLEX_COPY_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3571, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_assign)
3572 |= (TYPE_HAS_COMPLEX_COPY_ASSIGN (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3572, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_assign)
3573 || !TYPE_HAS_COPY_ASSIGN (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3573, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
);
3574 TYPE_HAS_COMPLEX_COPY_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3574, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_ctor)
|= (TYPE_HAS_COMPLEX_COPY_CTOR (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3574, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_ctor)
3575 || !TYPE_HAS_COPY_CTOR (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3575, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
);
3576 TYPE_HAS_COMPLEX_MOVE_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3576, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_assign)
|= TYPE_HAS_COMPLEX_MOVE_ASSIGN (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3576, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_assign)
;
3577 TYPE_HAS_COMPLEX_MOVE_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3577, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_ctor)
|= TYPE_HAS_COMPLEX_MOVE_CTOR (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3577, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_ctor)
;
3578 TYPE_HAS_COMPLEX_DFLT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3578, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_dflt)
|= (!TYPE_HAS_DEFAULT_CONSTRUCTOR (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3578, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_default_ctor)
3579 || TYPE_HAS_COMPLEX_DFLT (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3579, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_dflt)
);
3580 }
3581
3582 if (TYPE_HAS_COPY_CTOR (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3582, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
3583 && !TYPE_HAS_CONST_COPY_CTOR (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3583, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_const_copy_ctor)
)
3584 *cant_have_const_ctor = 1;
3585
3586 if (TYPE_HAS_COPY_ASSIGN (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3586, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
3587 && !TYPE_HAS_CONST_COPY_ASSIGN (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3587, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_const_copy_assign)
)
3588 *no_const_asn_ref = 1;
3589 }
3590
3591 check_abi_tags (t, field);
3592
3593 if (DECL_INITIAL (field)((contains_struct_check ((field), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3593, __FUNCTION__))->decl_common.initial)
!= NULL_TREE(tree) __null)
3594 /* `build_class_init_list' does not recognize
3595 non-FIELD_DECLs. */
3596 any_default_members = true;
3597
3598 return any_default_members;
3599}
3600
3601/* Check the data members (both static and non-static), class-scoped
3602 typedefs, etc., appearing in the declaration of T. Issue
3603 appropriate diagnostics. Sets ACCESS_DECLS to a list (in
3604 declaration order) of access declarations; each TREE_VALUE in this
3605 list is a USING_DECL.
3606
3607 In addition, set the following flags:
3608
3609 EMPTY_P
3610 The class is empty, i.e., contains no non-static data members.
3611
3612 CANT_HAVE_CONST_CTOR_P
3613 This class cannot have an implicitly generated copy constructor
3614 taking a const reference.
3615
3616 CANT_HAVE_CONST_ASN_REF
3617 This class cannot have an implicitly generated assignment
3618 operator taking a const reference.
3619
3620 All of these flags should be initialized before calling this
3621 function. */
3622
3623static void
3624check_field_decls (tree t, tree *access_decls,
3625 int *cant_have_const_ctor_p,
3626 int *no_const_asn_ref_p)
3627{
3628 int cant_pack = 0;
3629
3630 /* Assume there are no access declarations. */
3631 *access_decls = NULL_TREE(tree) __null;
3632 /* Effective C has things to say about classes with pointer members. */
3633 tree pointer_member = NULL_TREE(tree) __null;
3634 /* Default initialized members affect the whole class. */
3635 tree default_init_member = NULL_TREE(tree) __null;
3636 /* Lack of any non-static data member of non-volatile literal
3637 type affects a union. */
3638 bool found_nv_literal_p = false;
3639 /* Standard layout requires all FIELDS have same access. */
3640 int field_access = -1;
3641
3642 for (tree field = TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3642, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
; field; field = DECL_CHAIN (field)(((contains_struct_check (((contains_struct_check ((field), (
TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3642, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3642, __FUNCTION__))->common.chain))
)
3643 {
3644 tree type = TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3644, __FUNCTION__))->typed.type)
;
3645
3646 switch (TREE_CODE (field)((enum tree_code) (field)->base.code))
3647 {
3648 default:
3649 gcc_unreachable ()(fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3649, __FUNCTION__))
;
3650
3651 case USING_DECL:
3652 /* Save the access declarations for our caller. */
3653 *access_decls = tree_cons (NULL_TREE(tree) __null, field, *access_decls);
3654 break;
3655
3656 case TYPE_DECL:
3657 case TEMPLATE_DECL:
3658 break;
3659
3660 case FUNCTION_DECL:
3661 /* FIXME: We should fold in the checking from check_methods. */
3662 break;
3663
3664 case CONST_DECL:
3665 DECL_NONLOCAL (field)((contains_struct_check ((field), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3665, __FUNCTION__))->decl_common.nonlocal_flag)
= 1;
3666 break;
3667
3668 case VAR_DECL:
3669 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == UNION_TYPE
3670 && cxx_dialect < cxx11)
3671 {
3672 /* [class.union]
3673
3674 (C++98) If a union contains a static data member,
3675 ... the program is ill-formed. */
3676 if (cxx_dialect < cxx11)
3677 error ("in C++98 %q+D may not be static because it is "
3678 "a member of a union", field);
3679 }
3680 goto data_member;
3681
3682 case FIELD_DECL:
3683 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == UNION_TYPE)
3684 {
3685 /* [class.union]
3686
3687 If a union contains ... or a [non-static data] member
3688 of reference type, the program is ill-formed. */
3689 if (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE))
3690 error ("non-static data member %q+D in a union may not "
3691 "have reference type %qT", field, type);
3692 }
3693
3694 data_member:
3695 /* Common VAR_DECL & FIELD_DECL processing. */
3696 DECL_CONTEXT (field)((contains_struct_check ((field), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3696, __FUNCTION__))->decl_minimal.context)
= t;
3697 DECL_NONLOCAL (field)((contains_struct_check ((field), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3697, __FUNCTION__))->decl_common.nonlocal_flag)
= 1;
3698
3699 /* Template instantiation can cause this. Perhaps this
3700 should be a specific instantiation check? */
3701 if (TREE_CODE (type)((enum tree_code) (type)->base.code) == FUNCTION_TYPE)
3702 {
3703 error ("data member %q+D invalidly declared function type", field);
3704 type = build_pointer_type (type);
3705 TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3705, __FUNCTION__))->typed.type)
= type;
3706 }
3707 else if (TREE_CODE (type)((enum tree_code) (type)->base.code) == METHOD_TYPE)
3708 {
3709 error ("data member %q+D invalidly declared method type", field);
3710 type = build_pointer_type (type);
3711 TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3711, __FUNCTION__))->typed.type)
= type;
3712 }
3713
3714 break;
3715 }
3716
3717 if (TREE_CODE (field)((enum tree_code) (field)->base.code) != FIELD_DECL)
3718 continue;
3719
3720 if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3721 continue;
3722
3723 /* If it is not a union and at least one non-static data member is
3724 non-literal, the whole class becomes non-literal. Per Core/1453,
3725 volatile non-static data members and base classes are also not allowed.
3726 If it is a union, we might set CLASSTYPE_LITERAL_P after we've seen all
3727 members.
3728 Note: if the type is incomplete we will complain later on. */
3729 if (COMPLETE_TYPE_P (type)(((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3729, __FUNCTION__))->type_common.size) != (tree) __null
)
)
3730 {
3731 if (!literal_type_p (type) || CP_TYPE_VOLATILE_P (type)((cp_type_quals (type) & TYPE_QUAL_VOLATILE) != 0))
3732 CLASSTYPE_LITERAL_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3732, __FUNCTION__))->type_with_lang_specific.lang_specific
))->is_literal)
= false;
3733 else
3734 found_nv_literal_p = true;
3735 }
3736
3737 int this_field_access = (TREE_PROTECTED (field)((field)->base.protected_flag) ? 1
3738 : TREE_PRIVATE (field)((field)->base.private_flag) ? 2 : 0);
3739 if (field_access != this_field_access)
3740 {
3741 /* A standard-layout class is a class that:
3742
3743 ... has the same access control (Clause 11) for all
3744 non-static data members, */
3745 if (field_access < 0)
3746 field_access = this_field_access;
3747 else
3748 CLASSTYPE_NON_STD_LAYOUT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3748, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
= 1;
3749
3750 /* Aggregates must be public. */
3751 if (this_field_access)
3752 CLASSTYPE_NON_AGGREGATE (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3752, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_aggregate)
= 1;
3753 }
3754
3755 /* If this is of reference type, check if it needs an init. */
3756 if (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE))
3757 {
3758 CLASSTYPE_NON_LAYOUT_POD_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3758, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_pod_class)
= 1;
3759 CLASSTYPE_NON_STD_LAYOUT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3759, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
= 1;
3760 if (DECL_INITIAL (field)((contains_struct_check ((field), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3760, __FUNCTION__))->decl_common.initial)
== NULL_TREE(tree) __null)
3761 SET_CLASSTYPE_REF_FIELDS_NEED_INIT (t, 1)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3761, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init = (1))
;
3762 if (cxx_dialect < cxx11)
3763 {
3764 /* ARM $12.6.2: [A member initializer list] (or, for an
3765 aggregate, initialization by a brace-enclosed list) is the
3766 only way to initialize non-static const and reference
3767 members. */
3768 TYPE_HAS_COMPLEX_COPY_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3768, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_assign)
= 1;
3769 TYPE_HAS_COMPLEX_MOVE_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3769, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_assign)
= 1;
3770 }
3771 }
3772
3773 type = strip_array_types (type);
3774
3775 if (TYPE_PACKED (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3775, __FUNCTION__))->base.u.bits.packed_flag)
)
3776 {
3777 if (!layout_pod_type_p (type) && !TYPE_PACKED (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3777, __FUNCTION__))->base.u.bits.packed_flag)
)
3778 {
3779 warning_at (DECL_SOURCE_LOCATION (field)((contains_struct_check ((field), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3779, __FUNCTION__))->decl_minimal.locus)
, 0,
3780 "ignoring packed attribute because of"
3781 " unpacked non-POD field %q#D", field);
3782 cant_pack = 1;
3783 }
3784 else if (DECL_C_BIT_FIELD (field)(((contains_struct_check (((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3784, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3784, __FUNCTION__))->decl_common.lang_flag_4) == 1)
3785 || TYPE_ALIGN (TREE_TYPE (field))((tree_class_check ((((contains_struct_check ((field), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3785, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3785, __FUNCTION__))->type_common.align ? ((unsigned)1) <<
((((contains_struct_check ((field), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3785, __FUNCTION__))->typed.type))->type_common.align
- 1) : 0)
> BITS_PER_UNIT(8))
3786 DECL_PACKED (field)((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3786, __FUNCTION__, (FIELD_DECL)))->base.u.bits.packed_flag
)
= 1;
3787 }
3788
3789 if (DECL_C_BIT_FIELD (field)(((contains_struct_check (((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3789, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3789, __FUNCTION__))->decl_common.lang_flag_4) == 1)
3790 && integer_zerop (DECL_BIT_FIELD_REPRESENTATIVE (field)((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3790, __FUNCTION__, (FIELD_DECL)))->field_decl.qualifier
)
))
3791 /* We don't treat zero-width bitfields as making a class
3792 non-empty. */
3793 ;
3794 else if (field_poverlapping_p (field)
3795 && is_empty_class (TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3795, __FUNCTION__))->typed.type)
))
3796 /* Empty data members also don't make a class non-empty. */
3797 CLASSTYPE_CONTAINS_EMPTY_CLASS_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3797, __FUNCTION__))->type_with_lang_specific.lang_specific
))->contains_empty_class_p)
= 1;
3798 else
3799 {
3800 /* The class is non-empty. */
3801 CLASSTYPE_EMPTY_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3801, __FUNCTION__))->type_with_lang_specific.lang_specific
))->empty_p)
= 0;
3802 /* The class is not even nearly empty. */
3803 CLASSTYPE_NEARLY_EMPTY_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3803, __FUNCTION__))->type_with_lang_specific.lang_specific
))->nearly_empty_p)
= 0;
3804 /* If one of the data members contains an empty class, so
3805 does T. */
3806 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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3806, __FUNCTION__))->type_common.lang_flag_5))
3807 && CLASSTYPE_CONTAINS_EMPTY_CLASS_P (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3807, __FUNCTION__))->type_with_lang_specific.lang_specific
))->contains_empty_class_p)
)
3808 CLASSTYPE_CONTAINS_EMPTY_CLASS_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3808, __FUNCTION__))->type_with_lang_specific.lang_specific
))->contains_empty_class_p)
= 1;
3809 }
3810
3811 /* This is used by -Weffc++ (see below). Warn only for pointers
3812 to members which might hold dynamic memory. So do not warn
3813 for pointers to functions or pointers to members. */
3814 if (TYPE_PTR_P (type)(((enum tree_code) (type)->base.code) == POINTER_TYPE)
3815 && !TYPE_PTRFN_P (type)((((enum tree_code) (type)->base.code) == POINTER_TYPE) &&
((enum tree_code) (((contains_struct_check ((type), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3815, __FUNCTION__))->typed.type))->base.code) == FUNCTION_TYPE
)
)
3816 pointer_member = field;
3817
3818 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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3818, __FUNCTION__))->type_common.lang_flag_5))
)
3819 {
3820 if (CLASSTYPE_REF_FIELDS_NEED_INIT (type)(((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3820, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3820, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init : 0)
)
3821 SET_CLASSTYPE_REF_FIELDS_NEED_INIT (t, 1)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3821, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init = (1))
;
3822 if (CLASSTYPE_READONLY_FIELDS_NEED_INIT (type)(((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3822, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3822, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0)
)
3823 SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT (t, 1)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3823, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init = (1))
;
3824 }
3825
3826 if (DECL_MUTABLE_P (field)(((contains_struct_check (((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3826, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3826, __FUNCTION__))->decl_common.lang_flag_0))
|| TYPE_HAS_MUTABLE_P (type)(cp_has_mutable_p (type)))
3827 CLASSTYPE_HAS_MUTABLE (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3827, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_mutable)
= 1;
3828
3829 if (DECL_MUTABLE_P (field)(((contains_struct_check (((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3829, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3829, __FUNCTION__))->decl_common.lang_flag_0))
)
3830 {
3831 if (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE))
3832 error ("member %q+D cannot be declared as a %<mutable%> "
3833 "reference", field);
3834 else if (CP_TYPE_CONST_P (type)((cp_type_quals (type) & TYPE_QUAL_CONST) != 0))
3835 error ("member %q+D cannot be declared both %<const%> "
3836 "and %<mutable%>", field);
3837 }
3838
3839 if (! layout_pod_type_p (type))
3840 /* DR 148 now allows pointers to members (which are POD themselves),
3841 to be allowed in POD structs. */
3842 CLASSTYPE_NON_LAYOUT_POD_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3842, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_pod_class)
= 1;
3843
3844 if (field_poverlapping_p (field))
3845 /* A potentially-overlapping non-static data member makes the class
3846 non-layout-POD. */
3847 CLASSTYPE_NON_LAYOUT_POD_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3847, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_pod_class)
= 1;
3848
3849 if (!std_layout_type_p (type))
3850 CLASSTYPE_NON_STD_LAYOUT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3850, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
= 1;
3851
3852 if (! zero_init_p (type))
3853 CLASSTYPE_NON_ZERO_INIT_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3853, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_zero_init)
= 1;
3854
3855 /* We set DECL_C_BIT_FIELD in grokbitfield.
3856 If the type and width are valid, we'll also set DECL_BIT_FIELD. */
3857 if (DECL_C_BIT_FIELD (field)(((contains_struct_check (((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3857, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3857, __FUNCTION__))->decl_common.lang_flag_4) == 1)
)
3858 check_bitfield_decl (field);
3859
3860 if (check_field_decl (field, t,
3861 cant_have_const_ctor_p, no_const_asn_ref_p))
3862 {
3863 if (default_init_member
3864 && TREE_CODE (t)((enum tree_code) (t)->base.code) == UNION_TYPE)
3865 {
3866 error ("multiple fields in union %qT initialized", t);
3867 inform (DECL_SOURCE_LOCATION (default_init_member)((contains_struct_check ((default_init_member), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3867, __FUNCTION__))->decl_minimal.locus)
,
3868 "initialized member %q+D declared here",
3869 default_init_member);
3870 }
3871 default_init_member = field;
3872 }
3873
3874 /* Now that we've removed bit-field widths from DECL_INITIAL,
3875 anything left in DECL_INITIAL is an NSDMI that makes the class
3876 non-aggregate in C++11. */
3877 if (DECL_INITIAL (field)((contains_struct_check ((field), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3877, __FUNCTION__))->decl_common.initial)
&& cxx_dialect < cxx14)
3878 CLASSTYPE_NON_AGGREGATE (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3878, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_aggregate)
= true;
3879
3880 if (CP_TYPE_CONST_P (type)((cp_type_quals (type) & TYPE_QUAL_CONST) != 0))
3881 {
3882 /* If any field is const, the structure type is pseudo-const. */
3883 C_TYPE_FIELDS_READONLY (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3883, __FUNCTION__))->type_with_lang_specific.lang_specific
))->fields_readonly)
= 1;
3884 if (DECL_INITIAL (field)((contains_struct_check ((field), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3884, __FUNCTION__))->decl_common.initial)
== NULL_TREE(tree) __null)
3885 SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT (t, 1)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3885, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init = (1))
;
3886 if (cxx_dialect < cxx11)
3887 {
3888 /* ARM $12.6.2: [A member initializer list] (or, for an
3889 aggregate, initialization by a brace-enclosed list) is the
3890 only way to initialize non-static const and reference
3891 members. */
3892 TYPE_HAS_COMPLEX_COPY_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3892, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_assign)
= 1;
3893 TYPE_HAS_COMPLEX_MOVE_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3893, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_assign)
= 1;
3894 }
3895 }
3896 /* A field that is pseudo-const makes the structure likewise. */
3897 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), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3897, __FUNCTION__))->type_common.lang_flag_5))
)
3898 {
3899 C_TYPE_FIELDS_READONLY (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3899, __FUNCTION__))->type_with_lang_specific.lang_specific
))->fields_readonly)
|= C_TYPE_FIELDS_READONLY (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3899, __FUNCTION__))->type_with_lang_specific.lang_specific
))->fields_readonly)
;
3900 SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT (t,((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3902, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init = ((((tree_class_check ((t), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3901, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3901, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0) | (((tree_class_check ((type), (
tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3902, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3902, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0)))
3901 CLASSTYPE_READONLY_FIELDS_NEED_INIT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3902, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init = ((((tree_class_check ((t), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3901, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3901, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0) | (((tree_class_check ((type), (
tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3902, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3902, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0)))
3902 | CLASSTYPE_READONLY_FIELDS_NEED_INIT (type))((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3902, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init = ((((tree_class_check ((t), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3901, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3901, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0) | (((tree_class_check ((type), (
tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3902, __FUNCTION__))->type_with_lang_specific.lang_specific
) ? (((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3902, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0)))
;
3903 }
3904
3905 /* Core issue 80: A non-static data member is required to have a
3906 different name from the class iff the class has a
3907 user-declared constructor. */
3908 if (constructor_name_p (DECL_NAME (field)((contains_struct_check ((field), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3908, __FUNCTION__))->decl_minimal.name)
, t)
3909 && TYPE_HAS_USER_CONSTRUCTOR (t)(((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3909, __FUNCTION__))->type_common.lang_flag_1))
)
3910 permerror (DECL_SOURCE_LOCATION (field)((contains_struct_check ((field), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3910, __FUNCTION__))->decl_minimal.locus)
,
3911 "field %q#D with same name as class", field);
3912 }
3913
3914 /* Per CWG 2096, a type is a literal type if it is a union, and at least
3915 one of its non-static data members is of non-volatile literal type. */
3916 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == UNION_TYPE && found_nv_literal_p)
3917 CLASSTYPE_LITERAL_P (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3917, __FUNCTION__))->type_with_lang_specific.lang_specific
))->is_literal)
= true;
3918
3919 /* Effective C++ rule 11: if a class has dynamic memory held by pointers,
3920 it should also define a copy constructor and an assignment operator to
3921 implement the correct copy semantic (deep vs shallow, etc.). As it is
3922 not feasible to check whether the constructors do allocate dynamic memory
3923 and store it within members, we approximate the warning like this:
3924
3925 -- Warn only if there are members which are pointers
3926 -- Warn only if there is a non-trivial constructor (otherwise,
3927 there cannot be memory allocated).
3928 -- Warn only if there is a non-trivial destructor. We assume that the
3929 user at least implemented the cleanup correctly, and a destructor
3930 is needed to free dynamic memory.
3931
3932 This seems enough for practical purposes. */
3933 if (warn_ecppglobal_options.x_warn_ecpp
3934 && pointer_member
3935 && TYPE_HAS_USER_CONSTRUCTOR (t)(((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3935, __FUNCTION__))->type_common.lang_flag_1))
3936 && TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t)(((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3936, __FUNCTION__))->type_common.lang_flag_4))
3937 && !(TYPE_HAS_COPY_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3937, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
&& TYPE_HAS_COPY_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3937, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
))
3938 {
3939 if (warning (OPT_Weffc__, "%q#T has pointer data members", t))
3940 {
3941 if (! TYPE_HAS_COPY_CTOR (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3941, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
)
3942 {
3943 warning (OPT_Weffc__,
3944 " but does not declare %<%T(const %T&)%>", t, t);
3945 if (!TYPE_HAS_COPY_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3945, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
)
3946 warning (OPT_Weffc__, " or %<operator=(const %T&)%>", t);
3947 }
3948 else if (! TYPE_HAS_COPY_ASSIGN (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3948, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
)
3949 warning (OPT_Weffc__,
3950 " but does not declare %<operator=(const %T&)%>", t);
3951 inform (DECL_SOURCE_LOCATION (pointer_member)((contains_struct_check ((pointer_member), (TS_DECL_MINIMAL),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3951, __FUNCTION__))->decl_minimal.locus)
,
3952 "pointer member %q+D declared here", pointer_member);
3953 }
3954 }
3955
3956 /* Non-static data member initializers make the default constructor
3957 non-trivial. */
3958 if (default_init_member)
3959 {
3960 TYPE_NEEDS_CONSTRUCTING (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3960, __FUNCTION__))->type_common.needs_constructing_flag
)
= true;
3961 TYPE_HAS_COMPLEX_DFLT (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3961, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_dflt)
= true;
3962 }
3963
3964 /* If any of the fields couldn't be packed, unset TYPE_PACKED. */
3965 if (cant_pack)
3966 TYPE_PACKED (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3966, __FUNCTION__))->base.u.bits.packed_flag)
= 0;
3967
3968 /* Check anonymous struct/anonymous union fields. */
3969 finish_struct_anon (t);
3970
3971 /* We've built up the list of access declarations in reverse order.
3972 Fix that now. */
3973 *access_decls = nreverse (*access_decls);
3974}
3975
3976/* If TYPE is an empty class type, records its OFFSET in the table of
3977 OFFSETS. */
3978
3979static int
3980record_subobject_offset (tree type, tree offset, splay_tree offsets)
3981{
3982 splay_tree_node n;
3983
3984 if (!is_empty_class (type))
3985 return 0;
3986
3987 /* Record the location of this empty object in OFFSETS. */
3988 n = splay_tree_lookup (offsets, (splay_tree_key) offset);
3989 if (!n)
3990 n = splay_tree_insert (offsets,
3991 (splay_tree_key) offset,
3992 (splay_tree_value) NULL_TREE(tree) __null);
3993 n->value = ((splay_tree_value)
3994 tree_cons (NULL_TREE(tree) __null,
3995 type,
3996 (tree) n->value));
3997
3998 return 0;
3999}
4000
4001/* Returns nonzero if TYPE is an empty class type and there is
4002 already an entry in OFFSETS for the same TYPE as the same OFFSET. */
4003
4004static int
4005check_subobject_offset (tree type, tree offset, splay_tree offsets)
4006{
4007 splay_tree_node n;
4008 tree t;
4009
4010 if (!is_empty_class (type))
4011 return 0;
4012
4013 /* Record the location of this empty object in OFFSETS. */
4014 n = splay_tree_lookup (offsets, (splay_tree_key) offset);
4015 if (!n)
4016 return 0;
4017
4018 for (t = (tree) n->value; t; t = TREE_CHAIN (t)((contains_struct_check ((t), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 4018, __FUNCTION__))->common.chain)
)
4019 if (same_type_p (TREE_VALUE (t), type)comptypes ((((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 4019, __FUNCTION__, (TREE_LIST)))->list.value)), (type),
0)
)
4020 return 1;
4021
4022 return 0;
4023}
4024
4025/* Walk through all the subobjects of TYPE (located at OFFSET). Call
4026 F for every subobject, passing it the type, offset, and table of
4027 OFFSETS. If VBASES_P is one, then virtual non-primary bases should
4028 be traversed.
4029
4030 If MAX_OFFSET is non-NULL, then subobjects with an offset greater