Bug Summary

File:build/gcc/cp/class.c
Warning:line 507, column 5
Value stored to 'target_type' is never read

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 -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/gcc -resource-dir /usr/lib64/clang/13.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/11/../../../../include/c++/11 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/11/../../../../include/c++/11/x86_64-suse-linux -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/11/../../../../include/c++/11/backward -internal-isystem /usr/lib64/clang/13.0.0/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/11/../../../../x86_64-suse-linux/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 -D__GCC_HAVE_DWARF2_CFI_ASM=1 -o /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/clang-static-analyzer/2021-11-20-133755-20252-1/report-ClnaLg.plist -x 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 bool accessible_nvdtor_p (tree);
140
141/* Used by find_flexarrays and related functions. */
142struct flexmems_t;
143static void diagnose_flexarrays (tree, const flexmems_t *);
144static void find_flexarrays (tree, flexmems_t *, bool = false,
145 tree = NULL_TREE(tree) __null, tree = NULL_TREE(tree) __null);
146static void check_flexarrays (tree, flexmems_t * = NULL__null, bool = false);
147static void check_bases (tree, int *, int *);
148static void check_bases_and_members (tree);
149static tree create_vtable_ptr (tree, tree *);
150static void include_empty_classes (record_layout_info);
151static void layout_class_type (tree, tree *);
152static void propagate_binfo_offsets (tree, tree);
153static void layout_virtual_bases (record_layout_info, splay_tree);
154static void build_vbase_offset_vtbl_entries (tree, vtbl_init_data *);
155static void add_vcall_offset_vtbl_entries_r (tree, vtbl_init_data *);
156static void add_vcall_offset_vtbl_entries_1 (tree, vtbl_init_data *);
157static void build_vcall_offset_vtbl_entries (tree, vtbl_init_data *);
158static void add_vcall_offset (tree, tree, vtbl_init_data *);
159static void layout_vtable_decl (tree, int);
160static tree dfs_find_final_overrider_pre (tree, void *);
161static tree dfs_find_final_overrider_post (tree, void *);
162static tree find_final_overrider (tree, tree, tree);
163static int make_new_vtable (tree, tree);
164static tree get_primary_binfo (tree);
165static int maybe_indent_hierarchy (FILE *, int, int);
166static tree dump_class_hierarchy_r (FILE *, dump_flags_t, tree, tree, int);
167static void dump_class_hierarchy (tree);
168static void dump_class_hierarchy_1 (FILE *, dump_flags_t, tree);
169static void dump_array (FILE *, tree);
170static void dump_vtable (tree, tree, tree);
171static void dump_vtt (tree, tree);
172static void dump_thunk (FILE *, int, tree);
173static tree build_vtable (tree, tree, tree);
174static void initialize_vtable (tree, vec<constructor_elt, va_gc> *);
175static void layout_nonempty_base_or_field (record_layout_info,
176 tree, tree, splay_tree);
177static void accumulate_vtbl_inits (tree, tree, tree, tree, tree,
178 vec<constructor_elt, va_gc> **);
179static void dfs_accumulate_vtbl_inits (tree, tree, tree, tree, tree,
180 vec<constructor_elt, va_gc> **);
181static void build_rtti_vtbl_entries (tree, vtbl_init_data *);
182static void build_vcall_and_vbase_vtbl_entries (tree, vtbl_init_data *);
183static void clone_constructors_and_destructors (tree);
184static void update_vtable_entry_for_fn (tree, tree, tree, tree *, unsigned);
185static void build_ctor_vtbl_group (tree, tree);
186static void build_vtt (tree);
187static tree binfo_ctor_vtable (tree);
188static void build_vtt_inits (tree, tree, vec<constructor_elt, va_gc> **,
189 tree *);
190static tree dfs_build_secondary_vptr_vtt_inits (tree, void *);
191static tree dfs_fixup_binfo_vtbls (tree, void *);
192static int record_subobject_offset (tree, tree, splay_tree);
193static int check_subobject_offset (tree, tree, splay_tree);
194static int walk_subobject_offsets (tree, subobject_offset_fn,
195 tree, splay_tree, tree, int);
196static int layout_conflict_p (tree, tree, splay_tree, int);
197static int splay_tree_compare_integer_csts (splay_tree_key k1,
198 splay_tree_key k2);
199static void maybe_warn_about_inaccessible_bases (tree);
200static bool type_requires_array_cookie (tree);
201static bool base_derived_from (tree, tree);
202static int empty_base_at_nonzero_offset_p (tree, tree, splay_tree);
203static tree end_of_base (tree);
204static tree get_vcall_index (tree, tree);
205static bool type_maybe_constexpr_default_constructor (tree);
206static bool type_maybe_constexpr_destructor (tree);
207static bool field_poverlapping_p (tree);
208
209/* Set CURRENT_ACCESS_SPECIFIER based on the protection of DECL. */
210
211void
212set_current_access_from_decl (tree decl)
213{
214 if (TREE_PRIVATE (decl)((decl)->base.private_flag))
215 current_access_specifierscope_chain->access_specifier = access_private_nodeglobal_trees[TI_PRIVATE];
216 else if (TREE_PROTECTED (decl)((decl)->base.protected_flag))
217 current_access_specifierscope_chain->access_specifier = access_protected_nodeglobal_trees[TI_PROTECTED];
218 else
219 current_access_specifierscope_chain->access_specifier = access_public_nodeglobal_trees[TI_PUBLIC];
220}
221
222/* Return a COND_EXPR that executes TRUE_STMT if this execution of the
223 'structor is in charge of 'structing virtual bases, or FALSE_STMT
224 otherwise. */
225
226tree
227build_if_in_charge (tree true_stmt, tree false_stmt)
228{
229 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"
, 229, __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"
, 229, __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"
, 229, __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"
, 229, __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"
, 229, __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"
, 229, __FUNCTION__), 0 : 0))
;
230 tree cmp = build2 (NE_EXPR, boolean_type_nodeglobal_trees[TI_BOOLEAN_TYPE],
231 current_in_charge_parm((cfun + 0)->language)->x_in_charge_parm, integer_zero_nodeglobal_trees[TI_INTEGER_ZERO]);
232 tree type = unlowered_expr_type (true_stmt);
233 if (VOID_TYPE_P (type)(((enum tree_code) (type)->base.code) == VOID_TYPE))
234 type = unlowered_expr_type (false_stmt);
235 tree cond = build3 (COND_EXPR, type,
236 cmp, true_stmt, false_stmt);
237 return cond;
238}
239
240/* Convert to or from a base subobject. EXPR is an expression of type
241 `A' or `A*', an expression of type `B' or `B*' is returned. To
242 convert A to a base B, CODE is PLUS_EXPR and BINFO is the binfo for
243 the B base instance within A. To convert base A to derived B, CODE
244 is MINUS_EXPR and BINFO is the binfo for the A instance within B.
245 In this latter case, A must not be a morally virtual base of B.
246 NONNULL is true if EXPR is known to be non-NULL (this is only
247 needed when EXPR is of pointer type). CV qualifiers are preserved
248 from EXPR. */
249
250tree
251build_base_path (enum tree_code code,
252 tree expr,
253 tree binfo,
254 int nonnull,
255 tsubst_flags_t complain)
256{
257 tree v_binfo = NULL_TREE(tree) __null;
258 tree d_binfo = NULL_TREE(tree) __null;
259 tree probe;
260 tree offset;
261 tree target_type;
262 tree null_test = NULL__null;
263 tree ptr_target_type;
264 int fixed_type_p;
265 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"
, 265, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE
)
;
266 bool has_empty = false;
267 bool virtual_access;
268 bool rvalue = false;
269
270 if (expr == error_mark_nodeglobal_trees[TI_ERROR_MARK] || binfo == error_mark_nodeglobal_trees[TI_ERROR_MARK] || !binfo)
271 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
272
273 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"
, 273, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
)
274 {
275 d_binfo = probe;
276 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"
, 276, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 276, __FUNCTION__))->typed.type)
))
277 has_empty = true;
278 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"
, 278, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
279 v_binfo = probe;
280 }
281
282 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"
, 282, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 282, __FUNCTION__))->type_common.main_variant)
;
283 if (want_pointer)
284 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"
, 284, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 284, __FUNCTION__))->type_common.main_variant)
;
285 if (dependent_type_p (probe))
286 if (tree open = currently_open_class (probe))
287 probe = open;
288
289 if (code == PLUS_EXPR
290 && !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"
, 290, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 290, __FUNCTION__))->typed.type)) == (probe))
)
291 {
292 /* This can happen when adjust_result_of_qualified_name_lookup can't
293 find a unique base binfo in a call to a member function. We
294 couldn't give the diagnostic then since we might have been calling
295 a static member function, so we do it now. In other cases, eg.
296 during error recovery (c++/71979), we may not have a base at all. */
297 if (complain & tf_error)
298 {
299 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"
, 299, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 299, __FUNCTION__))->typed.type)
,
300 ba_unique, NULL__null, complain);
301 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"
, 301, __FUNCTION__), 0 : 0))
;
302 }
303 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
304 }
305
306 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"
, 307, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 307, __FUNCTION__))->typed.type)) == (probe))) || code ==
PLUS_EXPR) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 308, __FUNCTION__), 0 : 0))
307 && 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"
, 307, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 307, __FUNCTION__))->typed.type)) == (probe))) || code ==
PLUS_EXPR) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 308, __FUNCTION__), 0 : 0))
308 || 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"
, 307, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 307, __FUNCTION__))->typed.type)) == (probe))) || code ==
PLUS_EXPR) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 308, __FUNCTION__), 0 : 0))
;
309
310 if (binfo == d_binfo)
311 /* Nothing to do. */
312 return expr;
313
314 if (code == MINUS_EXPR && v_binfo)
315 {
316 if (complain & tf_error)
317 {
318 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"
, 318, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 318, __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"
, 318, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 318, __FUNCTION__))->typed.type)))
)
319 {
320 if (want_pointer)
321 error ("cannot convert from pointer to base class %qT to "
322 "pointer to derived class %qT because the base is "
323 "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"
, 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)
, 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"
, 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 because the base is virtual",
327 BINFO_TYPE (binfo)((contains_struct_check (((tree_check ((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 (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)
);
328 }
329 else
330 {
331 if (want_pointer)
332 error ("cannot convert from pointer to base class %qT to "
333 "pointer to derived class %qT via virtual base %qT",
334 BINFO_TYPE (binfo)((contains_struct_check (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 334, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 334, __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"
, 334, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 334, __FUNCTION__))->typed.type)
,
335 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"
, 335, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 335, __FUNCTION__))->typed.type)
);
336 else
337 error ("cannot convert from base class %qT to derived "
338 "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"
, 338, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 338, __FUNCTION__))->typed.type)
,
339 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"
, 339, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 339, __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"
, 339, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 339, __FUNCTION__))->typed.type)
);
340 }
341 }
342 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
343 }
344
345 bool uneval = (cp_unevaluated_operand != 0
346 || processing_template_declscope_chain->x_processing_template_decl
347 || in_template_function ());
348
349 /* For a non-pointer simple base reference, express it as a COMPONENT_REF
350 without taking its address (and so causing lambda capture, 91933). */
351 if (code == PLUS_EXPR && !v_binfo && !want_pointer && !has_empty && !uneval)
352 return build_simple_base_path (expr, binfo);
353
354 if (!want_pointer)
355 {
356 rvalue = !lvalue_p (expr);
357 /* This must happen before the call to save_expr. */
358 expr = cp_build_addr_expr (expr, complain);
359 }
360 else
361 expr = mark_rvalue_use (expr);
362
363 offset = BINFO_OFFSET (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 363, __FUNCTION__, (TREE_BINFO)))->binfo.offset)
;
364 fixed_type_p = resolves_to_fixed_type_p (expr, &nonnull);
365 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"
, 365, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 365, __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"
, 365, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 365, __FUNCTION__))->typed.type)
;
366 /* TARGET_TYPE has been extracted from BINFO, and, is therefore always
367 cv-unqualified. Extract the cv-qualifiers from EXPR so that the
368 expression returned matches the input. */
369 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"
, 370, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 370, __FUNCTION__))->typed.type))), tf_warning_or_error)
370 (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"
, 370, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 370, __FUNCTION__))->typed.type))), tf_warning_or_error)
;
371 ptr_target_type = build_pointer_type (target_type);
372
373 /* Do we need to look in the vtable for the real offset? */
374 virtual_access = (v_binfo && fixed_type_p <= 0);
375
376 /* Don't bother with the calculations inside sizeof; they'll ICE if the
377 source type is incomplete and the pointer value doesn't matter. In a
378 template (even in instantiate_non_dependent_expr), we don't have vtables
379 set up properly yet, and the value doesn't matter there either; we're
380 just interested in the result of overload resolution. */
381 if (uneval)
382 {
383 expr = build_nop (ptr_target_type, expr);
384 goto indout;
385 }
386
387 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"
, 387, __FUNCTION__))->type_common.size) != (tree) __null)
)
388 {
389 if (complain & tf_error)
390 error ("cannot convert from %qT to base class %qT because %qT is "
391 "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"
, 391, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 391, __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"
, 391, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 391, __FUNCTION__))->typed.type)
,
392 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"
, 392, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 392, __FUNCTION__))->typed.type)
);
393 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
394 }
395
396 /* If we're in an NSDMI, we don't have the full constructor context yet
397 that we need for converting to a virtual base, so just build a stub
398 CONVERT_EXPR and expand it later in bot_replace. */
399 if (virtual_access && fixed_type_p < 0
400 && current_scope () != current_function_decl)
401 {
402 expr = build1 (CONVERT_EXPR, ptr_target_type, expr);
403 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"
, 403, __FUNCTION__, (CONVERT_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 403, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= true;
404 goto indout;
405 }
406
407 /* Do we need to check for a null pointer? */
408 if (want_pointer && !nonnull)
409 {
410 /* If we know the conversion will not actually change the value
411 of EXPR, then we can avoid testing the expression for NULL.
412 We have to avoid generating a COMPONENT_REF for a base class
413 field, because other parts of the compiler know that such
414 expressions are always non-NULL. */
415 if (!virtual_access && integer_zerop (offset))
416 return build_nop (ptr_target_type, expr);
417 null_test = error_mark_nodeglobal_trees[TI_ERROR_MARK];
418 }
419
420 /* Protect against multiple evaluation if necessary. */
421 if (TREE_SIDE_EFFECTS (expr)((non_type_check ((expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 421, __FUNCTION__))->base.side_effects_flag)
&& (null_test || virtual_access))
422 expr = save_expr (expr);
423
424 /* Store EXPR and build the real null test just before returning. */
425 if (null_test)
426 null_test = expr;
427
428 /* If this is a simple base reference, express it as a COMPONENT_REF. */
429 if (code == PLUS_EXPR && !virtual_access
430 /* We don't build base fields for empty bases, and they aren't very
431 interesting to the optimizers anyway. */
432 && !has_empty)
433 {
434 expr = cp_build_fold_indirect_ref (expr);
435 expr = build_simple_base_path (expr, binfo);
436 if (rvalue && lvalue_p (expr))
437 expr = move (expr);
438 if (want_pointer)
439 expr = build_address (expr);
440 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"
, 440, __FUNCTION__))->typed.type)
;
441 goto out;
442 }
443
444 if (virtual_access)
445 {
446 /* Going via virtual base V_BINFO. We need the static offset
447 from V_BINFO to BINFO, and the dynamic offset from D_BINFO to
448 V_BINFO. That offset is an entry in D_BINFO's vtable. */
449 tree v_offset;
450
451 if (fixed_type_p < 0 && in_base_initializer((cfun + 0)->language)->x_in_base_initializer)
452 {
453 /* In a base member initializer, we cannot rely on the
454 vtable being set up. We have to indirect via the
455 vtt_parm. */
456 tree t;
457
458 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"
, 458, __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"
, 458, __FUNCTION__))->typed.type)
;
459 t = build_pointer_type (t);
460 v_offset = fold_convert (t, current_vtt_parm)fold_convert_loc (((location_t) 0), t, ((cfun + 0)->language
)->x_vtt_parm)
;
461 v_offset = cp_build_fold_indirect_ref (v_offset);
462 }
463 else
464 {
465 tree t = expr;
466 if (sanitize_flags_p (SANITIZE_VPTR)
467 && fixed_type_p == 0)
468 {
469 t = cp_ubsan_maybe_instrument_cast_to_vbase (input_location,
470 probe, expr);
471 if (t == NULL_TREE(tree) __null)
472 t = expr;
473 }
474 v_offset = build_vfield_ref (cp_build_fold_indirect_ref (t),
475 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"
, 475, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 475, __FUNCTION__))->typed.type)
);
476 }
477
478 if (v_offset == error_mark_nodeglobal_trees[TI_ERROR_MARK])
479 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
480
481 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"
, 481, __FUNCTION__, (TREE_BINFO)))->binfo.vptr_field))
;
482 v_offset = build1 (NOP_EXPR,
483 build_pointer_type (ptrdiff_type_nodeglobal_trees[TI_PTRDIFF_TYPE]),
484 v_offset);
485 v_offset = cp_build_fold_indirect_ref (v_offset);
486 TREE_CONSTANT (v_offset)((non_type_check ((v_offset), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 486, __FUNCTION__))->base.constant_flag)
= 1;
487
488 offset = convert_to_integer (ptrdiff_type_nodeglobal_trees[TI_PTRDIFF_TYPE],
489 size_diffop_loc (input_location, offset,
490 BINFO_OFFSET (v_binfo)((tree_check ((v_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 490, __FUNCTION__, (TREE_BINFO)))->binfo.offset)
));
491
492 if (!integer_zerop (offset))
493 v_offset = build2 (code, ptrdiff_type_nodeglobal_trees[TI_PTRDIFF_TYPE], v_offset, offset);
494
495 if (fixed_type_p < 0)
496 /* Negative fixed_type_p means this is a constructor or destructor;
497 virtual base layout is fixed in in-charge [cd]tors, but not in
498 base [cd]tors. */
499 offset = build_if_in_charge
500 (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"
, 500, __FUNCTION__, (TREE_BINFO)))->binfo.offset)
),
501 v_offset);
502 else
503 offset = v_offset;
504 }
505
506 if (want_pointer)
507 target_type = ptr_target_type;
Value stored to 'target_type' is never read
508
509 if (!integer_zerop (offset))
510 {
511 offset = fold_convert (sizetype, offset)fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_sizetype
], offset)
;
512 if (code == MINUS_EXPR)
513 offset = fold_build1_loc (input_location, NEGATE_EXPR, sizetypesizetype_tab[(int) stk_sizetype], offset);
514 expr = fold_build_pointer_plus (expr, offset)fold_build_pointer_plus_loc (((location_t) 0), expr, offset);
515 }
516 else
517 null_test = NULL__null;
518
519 expr = build1 (NOP_EXPR, ptr_target_type, expr);
520
521 indout:
522 if (!want_pointer)
523 {
524 expr = cp_build_fold_indirect_ref (expr);
525 if (rvalue)
526 expr = move (expr);
527 }
528
529 out:
530 if (null_test)
531 /* Wrap EXPR in a null test. */
532 expr = build_if_nonnull (null_test, expr, complain);
533
534 return expr;
535}
536
537/* Subroutine of build_base_path; EXPR and BINFO are as in that function.
538 Perform a derived-to-base conversion by recursively building up a
539 sequence of COMPONENT_REFs to the appropriate base fields. */
540
541static tree
542build_simple_base_path (tree expr, tree binfo)
543{
544 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"
, 544, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 544, __FUNCTION__))->typed.type)
;
545 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"
, 545, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
;
546 tree field;
547
548 if (d_binfo == NULL_TREE(tree) __null)
549 {
550 tree temp;
551
552 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"
, 552, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 552, __FUNCTION__))->type_common.main_variant) == type) ?
fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 552, __FUNCTION__), 0 : 0))
;
553
554 /* Transform `(a, b).x' into `(*(a, &b)).x', `(a ? b : c).x'
555 into `(*(a ? &b : &c)).x', and so on. A COND_EXPR is only
556 an lvalue in the front end; only _DECLs and _REFs are lvalues
557 in the back end. */
558 temp = unary_complex_lvalue (ADDR_EXPR, expr);
559 if (temp)
560 expr = cp_build_fold_indirect_ref (temp);
561
562 return expr;
563 }
564
565 /* Recurse. */
566 expr = build_simple_base_path (expr, d_binfo);
567
568 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"
, 568, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 568, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 568, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
;
569 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"
, 569, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 569, __FUNCTION__))->common.chain))
)
570 /* Is this the base field created by build_base_field? */
571 if (TREE_CODE (field)((enum tree_code) (field)->base.code) == FIELD_DECL
572 && 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"
, 572, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 572, __FUNCTION__))->decl_common.lang_flag_6)
573 && TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 573, __FUNCTION__))->typed.type)
== type
574 /* If we're looking for a field in the most-derived class,
575 also check the field offset; we can have two base fields
576 of the same type if one is an indirect virtual base and one
577 is a direct non-virtual base. */
578 && (BINFO_INHERITANCE_CHAIN (d_binfo)((tree_check ((d_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 578, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
579 || tree_int_cst_equal (byte_position (field),
580 BINFO_OFFSET (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 580, __FUNCTION__, (TREE_BINFO)))->binfo.offset)
)))
581 {
582 /* We don't use build_class_member_access_expr here, as that
583 has unnecessary checks, and more importantly results in
584 recursive calls to dfs_walk_once. */
585 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"
, 585, __FUNCTION__))->typed.type)
);
586
587 expr = build3 (COMPONENT_REF,
588 cp_build_qualified_type (type, type_quals)cp_build_qualified_type_real ((type), (type_quals), tf_warning_or_error
)
,
589 expr, field, NULL_TREE(tree) __null);
590 /* Mark the expression const or volatile, as appropriate.
591 Even though we've dealt with the type above, we still have
592 to mark the expression itself. */
593 if (type_quals & TYPE_QUAL_CONST)
594 TREE_READONLY (expr)((non_type_check ((expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 594, __FUNCTION__))->base.readonly_flag)
= 1;
595 if (type_quals & TYPE_QUAL_VOLATILE)
596 TREE_THIS_VOLATILE (expr)((expr)->base.volatile_flag) = 1;
597
598 return expr;
599 }
600
601 /* Didn't find the base field?!? */
602 gcc_unreachable ()(fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 602, __FUNCTION__))
;
603}
604
605/* Convert OBJECT to the base TYPE. OBJECT is an expression whose
606 type is a class type or a pointer to a class type. In the former
607 case, TYPE is also a class type; in the latter it is another
608 pointer type. If CHECK_ACCESS is true, an error message is emitted
609 if TYPE is inaccessible. If OBJECT has pointer type, the value is
610 assumed to be non-NULL. */
611
612tree
613convert_to_base (tree object, tree type, bool check_access, bool nonnull,
614 tsubst_flags_t complain)
615{
616 tree binfo;
617 tree object_type;
618
619 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"
, 619, __FUNCTION__))->typed.type))->base.code) == POINTER_TYPE
)
)
620 {
621 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"
, 621, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 621, __FUNCTION__))->typed.type)
;
622 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"
, 622, __FUNCTION__))->typed.type)
;
623 }
624 else
625 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"
, 625, __FUNCTION__))->typed.type)
;
626
627 binfo = lookup_base (object_type, type, check_access ? ba_check : ba_unique,
628 NULL__null, complain);
629 if (!binfo || binfo == error_mark_nodeglobal_trees[TI_ERROR_MARK])
630 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
631
632 return build_base_path (PLUS_EXPR, object, binfo, nonnull, complain);
633}
634
635/* EXPR is an expression with unqualified class type. BASE is a base
636 binfo of that class type. Returns EXPR, converted to the BASE
637 type. This function assumes that EXPR is the most derived class;
638 therefore virtual bases can be found at their static offsets. */
639
640tree
641convert_to_base_statically (tree expr, tree base)
642{
643 tree expr_type;
644
645 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"
, 645, __FUNCTION__))->typed.type)
;
646 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"
, 646, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 646, __FUNCTION__))->typed.type)) == (expr_type))
)
647 {
648 /* If this is a non-empty base, use a COMPONENT_REF. */
649 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"
, 649, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 649, __FUNCTION__))->typed.type)
))
650 return build_simple_base_path (expr, base);
651
652 /* We use fold_build2 and fold_convert below to simplify the trees
653 provided to the optimizers. It is not safe to call these functions
654 when processing a template because they do not handle C++-specific
655 trees. */
656 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"
, 656, __FUNCTION__), 0 : 0))
;
657 expr = cp_build_addr_expr (expr, tf_warning_or_error);
658 if (!integer_zerop (BINFO_OFFSET (base)((tree_check ((base), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 658, __FUNCTION__, (TREE_BINFO)))->binfo.offset)
))
659 expr = fold_build_pointer_plus_loc (input_location,
660 expr, BINFO_OFFSET (base)((tree_check ((base), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 660, __FUNCTION__, (TREE_BINFO)))->binfo.offset)
);
661 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"
, 661, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 661, __FUNCTION__))->typed.type)), expr)
;
662 expr = build_fold_indirect_ref_loc (input_location, expr);
663 }
664
665 return expr;
666}
667
668/* True IFF EXPR is a reference to an empty base class "subobject", as built in
669 convert_to_base_statically. We look for the result of the fold_convert
670 call, a NOP_EXPR from one pointer type to another, where the target is an
671 empty base of the original type. */
672
673bool
674is_empty_base_ref (tree expr)
675{
676 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == INDIRECT_REF)
677 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"
, 677, __FUNCTION__)))))
;
678 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) != NOP_EXPR)
679 return false;
680 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"
, 680, __FUNCTION__))->typed.type)
;
681 if (!POINTER_TYPE_P (type)(((enum tree_code) (type)->base.code) == POINTER_TYPE || (
(enum tree_code) (type)->base.code) == REFERENCE_TYPE)
)
682 return false;
683 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"
, 683, __FUNCTION__))->typed.type)
;
684 if (!is_empty_class (type))
685 return false;
686 STRIP_NOPS (expr)(expr) = tree_strip_nop_conversions ((const_cast<union tree_node
*> (((expr)))))
;
687 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"
, 687, __FUNCTION__))->typed.type)
;
688 if (!POINTER_TYPE_P (fromtype)(((enum tree_code) (fromtype)->base.code) == POINTER_TYPE ||
((enum tree_code) (fromtype)->base.code) == REFERENCE_TYPE
)
)
689 return false;
690 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"
, 690, __FUNCTION__))->typed.type)
;
691 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"
, 691, __FUNCTION__))->type_common.lang_flag_5))
692 && !same_type_ignoring_top_level_qualifiers_p (fromtype, type)
693 && DERIVED_FROM_P (type, fromtype)(lookup_base ((fromtype), (type), ba_any, __null, tf_none) !=
(tree) __null)
);
694}
695
696tree
697build_vfield_ref (tree datum, tree type)
698{
699 tree vfield, vcontext;
700
701 if (datum == error_mark_nodeglobal_trees[TI_ERROR_MARK]
702 /* Can happen in case of duplicate base types (c++/59082). */
703 || !TYPE_VFIELD (type)((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 703, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.minval)
)
704 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
705
706 /* First, convert to the requested type. */
707 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"
, 707, __FUNCTION__))->typed.type)
, type))
708 datum = convert_to_base (datum, type, /*check_access=*/false,
709 /*nonnull=*/true, tf_warning_or_error);
710
711 /* Second, the requested type may not be the owner of its own vptr.
712 If not, convert to the base class that owns it. We cannot use
713 convert_to_base here, because VCONTEXT may appear more than once
714 in the inheritance hierarchy of TYPE, and thus direct conversion
715 between the types may be ambiguous. Following the path back up
716 one step at a time via primary bases avoids the problem. */
717 vfield = TYPE_VFIELD (type)((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 717, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.minval)
;
718 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"
, 718, __FUNCTION__))->decl_minimal.context)
;
719 while (!same_type_ignoring_top_level_qualifiers_p (vcontext, type))
720 {
721 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"
, 721, __FUNCTION__))->type_with_lang_specific.lang_specific
))->primary_base)
);
722 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"
, 722, __FUNCTION__))->typed.type)
;
723 }
724
725 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"
, 725, __FUNCTION__))->typed.type)
, datum, vfield, NULL_TREE(tree) __null);
726}
727
728/* Given an object INSTANCE, return an expression which yields the
729 vtable element corresponding to INDEX. There are many special
730 cases for INSTANCE which we take care of here, mainly to avoid
731 creating extra tree nodes when we don't have to. */
732
733tree
734build_vtbl_ref (tree instance, tree idx)
735{
736 tree aref;
737 tree vtbl = NULL_TREE(tree) __null;
738
739 /* Try to figure out what a reference refers to, and
740 access its virtual function table directly. */
741
742 int cdtorp = 0;
743 tree fixed_type = fixed_type_or_null (instance, NULL__null, &cdtorp);
744
745 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"
, 745, __FUNCTION__))->typed.type)
);
746
747 if (fixed_type && !cdtorp)
748 {
749 tree binfo = lookup_base (fixed_type, basetype,
750 ba_unique, NULL__null, tf_none);
751 if (binfo && binfo != error_mark_nodeglobal_trees[TI_ERROR_MARK])
752 vtbl = unshare_expr (BINFO_VTABLE (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 752, __FUNCTION__, (TREE_BINFO)))->binfo.vtable)
);
753 }
754
755 if (!vtbl)
756 vtbl = build_vfield_ref (instance, basetype);
757
758 aref = build_array_ref (input_location, vtbl, idx);
759 TREE_CONSTANT (aref)((non_type_check ((aref), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 759, __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"
, 759, __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"
, 759, __FUNCTION__))->base.constant_flag)
;
760
761 return aref;
762}
763
764/* Given a stable object pointer INSTANCE_PTR, return an expression which
765 yields a function pointer corresponding to vtable element INDEX. */
766
767tree
768build_vfn_ref (tree instance_ptr, tree idx)
769{
770 tree aref;
771
772 aref = build_vtbl_ref (cp_build_fold_indirect_ref (instance_ptr), idx);
773
774 /* When using function descriptors, the address of the
775 vtable entry is treated as a function pointer. */
776 if (TARGET_VTABLE_USES_DESCRIPTORS0)
777 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"
, 777, __FUNCTION__))->typed.type)
,
778 cp_build_addr_expr (aref, tf_warning_or_error));
779
780 /* Remember this as a method reference, for later devirtualization. */
781 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"
, 781, __FUNCTION__))->typed.type)
, aref, instance_ptr, idx);
782
783 return aref;
784}
785
786/* Return the name of the virtual function table (as an IDENTIFIER_NODE)
787 for the given TYPE. */
788
789static tree
790get_vtable_name (tree type)
791{
792 return mangle_vtbl_for_type (type);
793}
794
795/* DECL is an entity associated with TYPE, like a virtual table or an
796 implicitly generated constructor. Determine whether or not DECL
797 should have external or internal linkage at the object file
798 level. This routine does not deal with COMDAT linkage and other
799 similar complexities; it simply sets TREE_PUBLIC if it possible for
800 entities in other translation units to contain copies of DECL, in
801 the abstract. */
802
803void
804set_linkage_according_to_type (tree /*type*/, tree decl)
805{
806 TREE_PUBLIC (decl)((decl)->base.public_flag) = 1;
807 determine_visibility (decl);
808}
809
810/* Create a VAR_DECL for a primary or secondary vtable for CLASS_TYPE.
811 (For a secondary vtable for B-in-D, CLASS_TYPE should be D, not B.)
812 Use NAME for the name of the vtable, and VTABLE_TYPE for its type. */
813
814static tree
815build_vtable (tree class_type, tree name, tree vtable_type)
816{
817 tree decl;
818
819 decl = build_lang_decl (VAR_DECL, name, vtable_type);
820 /* vtable names are already mangled; give them their DECL_ASSEMBLER_NAME
821 now to avoid confusion in mangle_decl. */
822 SET_DECL_ASSEMBLER_NAME (decl, name)overwrite_decl_assembler_name (decl, name);
823 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"
, 823, __FUNCTION__))->decl_minimal.context)
= class_type;
824 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"
, 824, __FUNCTION__))->decl_common.artificial_flag)
= 1;
825 TREE_STATIC (decl)((decl)->base.static_flag) = 1;
826 TREE_READONLY (decl)((non_type_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 826, __FUNCTION__))->base.readonly_flag)
= 1;
827 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"
, 827, __FUNCTION__))->decl_common.virtual_flag)
= 1;
828 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"
, 828, __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)))))
;
829 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"
, 829, __FUNCTION__))->base.u.bits.user_align)
= true;
830 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"
, 830, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 830, __FUNCTION__))->decl_common.virtual_flag)
= 1;
831 set_linkage_according_to_type (class_type, decl);
832 /* The vtable has not been defined -- yet. */
833 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"
, 833, __FUNCTION__))->decl_common.decl_flag_1)
= 1;
834 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"
, 834, __FUNCTION__))->decl_common.lang_specific)->u.base
.not_really_extern)
= 1;
835
836 /* Mark the VAR_DECL node representing the vtable itself as a
837 "gratuitous" one, thereby forcing dwarfout.c to ignore it. It
838 is rather important that such things be ignored because any
839 effort to actually generate DWARF for them will run into
840 trouble when/if we encounter code like:
841
842 #pragma interface
843 struct S { virtual void member (); };
844
845 because the artificial declaration of the vtable itself (as
846 manufactured by the g++ front end) will say that the vtable is
847 a static member of `S' but only *after* the debug output for
848 the definition of `S' has already been output. This causes
849 grief because the DWARF entry for the definition of the vtable
850 will try to refer back to an earlier *declaration* of the
851 vtable as a static member of `S' and there won't be one. We
852 might be able to arrange to have the "vtable static member"
853 attached to the member list for `S' before the debug info for
854 `S' get written (which would solve the problem) but that would
855 require more intrusive changes to the g++ front end. */
856 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"
, 856, __FUNCTION__))->decl_common.ignored_flag)
= 1;
857
858 return decl;
859}
860
861/* Get the VAR_DECL of the vtable for TYPE. TYPE need not be polymorphic,
862 or even complete. If this does not exist, create it. If COMPLETE is
863 nonzero, then complete the definition of it -- that will render it
864 impossible to actually build the vtable, but is useful to get at those
865 which are known to exist in the runtime. */
866
867tree
868get_vtable_decl (tree type, int complete)
869{
870 tree decl;
871
872 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"
, 872, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vtables)
)
873 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"
, 873, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vtables)
;
874
875 decl = build_vtable (type, get_vtable_name (type), vtbl_type_nodecp_global_trees[CPTI_VTBL_TYPE]);
876 CLASSTYPE_VTABLES (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 876, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vtables)
= decl;
877
878 if (complete)
879 {
880 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"
, 880, __FUNCTION__))->decl_common.decl_flag_1)
= 1;
881 cp_finish_decl (decl, NULL_TREE(tree) __null, false, NULL_TREE(tree) __null, 0);
882 }
883
884 return decl;
885}
886
887/* Build the primary virtual function table for TYPE. If BINFO is
888 non-NULL, build the vtable starting with the initial approximation
889 that it is the same as the one which is the head of the association
890 list. Returns a nonzero value if a new vtable is actually
891 created. */
892
893static int
894build_primary_vtable (tree binfo, tree type)
895{
896 tree decl;
897 tree virtuals;
898
899 decl = get_vtable_decl (type, /*complete=*/0);
900
901 if (binfo)
902 {
903 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"
, 903, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 903, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
)
904 /* We have already created a vtable for this base, so there's
905 no need to do it again. */
906 return 0;
907
908 virtuals = copy_list (BINFO_VIRTUALS (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 908, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
);
909 TREE_TYPE (decl)((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)
= 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"
, 909, __FUNCTION__))->typed.type)
;
910 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"
, 910, __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"
, 910, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 910, __FUNCTION__))->type_common.size)
;
911 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"
, 911, __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"
, 911, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 911, __FUNCTION__))->type_common.size_unit)
;
912 }
913 else
914 {
915 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"
, 915, __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"
, 915, __FUNCTION__), 0 : 0))
;
916 virtuals = NULL_TREE(tree) __null;
917 }
918
919 /* Initialize the association list for this type, based
920 on our first approximation. */
921 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"
, 921, __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"
, 921, __FUNCTION__, (TREE_BINFO)))->binfo.vtable)
= decl;
922 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"
, 922, __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"
, 922, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
= virtuals;
923 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"
, 923, __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"
, 923, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 923, __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"
, 923, __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"
, 923, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 923, __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"
, 923, __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"
, 923, __FUNCTION__, (TREE_BINFO)))->base.static_flag)) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 923, __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"
, 923, __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"
, 923, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 923, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 923, __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"
, 923, __FUNCTION__), 0 : 0)))
;
924 return 1;
925}
926
927/* Give BINFO a new virtual function table which is initialized
928 with a skeleton-copy of its original initialization. The only
929 entry that changes is the `delta' entry, so we can really
930 share a lot of structure.
931
932 FOR_TYPE is the most derived type which caused this table to
933 be needed.
934
935 Returns nonzero if we haven't met BINFO before.
936
937 The order in which vtables are built (by calling this function) for
938 an object must remain the same, otherwise a binary incompatibility
939 can result. */
940
941static int
942build_secondary_vtable (tree binfo)
943{
944 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"
, 944, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 944, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
)
945 /* We already created a vtable for this base. There's no need to
946 do it again. */
947 return 0;
948
949 /* Remember that we've created a vtable for this BINFO, so that we
950 don't try to do so again. */
951 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"
, 951, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 951, __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"
, 951, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 951, __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"
, 951, __FUNCTION__, (TREE_BINFO)))->base.static_flag)) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 951, __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"
, 951, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 951, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 951, __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"
, 951, __FUNCTION__), 0 : 0)))
;
952
953 /* Make fresh virtual list, so we can smash it later. */
954 BINFO_VIRTUALS (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 954, __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"
, 954, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
);
955
956 /* Secondary vtables are laid out as part of the same structure as
957 the primary vtable. */
958 BINFO_VTABLE (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 958, __FUNCTION__, (TREE_BINFO)))->binfo.vtable)
= NULL_TREE(tree) __null;
959 return 1;
960}
961
962/* Create a new vtable for BINFO which is the hierarchy dominated by
963 T. Return nonzero if we actually created a new vtable. */
964
965static int
966make_new_vtable (tree t, tree binfo)
967{
968 if (binfo == TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 968, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
)
969 /* In this case, it is *type*'s vtable we are modifying. We start
970 with the approximation that its vtable is that of the
971 immediate base class. */
972 return build_primary_vtable (binfo, t);
973 else
974 /* This is our very own copy of `basetype' to play with. Later,
975 we will fill in all the virtual functions that override the
976 virtual functions in these base classes which are not defined
977 by the current type. */
978 return build_secondary_vtable (binfo);
979}
980
981/* Make *VIRTUALS, an entry on the BINFO_VIRTUALS list for BINFO
982 (which is in the hierarchy dominated by T) list FNDECL as its
983 BV_FN. DELTA is the required constant adjustment from the `this'
984 pointer where the vtable entry appears to the `this' required when
985 the function is actually called. */
986
987static void
988modify_vtable_entry (tree t,
989 tree binfo,
990 tree fndecl,
991 tree delta,
992 tree *virtuals)
993{
994 tree v;
995
996 v = *virtuals;
997
998 if (fndecl != BV_FN (v)(((tree_check ((v), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 998, __FUNCTION__, (TREE_LIST)))->list.value))
999 || !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"
, 999, __FUNCTION__, (TREE_LIST)))->list.purpose))
))
1000 {
1001 /* We need a new vtable for BINFO. */
1002 if (make_new_vtable (t, binfo))
1003 {
1004 /* If we really did make a new vtable, we also made a copy
1005 of the BINFO_VIRTUALS list. Now, we have to find the
1006 corresponding entry in that list. */
1007 *virtuals = BINFO_VIRTUALS (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1007, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
;
1008 while (BV_FN (*virtuals)(((tree_check ((*virtuals), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1008, __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"
, 1008, __FUNCTION__, (TREE_LIST)))->list.value))
)
1009 *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"
, 1009, __FUNCTION__))->common.chain)
;
1010 v = *virtuals;
1011 }
1012
1013 BV_DELTA (v)(((tree_check ((v), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1013, __FUNCTION__, (TREE_LIST)))->list.purpose))
= delta;
1014 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"
, 1014, __FUNCTION__))->typed.type))
= NULL_TREE(tree) __null;
1015 BV_FN (v)(((tree_check ((v), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1015, __FUNCTION__, (TREE_LIST)))->list.value))
= fndecl;
1016 }
1017}
1018
1019
1020/* Add method METHOD to class TYPE. If VIA_USING indicates whether
1021 METHOD is being injected via a using_decl. Returns true if the
1022 method could be added to the method vec. */
1023
1024bool
1025add_method (tree type, tree method, bool via_using)
1026{
1027 if (method == error_mark_nodeglobal_trees[TI_ERROR_MARK])
1028 return false;
1029
1030 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"
, 1030, __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"
, 1030, __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"
, 1030, __FUNCTION__), 0 : 0))
;
1031
1032 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"
, 1032, __FUNCTION__))->decl_minimal.name)
);
1033 tree current_fns = slot ? *slot : NULL_TREE(tree) __null;
1034
1035 /* See below. */
1036 int losem = -1;
1037
1038 /* Check to see if we've already got this method. */
1039 for (ovl_iterator iter (current_fns); iter; ++iter)
1040 {
1041 tree fn = *iter;
1042
1043 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) != TREE_CODE (method)((enum tree_code) (method)->base.code))
1044 continue;
1045
1046 /* Two using-declarations can coexist, we'll complain about ambiguity in
1047 overload resolution. */
1048 if (via_using && iter.using_p ()
1049 /* Except handle inherited constructors specially. */
1050 && ! 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"
, 1050, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1050, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
)
)
1051 continue;
1052
1053 /* [over.load] Member function declarations with the
1054 same name and the same parameter types cannot be
1055 overloaded if any of them is a static member
1056 function declaration.
1057
1058 [over.load] Member function declarations with the same name and
1059 the same parameter-type-list as well as member function template
1060 declarations with the same name, the same parameter-type-list, and
1061 the same template parameter lists cannot be overloaded if any of
1062 them, but not all, have a ref-qualifier.
1063
1064 [namespace.udecl] When a using-declaration brings names
1065 from a base class into a derived class scope, member
1066 functions in the derived class override and/or hide member
1067 functions with the same name and parameter types in a base
1068 class (rather than conflicting). */
1069 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"
, 1069, __FUNCTION__))->typed.type)
;
1070 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"
, 1070, __FUNCTION__))->typed.type)
;
1071
1072 /* Compare the quals on the 'this' parm. Don't compare
1073 the whole types, as used functions are treated as
1074 coming from the using class in overload resolution. */
1075 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"
, 1075, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1075, __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"
, 1075, __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"
, 1075, __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"
, 1075, __FUNCTION__); &lt->u.fn; })->static_function
)
1076 && ! 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"
, 1076, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1076, __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"
, 1076, __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"
, 1076, __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"
, 1076, __FUNCTION__); &lt->u.fn; })->static_function
)
1077 /* Either both or neither need to be ref-qualified for
1078 differing quals to allow overloading. */
1079 && (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"
, 1079, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1079, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
1080 == 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"
, 1080, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1080, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
)
1081 && (type_memfn_quals (fn_type) != type_memfn_quals (method_type)
1082 || type_memfn_rqual (fn_type) != type_memfn_rqual (method_type)))
1083 continue;
1084
1085 tree real_fn = fn;
1086 tree real_method = method;
1087
1088 /* Templates and conversion ops must match return types. */
1089 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"
, 1089, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1089, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1089, __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"
, 1089, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1089, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1089, __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"
, 1089, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1089, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1089, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))
|| TREE_CODE (fn)((enum tree_code) (fn)->base.code) == TEMPLATE_DECL)
1090 && !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"
, 1090, __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"
, 1090, __FUNCTION__))->typed.type)), 0)
)
1091 continue;
1092
1093 /* For templates, the template parameters must be identical. */
1094 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == TEMPLATE_DECL)
1095 {
1096 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"
, 1096, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments
,
1097 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"
, 1097, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments
))
1098 continue;
1099
1100 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"
, 1100, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
1101 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"
, 1101, __FUNCTION__, (TEMPLATE_DECL))))))))->result
;
1102 }
1103
1104 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"
, 1104, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
;
1105 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"
, 1105, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values)
;
1106 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"
, 1106, __FUNCTION__, (TEMPLATE_DECL))))))))->result : real_fn
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1106, __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"
, 1106, __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"
, 1106, __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"
, 1106, __FUNCTION__); &lt->u.fn; })->static_function
)
)
1107 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"
, 1107, __FUNCTION__))->common.chain)
;
1108 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"
, 1108, __FUNCTION__, (TEMPLATE_DECL))))))))->result : real_method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1108, __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"
, 1108, __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"
, 1108, __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"
, 1108, __FUNCTION__); &lt->u.fn; })->static_function
)
)
1109 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"
, 1109, __FUNCTION__))->common.chain)
;
1110
1111 /* Bring back parameters omitted from an inherited ctor. The
1112 method and the function can have different omittedness. */
1113 if (ctor_omit_inherited_parms (real_fn))
1114 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"
, 1114, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1114, __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"
, 1114, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1114, __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"
, 1114, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1114, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
;
1115 if (ctor_omit_inherited_parms (real_method))
1116 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"
, 1117, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1117, __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"
, 1117, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1117, __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"
, 1117, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1117, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
1117 (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"
, 1117, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1117, __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"
, 1117, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1117, __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"
, 1117, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1117, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
);
1118
1119 if (!compparms (parms1, parms2))
1120 continue;
1121
1122 if (!equivalently_constrained (fn, method))
1123 {
1124 if (processing_template_declscope_chain->x_processing_template_decl)
1125 /* We can't check satisfaction in dependent context, wait until
1126 the class is instantiated. */
1127 continue;
1128
1129 special_function_kind sfk = special_memfn_p (method);
1130
1131 if (sfk == sfk_none
1132 || 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"
, 1132, __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"
, 1132, __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"
, 1132, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1132, __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"
, 1132, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1132, __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"
, 1132, __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"
, 1132, __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"
, 1132, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null)
1133 || TREE_CODE (fn)((enum tree_code) (fn)->base.code) == TEMPLATE_DECL)
1134 /* Member function templates and non-special member functions
1135 coexist if they are not equivalently constrained. A member
1136 function is not hidden by an inherited constructor. */
1137 continue;
1138
1139 /* P0848: For special member functions, deleted, unsatisfied, or
1140 less constrained overloads are ineligible. We implement this
1141 by removing them from CLASSTYPE_MEMBER_VEC. Destructors don't
1142 use the notion of eligibility, and the selected destructor can
1143 be deleted, but removing unsatisfied or less constrained
1144 overloads has the same effect as overload resolution. */
1145 bool dtor = (sfk == sfk_destructor);
1146 if (losem == -1)
1147 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"
, 1147, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1147, __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"
, 1147, __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"
, 1147, __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"
, 1147, __FUNCTION__); &lt->u.fn; })->min.base.threadprivate_or_deleted_p
)
)
1148 || !constraints_satisfied_p (method));
1149 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"
, 1149, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1149, __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"
, 1149, __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"
, 1149, __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"
, 1149, __FUNCTION__); &lt->u.fn; })->min.base.threadprivate_or_deleted_p
)
)
1150 || !constraints_satisfied_p (fn));
1151 int win;
1152 if (losem || losef)
1153 win = losem - losef;
1154 else
1155 win = more_constrained (fn, method);
1156 if (win > 0)
1157 /* Leave FN in the method vec, discard METHOD. */
1158 return false;
1159 else if (win < 0)
1160 {
1161 /* Remove FN, add METHOD. */
1162 current_fns = iter.remove_node (current_fns);
1163 continue;
1164 }
1165 else
1166 /* Let them coexist for now. */
1167 continue;
1168 }
1169
1170 /* If these are versions of the same function, process and
1171 move on. */
1172 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == FUNCTION_DECL
1173 && maybe_version_functions (method, fn, true))
1174 continue;
1175
1176 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"
, 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)
)
1177 {
1178 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"
, 1178, __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"
, 1178, __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"
, 1178, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1178, __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"
, 1178, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1178, __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"
, 1178, __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"
, 1178, __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"
, 1178, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null)
)
1179 /* Defer to the other function. */
1180 return false;
1181
1182 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"
, 1182, __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"
, 1182, __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"
, 1182, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1182, __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"
, 1182, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1182, __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"
, 1182, __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"
, 1182, __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"
, 1182, __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"
, 1182, __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"
, 1182, __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"
, 1182, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1182, __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"
, 1182, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1182, __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"
, 1182, __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"
, 1182, __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"
, 1182, __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"
, 1182, __FUNCTION__))->decl_minimal.context) : (tree) __null
)
;
1183 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"
, 1183, __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"
, 1183, __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"
, 1183, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1183, __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"
, 1183, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1183, __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"
, 1183, __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"
, 1183, __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"
, 1183, __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"
, 1183, __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"
, 1183, __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"
, 1183, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1183, __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"
, 1183, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1183, __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"
, 1183, __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"
, 1183, __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"
, 1183, __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"
, 1183, __FUNCTION__))->decl_minimal.context) : (tree) __null
)
;
1184 if (flag_new_inheriting_ctorsglobal_options.x_flag_new_inheriting_ctors)
1185 {
1186 if (basem == basef)
1187 {
1188 /* Inheriting the same constructor along different
1189 paths, combine them. */
1190 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"
, 1192, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1192, __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"
, 1192, __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"
, 1192, __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"
, 1192, __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"
, 1191, __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"
, 1191, __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"
, 1191, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1191, __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"
, 1191, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1191, __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"
, 1191, __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"
, 1191, __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"
, 1191, __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"
, 1192, __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"
, 1192, __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"
, 1192, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1192, __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"
, 1192, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1192, __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"
, 1192, __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"
, 1192, __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"
, 1192, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null))))
1191 (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"
, 1192, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1192, __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"
, 1192, __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"
, 1192, __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"
, 1192, __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"
, 1191, __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"
, 1191, __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"
, 1191, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1191, __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"
, 1191, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1191, __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"
, 1191, __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"
, 1191, __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"
, 1191, __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"
, 1192, __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"
, 1192, __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"
, 1192, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1192, __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"
, 1192, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1192, __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"
, 1192, __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"
, 1192, __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"
, 1192, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null))))
1192 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"
, 1192, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1192, __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"
, 1192, __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"
, 1192, __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"
, 1192, __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"
, 1191, __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"
, 1191, __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"
, 1191, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1191, __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"
, 1191, __FUNCTION__, (TEMPLATE_DECL))))))))->result : method
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1191, __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"
, 1191, __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"
, 1191, __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"
, 1191, __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"
, 1192, __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"
, 1192, __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"
, 1192, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1192, __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"
, 1192, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1192, __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"
, 1192, __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"
, 1192, __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"
, 1192, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null))))
;
1193 /* And discard the new one. */
1194 return false;
1195 }
1196 else
1197 /* Inherited ctors can coexist until overload
1198 resolution. */
1199 continue;
1200 }
1201
1202 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"
, 1202, __FUNCTION__))->decl_minimal.locus)
,
1203 "%q#D conflicts with version inherited from %qT",
1204 method, basef);
1205 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"
, 1205, __FUNCTION__))->decl_minimal.locus)
,
1206 "version inherited from %qT declared here",
1207 basef);
1208 return false;
1209 }
1210
1211 if (via_using)
1212 /* Defer to the local function. */
1213 return false;
1214 else if (flag_new_inheriting_ctorsglobal_options.x_flag_new_inheriting_ctors
1215 && 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"
, 1215, __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"
, 1215, __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"
, 1215, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1215, __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"
, 1215, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1215, __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"
, 1215, __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"
, 1215, __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"
, 1215, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null)
)
1216 {
1217 /* Remove the inherited constructor. */
1218 current_fns = iter.remove_node (current_fns);
1219 continue;
1220 }
1221 else
1222 {
1223 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"
, 1223, __FUNCTION__))->decl_minimal.locus)
,
1224 "%q#D cannot be overloaded with %q#D", method, fn);
1225 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"
, 1225, __FUNCTION__))->decl_minimal.locus)
,
1226 "previous declaration %q#D", fn);
1227 return false;
1228 }
1229 }
1230
1231 current_fns = ovl_insert (method, current_fns, via_using);
1232
1233 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"
, 1233, __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"
, 1233, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1233, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1233, __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"
, 1233, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1233, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1233, __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"
, 1233, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1233, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1233, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))
1234 && !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"
, 1234, __FUNCTION__))->decl_minimal.name)
, current_fns))
1235 return false;
1236
1237 if (!slot)
1238 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"
, 1238, __FUNCTION__))->decl_minimal.name)
);
1239
1240 /* Maintain TYPE_HAS_USER_CONSTRUCTOR, etc. */
1241 grok_special_member_properties (method);
1242
1243 *slot = current_fns;
1244
1245 return true;
1246}
1247
1248/* Subroutines of finish_struct. */
1249
1250/* Change the access of FDECL to ACCESS in T. Return 1 if change was
1251 legit, otherwise return 0. */
1252
1253static int
1254alter_access (tree t, tree fdecl, tree access)
1255{
1256 tree elem;
1257
1258 retrofit_lang_decl (fdecl);
1259
1260 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"
, 1260, __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"
, 1260, __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"
, 1260, __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"
, 1260, __FUNCTION__), 0 : 0))
;
1261
1262 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"
, 1262, __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"
, 1262, __FUNCTION__); &lt->u.min; })->access)
);
1263 if (elem)
1264 {
1265 if (TREE_VALUE (elem)((tree_check ((elem), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1265, __FUNCTION__, (TREE_LIST)))->list.value)
!= access)
1266 {
1267 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"
, 1267, __FUNCTION__))->typed.type))->base.code)
== FUNCTION_DECL)
1268 error ("conflicting access specifications for method"
1269 " %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"
, 1269, __FUNCTION__))->typed.type)
);
1270 else
1271 error ("conflicting access specifications for field %qE, ignored",
1272 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"
, 1272, __FUNCTION__))->decl_minimal.name)
);
1273 }
1274 else
1275 {
1276 /* They're changing the access to the same thing they changed
1277 it to before. That's OK. */
1278 ;
1279 }
1280 }
1281 else
1282 {
1283 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"
, 1283, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
, fdecl, fdecl,
1284 tf_warning_or_error);
1285 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"
, 1285, __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"
, 1285, __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"
, 1285, __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"
, 1285, __FUNCTION__); &lt->u.min; })->access)
);
1286 return 1;
1287 }
1288 return 0;
1289}
1290
1291/* Return the access node for DECL's access in its enclosing class. */
1292
1293tree
1294declared_access (tree decl)
1295{
1296 return (TREE_PRIVATE (decl)((decl)->base.private_flag) ? access_private_nodeglobal_trees[TI_PRIVATE]
1297 : TREE_PROTECTED (decl)((decl)->base.protected_flag) ? access_protected_nodeglobal_trees[TI_PROTECTED]
1298 : access_public_nodeglobal_trees[TI_PUBLIC]);
1299}
1300
1301/* Process the USING_DECL, which is a member of T. */
1302
1303static void
1304handle_using_decl (tree using_decl, tree t)
1305{
1306 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"
, 1306, __FUNCTION__, (USING_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1306, __FUNCTION__))->decl_common.initial)
;
1307 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"
, 1307, __FUNCTION__))->decl_minimal.name)
;
1308 tree access = declared_access (using_decl);
1309 tree flist = NULL_TREE(tree) __null;
1310 tree old_value;
1311
1312 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"
, 1312, __FUNCTION__), 0 : 0))
;
1313
1314 old_value = lookup_member (t, name, /*protect=*/0, /*want_type=*/false,
1315 tf_warning_or_error);
1316 if (old_value)
1317 {
1318 old_value = OVL_FIRST (old_value)ovl_first (old_value);
1319
1320 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"
, 1320, __FUNCTION__))->decl_minimal.context)
== t)
1321 /* OK */;
1322 else
1323 old_value = NULL_TREE(tree) __null;
1324 }
1325
1326 cp_emit_debug_info_for_using (decl, t);
1327
1328 if (is_overloaded_fn (decl))
1329 flist = decl;
1330
1331 if (! old_value)
1332 ;
1333 else if (is_overloaded_fn (old_value))
1334 {
1335 if (flist)
1336 /* It's OK to use functions from a base when there are functions with
1337 the same name already present in the current class. */;
1338 else
1339 {
1340 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"
, 1340, __FUNCTION__))->decl_minimal.locus)
, "%qD invalid in %q#T "
1341 "because of local method %q#D with same name",
1342 using_decl, t, old_value);
1343 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"
, 1343, __FUNCTION__))->decl_minimal.locus)
,
1344 "local method %q#D declared here", old_value);
1345 return;
1346 }
1347 }
1348 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"
, 1348, __FUNCTION__))->decl_common.artificial_flag)
)
1349 {
1350 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"
, 1350, __FUNCTION__))->decl_minimal.locus)
, "%qD invalid in %q#T "
1351 "because of local member %q#D with same name",
1352 using_decl, t, old_value);
1353 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"
, 1353, __FUNCTION__))->decl_minimal.locus)
,
1354 "local member %q#D declared here", old_value);
1355 return;
1356 }
1357
1358 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"
, 1358, __FUNCTION__))->decl_minimal.locus)
);
1359
1360 /* Make type T see field decl FDECL with access ACCESS. */
1361 if (flist)
1362 for (tree f : ovl_range (flist))
1363 {
1364 add_method (t, f, true);
1365 alter_access (t, f, access);
1366 }
1367 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"
, 1367, __FUNCTION__, (USING_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1367, __FUNCTION__))->decl_common.lang_flag_2)
)
1368 {
1369 /* C++20 using enum can import non-inherited enumerators into class
1370 scope. We implement that by making a copy of the CONST_DECL for which
1371 CONST_DECL_USING_P is true. */
1372 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"
, 1372, __FUNCTION__), 0 : 0))
;
1373
1374 auto cas = make_temp_override (current_access_specifierscope_chain->access_specifier);
1375 set_current_access_from_decl (using_decl);
1376 tree copy = copy_decl (decl);
1377 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"
, 1377, __FUNCTION__))->decl_minimal.context)
= t;
1378 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"
, 1378, __FUNCTION__))->decl_common.artificial_flag)
= true;
1379 /* We emitted debug info for the USING_DECL above; make sure we don't
1380 also emit anything for this clone. */
1381 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"
, 1381, __FUNCTION__))->decl_common.ignored_flag)
= true;
1382 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"
, 1382, __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"
, 1382, __FUNCTION__))->decl_minimal.locus)
;
1383 finish_member_declaration (copy);
1384 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"
, 1384, __FUNCTION__))->decl_common.abstract_origin)
= decl;
1385 }
1386 else
1387 alter_access (t, decl, access);
1388}
1389
1390/* Data structure for find_abi_tags_r, below. */
1391
1392struct abi_tag_data
1393{
1394 tree t; // The type that we're checking for missing tags.
1395 tree subob; // The subobject of T that we're getting tags from.
1396 tree tags; // error_mark_node for diagnostics, or a list of missing tags.
1397};
1398
1399/* Subroutine of find_abi_tags_r. Handle a single TAG found on the class TP
1400 in the context of P. TAG can be either an identifier (the DECL_NAME of
1401 a tag NAMESPACE_DECL) or a STRING_CST (a tag attribute). */
1402
1403static void
1404check_tag (tree tag, tree id, tree *tp, abi_tag_data *p)
1405{
1406 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"
, 1406, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1406, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
)
1407 {
1408 if (p->tags != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1409 {
1410 /* We're collecting tags from template arguments or from
1411 the type of a variable or function return type. */
1412 p->tags = tree_cons (NULL_TREE(tree) __null, tag, p->tags);
1413
1414 /* Don't inherit this tag multiple times. */
1415 IDENTIFIER_MARKED (id)((tree_not_check2 (((tree_check ((id), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1415, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1415, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
= true;
1416
1417 if (TYPE_P (p->t)(tree_code_type[(int) (((enum tree_code) (p->t)->base.code
))] == tcc_type)
)
1418 {
1419 /* Tags inherited from type template arguments are only used
1420 to avoid warnings. */
1421 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"
, 1421, __FUNCTION__, (TREE_LIST)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1421, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= true;
1422 return;
1423 }
1424 /* For functions and variables we want to warn, too. */
1425 }
1426
1427 /* Otherwise we're diagnosing missing tags. */
1428 if (TREE_CODE (p->t)((enum tree_code) (p->t)->base.code) == FUNCTION_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 return type) has",
1433 p->t, tag, *tp))
1434 inform (location_of (*tp), "%qT declared here", *tp);
1435 }
1436 else if (VAR_P (p->t)(((enum tree_code) (p->t)->base.code) == VAR_DECL))
1437 {
1438 auto_diagnostic_group d;
1439 if (warning (OPT_Wabi_tag, "%qD inherits the %E ABI tag "
1440 "that %qT (used in its type) has", p->t, tag, *tp))
1441 inform (location_of (*tp), "%qT declared here", *tp);
1442 }
1443 else if (TYPE_P (p->subob)(tree_code_type[(int) (((enum tree_code) (p->subob)->base
.code))] == tcc_type)
)
1444 {
1445 auto_diagnostic_group d;
1446 if (warning (OPT_Wabi_tag, "%qT does not have the %E ABI tag "
1447 "that base %qT has", p->t, tag, p->subob))
1448 inform (location_of (p->subob), "%qT declared here",
1449 p->subob);
1450 }
1451 else
1452 {
1453 auto_diagnostic_group d;
1454 if (warning (OPT_Wabi_tag, "%qT does not have the %E ABI tag "
1455 "that %qT (used in the type of %qD) has",
1456 p->t, tag, *tp, p->subob))
1457 {
1458 inform (location_of (p->subob), "%qD declared here",
1459 p->subob);
1460 inform (location_of (*tp), "%qT declared here", *tp);
1461 }
1462 }
1463 }
1464}
1465
1466/* Find all the ABI tags in the attribute list ATTR and either call
1467 check_tag (if TP is non-null) or set IDENTIFIER_MARKED to val. */
1468
1469static void
1470mark_or_check_attr_tags (tree attr, tree *tp, abi_tag_data *p, bool val)
1471{
1472 if (!attr)
1473 return;
1474 for (; (attr = lookup_attribute ("abi_tag", attr));
1475 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"
, 1475, __FUNCTION__))->common.chain)
)
1476 for (tree list = TREE_VALUE (attr)((tree_check ((attr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1476, __FUNCTION__, (TREE_LIST)))->list.value)
; list;
1477 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"
, 1477, __FUNCTION__))->common.chain)
)
1478 {
1479 tree tag = TREE_VALUE (list)((tree_check ((list), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1479, __FUNCTION__, (TREE_LIST)))->list.value)
;
1480 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"
, 1480, __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"
, 1480, __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"
, 1480, __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"
, 1480, __FUNCTION__, (STRING_CST)))->string.str))))
;
1481 if (tp)
1482 check_tag (tag, id, tp, p);
1483 else
1484 IDENTIFIER_MARKED (id)((tree_not_check2 (((tree_check ((id), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1484, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1484, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
= val;
1485 }
1486}
1487
1488/* Find all the ABI tags on T and its enclosing scopes and either call
1489 check_tag (if TP is non-null) or set IDENTIFIER_MARKED to val. */
1490
1491static void
1492mark_or_check_tags (tree t, tree *tp, abi_tag_data *p, bool val)
1493{
1494 while (t != global_namespacecp_global_trees[CPTI_GLOBAL])
1495 {
1496 tree attr;
1497 if (TYPE_P (t)(tree_code_type[(int) (((enum tree_code) (t)->base.code))]
== tcc_type)
)
1498 {
1499 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"
, 1499, __FUNCTION__))->type_common.attributes)
;
1500 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"
, 1500, __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"
, 1500, __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"
, 1500, __FUNCTION__))->type_common.context) : cp_global_trees
[CPTI_GLOBAL])
;
1501 }
1502 else
1503 {
1504 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"
, 1504, __FUNCTION__))->decl_common.attributes)
;
1505 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"
, 1505, __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"
, 1505, __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"
, 1505, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])
;
1506 }
1507 mark_or_check_attr_tags (attr, tp, p, val);
1508 }
1509}
1510
1511/* walk_tree callback for check_abi_tags: if the type at *TP involves any
1512 types with ABI tags, add the corresponding identifiers to the VEC in
1513 *DATA and set IDENTIFIER_MARKED. */
1514
1515static tree
1516find_abi_tags_r (tree *tp, int *walk_subtrees, void *data)
1517{
1518 if (TYPE_P (*tp)(tree_code_type[(int) (((enum tree_code) (*tp)->base.code)
)] == tcc_type)
&& *walk_subtrees == 1 && flag_abi_versionglobal_options.x_flag_abi_version != 14)
1519 /* Tell cp_walk_subtrees to look though typedefs. [PR98481] */
1520 *walk_subtrees = 2;
1521
1522 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"
, 1522, __FUNCTION__))->type_common.lang_flag_5)) || ((enum
tree_code) (*tp)->base.code) == ENUMERAL_TYPE)
)
1523 return NULL_TREE(tree) __null;
1524
1525 /* walk_tree shouldn't be walking into any subtrees of a RECORD_TYPE
1526 anyway, but let's make sure of it. */
1527 *walk_subtrees = false;
1528
1529 abi_tag_data *p = static_cast<struct abi_tag_data*>(data);
1530
1531 mark_or_check_tags (*tp, tp, p, false);
1532
1533 return NULL_TREE(tree) __null;
1534}
1535
1536/* walk_tree callback for mark_abi_tags: if *TP is a class, set
1537 IDENTIFIER_MARKED on its ABI tags. */
1538
1539static tree
1540mark_abi_tags_r (tree *tp, int *walk_subtrees, void *data)
1541{
1542 if (TYPE_P (*tp)(tree_code_type[(int) (((enum tree_code) (*tp)->base.code)
)] == tcc_type)
&& *walk_subtrees == 1 && flag_abi_versionglobal_options.x_flag_abi_version != 14)
1543 /* Tell cp_walk_subtrees to look though typedefs. */
1544 *walk_subtrees = 2;
1545
1546 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"
, 1546, __FUNCTION__))->type_common.lang_flag_5)) || ((enum
tree_code) (*tp)->base.code) == ENUMERAL_TYPE)
)
1547 return NULL_TREE(tree) __null;
1548
1549 /* walk_tree shouldn't be walking into any subtrees of a RECORD_TYPE
1550 anyway, but let's make sure of it. */
1551 *walk_subtrees = false;
1552
1553 bool *valp = static_cast<bool*>(data);
1554
1555 mark_or_check_tags (*tp, NULL__null, NULL__null, *valp);
1556
1557 return NULL_TREE(tree) __null;
1558}
1559
1560/* Set IDENTIFIER_MARKED on all the ABI tags on T and its enclosing
1561 scopes. */
1562
1563static void
1564mark_abi_tags (tree t, bool val)
1565{
1566 mark_or_check_tags (t, NULL__null, NULL__null, val);
1567 if (DECL_P (t)(tree_code_type[(int) (((enum tree_code) (t)->base.code))]
== tcc_declaration)
)
1568 {
1569 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"
, 1569, __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"
, 1569, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template)
1570 && 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"
, 1570, __FUNCTION__)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1570, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1570, __FUNCTION__, (TEMPLATE_INFO))))->tmpl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1570, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1570, __FUNCTION__, (TREE_LIST)))->list.value)), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1570, __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"
, 1570, __FUNCTION__)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1570, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1570, __FUNCTION__, (TEMPLATE_INFO))))->tmpl))
)
1571 {
1572 /* Template arguments are part of the signature. */
1573 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"
, 1573, __FUNCTION__)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1573, __FUNCTION__))->decl_common.lang_specific) ->u.
min.template_info)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1573, __FUNCTION__, (TEMPLATE_INFO))))->args), 1))
;
1574 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"
, 1574, __FUNCTION__, (TREE_VEC)))->base.u.length)
; ++j)
1575 {
1576 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"
, 1576, __FUNCTION__)))))
;
1577 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)
;
1578 }
1579 }
1580 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == FUNCTION_DECL)
1581 /* A function's parameter types are part of the signature, so
1582 we don't need to inherit any tags that are also in them. */
1583 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"
, 1583, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1583, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
; arg;
1584 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"
, 1584, __FUNCTION__))->common.chain)
)
1585 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"
, 1585, __FUNCTION__, (TREE_LIST)))->list.value), mark_abi_tags_r
, &val, cp_walk_subtrees)
1586 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"
, 1585, __FUNCTION__, (TREE_LIST)))->list.value), mark_abi_tags_r
, &val, cp_walk_subtrees)
;
1587 }
1588}
1589
1590/* Check that T has all the ABI tags that subobject SUBOB has, or
1591 warn if not. If T is a (variable or function) declaration, also
1592 return any missing tags, and add them to T if JUST_CHECKING is false. */
1593
1594static tree
1595check_abi_tags (tree t, tree subob, bool just_checking = false)
1596{
1597 bool inherit = DECL_P (t)(tree_code_type[(int) (((enum tree_code) (t)->base.code))]
== tcc_declaration)
;
1598
1599 if (!inherit && !warn_abi_tagglobal_options.x_warn_abi_tag)
1600 return NULL_TREE(tree) __null;
1601
1602 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"
, 1602, __FUNCTION__))->type_common.name)
: t;
1603 if (!TREE_PUBLIC (decl)((decl)->base.public_flag))
1604 /* No need to worry about things local to this TU. */
1605 return NULL_TREE(tree) __null;
1606
1607 mark_abi_tags (t, true);
1608
1609 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"
, 1609, __FUNCTION__))->typed.type)
;
1610 struct abi_tag_data data = { t, subob, error_mark_nodeglobal_trees[TI_ERROR_MARK] };
1611 if (inherit)
1612 data.tags = NULL_TREE(tree) __null;
1613
1614 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)
;
1615
1616 if (!(inherit && data.tags))
1617 /* We don't need to do anything with data.tags. */;
1618 else if (just_checking)
1619 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"
, 1619, __FUNCTION__))->common.chain)
)
1620 {
1621 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"
, 1621, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1621, __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"
, 1621, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1621, __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"
, 1621, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1621, __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"
, 1621, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1621, __FUNCTION__, (STRING_CST)))->string.str))))
;
1622 IDENTIFIER_MARKED (id)((tree_not_check2 (((tree_check ((id), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1622, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1622, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
= false;
1623 }
1624 else
1625 {
1626 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"
, 1626, __FUNCTION__))->decl_common.attributes)
);
1627 if (attr)
1628 TREE_VALUE (attr)((tree_check ((attr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1628, __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"
, 1628, __FUNCTION__, (TREE_LIST)))->list.value)
);
1629 else
1630 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"
, 1630, __FUNCTION__))->decl_common.attributes)
1631 = 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"
, 1631, __FUNCTION__))->decl_common.attributes)
);
1632 }
1633
1634 mark_abi_tags (t, false);
1635
1636 return data.tags;
1637}
1638
1639/* Check that DECL has all the ABI tags that are used in parts of its type
1640 that are not reflected in its mangled name. */
1641
1642void
1643check_abi_tags (tree decl)
1644{
1645 if (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL))
1646 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"
, 1646, __FUNCTION__))->typed.type)
);
1647 else if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == FUNCTION_DECL
1648 && !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"
, 1648, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1648, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1648, __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"
, 1648, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1648, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1648, __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"
, 1648, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1648, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1648, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))
1649 && !mangle_return_type_p (decl))
1650 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"
, 1650, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1650, __FUNCTION__))->typed.type)
);
1651}
1652
1653/* Return any ABI tags that are used in parts of the type of DECL
1654 that are not reflected in its mangled name. This function is only
1655 used in backward-compatible mangling for ABI <11. */
1656
1657tree
1658missing_abi_tags (tree decl)
1659{
1660 if (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL))
1661 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"
, 1661, __FUNCTION__))->typed.type)
, true);
1662 else if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == FUNCTION_DECL
1663 /* Don't check DECL_CONV_FN_P here like we do in check_abi_tags, so
1664 that we can use this function for setting need_abi_warning
1665 regardless of the current flag_abi_version. */
1666 && !mangle_return_type_p (decl))
1667 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"
, 1667, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1667, __FUNCTION__))->typed.type)
, true);
1668 else
1669 return NULL_TREE(tree) __null;
1670}
1671
1672void
1673inherit_targ_abi_tags (tree t)
1674{
1675 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"
, 1675, __FUNCTION__))->type_common.lang_flag_5))
1676 || 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"
, 1676, __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"
, 1676, __FUNCTION__))->type_non_common.lang_1))
== NULL_TREE(tree) __null)
1677 return;
1678
1679 mark_abi_tags (t, true);
1680
1681 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"
, 1681, __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"
, 1681, __FUNCTION__))->type_non_common.lang_1))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1681, __FUNCTION__, (TEMPLATE_INFO))))->args
;
1682 struct abi_tag_data data = { t, NULL_TREE(tree) __null, NULL_TREE(tree) __null };
1683 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"
, 1683, __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"
, 1683, __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"
, 1683, __FUNCTION__))))))->base.code) == TREE_VEC) ? ((tree_check
((args), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1683, __FUNCTION__, (TREE_VEC)))->base.u.length) : 1)
; ++i)
1684 {
1685 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"
, 1685, __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"
, 1685, __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"
, 1685, __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"
, 1685, __FUNCTION__))))) : (args))
;
1686 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"
, 1686, __FUNCTION__, (TREE_VEC)))->base.u.length)
; ++j)
1687 {
1688 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"
, 1688, __FUNCTION__)))))
;
1689 data.subob = arg;
1690 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)
;
1691 }
1692 }
1693
1694 // If we found some tags on our template arguments, add them to our
1695 // abi_tag attribute.
1696 if (data.tags)
1697 {
1698 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"
, 1698, __FUNCTION__))->type_common.attributes)
);
1699 if (attr)
1700 TREE_VALUE (attr)((tree_check ((attr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1700, __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"
, 1700, __FUNCTION__, (TREE_LIST)))->list.value)
);
1701 else
1702 TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1702, __FUNCTION__))->type_common.attributes)
1703 = 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"
, 1703, __FUNCTION__))->type_common.attributes)
);
1704 }
1705
1706 mark_abi_tags (t, false);
1707}
1708
1709/* Return true, iff class T has a non-virtual destructor that is
1710 accessible from outside the class heirarchy (i.e. is public, or
1711 there's a suitable friend. */
1712
1713static bool
1714accessible_nvdtor_p (tree t)
1715{
1716 tree dtor = CLASSTYPE_DESTRUCTOR (t)(get_class_binding_direct (t, cp_global_trees[CPTI_DTOR_IDENTIFIER
]))
;
1717
1718 /* An implicitly declared destructor is always public. And,
1719 if it were virtual, we would have created it by now. */
1720 if (!dtor)
1721 return true;
1722
1723 if (DECL_VINDEX (dtor)((tree_check ((dtor), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1723, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
)
1724 return false; /* Virtual */
1725
1726 if (!TREE_PRIVATE (dtor)((dtor)->base.private_flag) && !TREE_PROTECTED (dtor)((dtor)->base.protected_flag))
1727 return true; /* Public */
1728
1729 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"
, 1729, __FUNCTION__))->type_with_lang_specific.lang_specific
))->friend_classes)
1730 || 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"
, 1730, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1730, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1730, __FUNCTION__))->common.chain)))), (TS_DECL_COMMON)
, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1730, __FUNCTION__))->decl_common.initial))
)
1731 return true; /* Has friends */
1732
1733 return false;
1734}
1735
1736/* Run through the base classes of T, updating CANT_HAVE_CONST_CTOR_P,
1737 and NO_CONST_ASN_REF_P. Also set flag bits in T based on
1738 properties of the bases. */
1739
1740static void
1741check_bases (tree t,
1742 int* cant_have_const_ctor_p,
1743 int* no_const_asn_ref_p)
1744{
1745 int i;
1746 bool seen_non_virtual_nearly_empty_base_p = 0;
1747 int seen_tm_mask = 0;
1748 tree base_binfo;
1749 tree binfo;
1750 tree field = NULL_TREE(tree) __null;
1751
1752 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"
, 1752, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
)
1753 for (field = TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1753, __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"
, 1753, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1753, __FUNCTION__))->common.chain))
)
1754 if (TREE_CODE (field)((enum tree_code) (field)->base.code) == FIELD_DECL)
1755 break;
1756
1757 for (binfo = TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1757, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
, i = 0;
1758 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"
, 1758, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)->
iterate ((i), &(base_binfo)))
; i++)
1759 {
1760 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"
, 1760, __FUNCTION__))->typed.type)
;
1761
1762 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"
, 1762, __FUNCTION__))->type_common.size) != (tree) __null
)) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1762, __FUNCTION__), 0 : 0))
;
1763
1764 if (CLASSTYPE_FINAL (basetype)((tree_check3 ((basetype), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1764, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->base.default_def_flag)
)
1765 error ("cannot derive from %<final%> base %qT in derived type %qT",
1766 basetype, t);
1767
1768 /* If any base class is non-literal, so is the derived class. */
1769 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"
, 1769, __FUNCTION__))->type_with_lang_specific.lang_specific
))->is_literal)
)
1770 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"
, 1770, __FUNCTION__))->type_with_lang_specific.lang_specific
))->is_literal)
= false;
1771
1772 /* If the base class doesn't have copy constructors or
1773 assignment operators that take const references, then the
1774 derived class cannot have such a member automatically
1775 generated. */
1776 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"
, 1776, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
1777 && ! 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"
, 1777, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_const_copy_ctor)
)
1778 *cant_have_const_ctor_p = 1;
1779 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"
, 1779, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
1780 && !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"
, 1780, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_const_copy_assign)
)
1781 *no_const_asn_ref_p = 1;
1782
1783 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"
, 1783, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
1784 /* A virtual base does not effect nearly emptiness. */
1785 ;
1786 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"
, 1786, __FUNCTION__))->type_with_lang_specific.lang_specific
))->nearly_empty_p)
)
1787 {
1788 if (seen_non_virtual_nearly_empty_base_p)
1789 /* And if there is more than one nearly empty base, then the
1790 derived class is not nearly empty either. */
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 else
1793 /* Remember we've seen one. */
1794 seen_non_virtual_nearly_empty_base_p = 1;
1795 }
1796 else if (!is_empty_class (basetype))
1797 /* If the base class is not empty or nearly empty, then this
1798 class cannot be nearly empty. */
1799 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"
, 1799, __FUNCTION__))->type_with_lang_specific.lang_specific
))->nearly_empty_p)
= 0;
1800
1801 /* A lot of properties from the bases also apply to the derived
1802 class. */
1803 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"
, 1803, __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"
, 1803, __FUNCTION__))->type_common.needs_constructing_flag
)
;
1804 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"
, 1804, __FUNCTION__))->type_common.lang_flag_4))
1805 |= 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"
, 1805, __FUNCTION__))->type_common.lang_flag_4))
;
1806 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"
, 1806, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_assign)
1807 |= (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"
, 1807, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_assign)
1808 || !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"
, 1808, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
);
1809 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"
, 1809, __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"
, 1809, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_ctor)
1810 || !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"
, 1810, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
);
1811 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"
, 1811, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_assign)
1812 |= 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"
, 1812, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_assign)
;
1813 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"
, 1813, __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"
, 1813, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_ctor)
;
1814 TYPE_POLYMORPHIC_P (t)(((tree_not_check2 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1814, __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"
, 1814, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
;
1815 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"
, 1815, __FUNCTION__))->type_with_lang_specific.lang_specific
))->contains_empty_class_p)
1816 |= 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"
, 1816, __FUNCTION__))->type_with_lang_specific.lang_specific
))->contains_empty_class_p)
;
1817 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"
, 1817, __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"
, 1817, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_default_ctor)
1818 || 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"
, 1818, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_dflt)
);
1819 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"
, 1821, __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"
, 1820, __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"
, 1820, __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"
, 1821, __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"
, 1821, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0)))
1820 (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"
, 1821, __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"
, 1820, __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"
, 1820, __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"
, 1821, __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"
, 1821, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0)))
1821 | 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"
, 1821, __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"
, 1820, __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"
, 1820, __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"
, 1821, __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"
, 1821, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0)))
;
1822 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"
, 1824, __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"
, 1823, __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"
, 1823, __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"
, 1824, __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"
, 1824, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init : 0)))
1823 (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"
, 1824, __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"
, 1823, __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"
, 1823, __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"
, 1824, __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"
, 1824, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init : 0)))
1824 | 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"
, 1824, __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"
, 1823, __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"
, 1823, __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"
, 1824, __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"
, 1824, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init : 0)))
;
1825 if (TYPE_HAS_MUTABLE_P (basetype)(cp_has_mutable_p (basetype)))
1826 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"
, 1826, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_mutable)
= 1;
1827
1828 /* A standard-layout class is a class that:
1829 ...
1830 * has no non-standard-layout base classes, */
1831 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"
, 1831, __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"
, 1831, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
;
1832 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"
, 1832, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
)
1833 {
1834 tree basefield;
1835 /* ...has no base classes of the same type as the first non-static
1836 data member... */
1837 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"
, 1837, __FUNCTION__))->decl_minimal.context)
== t
1838 && (same_type_ignoring_top_level_qualifiers_p
1839 (TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1839, __FUNCTION__))->typed.type)
, basetype)))
1840 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"
, 1840, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
= 1;
1841 /* DR 1813:
1842 ...has at most one base class subobject of any given type... */
1843 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"
, 1843, __FUNCTION__))->type_with_lang_specific.lang_specific
))->repeated_base)
)
1844 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"
, 1844, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
= 1;
1845 else
1846 /* ...has all non-static data members and bit-fields in the class
1847 and its base classes first declared in the same class. */
1848 for (basefield = TYPE_FIELDS (basetype)((tree_check3 ((basetype), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1848, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
; basefield;
1849 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"
, 1849, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1849, __FUNCTION__))->common.chain))
)
1850 if (TREE_CODE (basefield)((enum tree_code) (basefield)->base.code) == FIELD_DECL
1851 && !(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"
, 1851, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1851, __FUNCTION__))->decl_common.lang_flag_6)
1852 && is_empty_field (basefield)))
1853 {
1854 if (field)
1855 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"
, 1855, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
= 1;
1856 else
1857 field = basefield;
1858 break;
1859 }
1860 }
1861
1862 /* Don't bother collecting tm attributes if transactional memory
1863 support is not enabled. */
1864 if (flag_tmglobal_options.x_flag_tm)
1865 {
1866 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"
, 1866, __FUNCTION__))->type_common.attributes)
);
1867 if (tm_attr)
1868 seen_tm_mask |= tm_attr_to_mask (tm_attr);
1869 }
1870
1871 check_abi_tags (t, basetype);
1872 }
1873
1874 /* If one of the base classes had TM attributes, and the current class
1875 doesn't define its own, then the current class inherits one. */
1876 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"
, 1876, __FUNCTION__))->type_common.attributes)
))
1877 {
1878 tree tm_attr = tm_mask_to_attr (least_bit_hwi (seen_tm_mask));
1879 TYPE_ATTRIBUTES (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1879, __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"
, 1879, __FUNCTION__))->type_common.attributes)
);
1880 }
1881}
1882
1883/* Determine all the primary bases within T. Sets BINFO_PRIMARY_BASE_P for
1884 those that are primaries. Sets BINFO_LOST_PRIMARY_P for those
1885 that have had a nearly-empty virtual primary base stolen by some
1886 other base in the hierarchy. Determines CLASSTYPE_PRIMARY_BASE for
1887 T. */
1888
1889static void
1890determine_primary_bases (tree t)
1891{
1892 unsigned i;
1893 tree primary = NULL_TREE(tree) __null;
1894 tree type_binfo = TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1894, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
1895 tree base_binfo;
1896
1897 /* Determine the primary bases of our bases. */
1898 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"
, 1898, __FUNCTION__))->common.chain)
; base_binfo;
1899 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"
, 1899, __FUNCTION__))->common.chain)
)
1900 {
1901 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"
, 1901, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1901, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1901, __FUNCTION__))->type_with_lang_specific.lang_specific
))->primary_base)
;
1902
1903 /* See if we're the non-virtual primary of our inheritance
1904 chain. */
1905 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"
, 1905, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
1906 {
1907 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"
, 1907, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
;
1908 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"
, 1908, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1908, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1908, __FUNCTION__))->type_with_lang_specific.lang_specific
))->primary_base)
;
1909
1910 if (parent_primary
1911 && 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"
, 1911, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1911, __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"
, 1912, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1912, __FUNCTION__))->typed.type)))
1912 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"
, 1911, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1911, __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"
, 1912, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1912, __FUNCTION__))->typed.type)))
)
1913 /* We are the primary binfo. */
1914 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"
, 1914, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1914, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
= 1;
1915 }
1916 /* Determine if we have a virtual primary base, and mark it so.
1917 */
1918 if (primary && BINFO_VIRTUAL_P (primary)((tree_check ((primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1918, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
1919 {
1920 tree this_primary = copied_binfo (primary, base_binfo);
1921
1922 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"
, 1922, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1922, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
)
1923 /* Someone already claimed this base. */
1924 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"
, 1924, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1924, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
= 1;
1925 else
1926 {
1927 tree delta;
1928
1929 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"
, 1929, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1929, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
= 1;
1930 BINFO_INHERITANCE_CHAIN (this_primary)((tree_check ((this_primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1930, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
= base_binfo;
1931
1932 /* A virtual binfo might have been copied from within
1933 another hierarchy. As we're about to use it as a
1934 primary base, make sure the offsets match. */
1935 delta = size_diffop_loc (input_location,
1936 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"
, 1937, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
1937 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"
, 1937, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
,
1938 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"
, 1939, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
1939 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"
, 1939, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
);
1940
1941 propagate_binfo_offsets (this_primary, delta);
1942 }
1943 }
1944 }
1945
1946 /* First look for a dynamic direct non-virtual base. */
1947 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"
, 1947, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)->
iterate ((i), &(base_binfo)))
; i++)
1948 {
1949 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"
, 1949, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1949, __FUNCTION__))->typed.type)
;
1950
1951 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"
, 1951, __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"
, 1951, __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"
, 1951, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
1952 {
1953 primary = base_binfo;
1954 goto found;
1955 }
1956 }
1957
1958 /* A "nearly-empty" virtual base class can be the primary base
1959 class, if no non-virtual polymorphic base can be found. Look for
1960 a nearly-empty virtual dynamic base that is not already a primary
1961 base of something in the hierarchy. If there is no such base,
1962 just pick the first nearly-empty virtual base. */
1963
1964 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"
, 1964, __FUNCTION__))->common.chain)
; base_binfo;
1965 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"
, 1965, __FUNCTION__))->common.chain)
)
1966 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"
, 1966, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
1967 && 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"
, 1967, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1967, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1967, __FUNCTION__))->type_with_lang_specific.lang_specific
))->nearly_empty_p)
)
1968 {
1969 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"
, 1969, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1969, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
)
1970 {
1971 /* Found one that is not primary. */
1972 primary = base_binfo;
1973 goto found;
1974 }
1975 else if (!primary)
1976 /* Remember the first candidate. */
1977 primary = base_binfo;
1978 }
1979
1980 found:
1981 /* If we've got a primary base, use it. */
1982 if (primary)
1983 {
1984 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"
, 1984, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1984, __FUNCTION__))->typed.type)
;
1985
1986 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"
, 1986, __FUNCTION__))->type_with_lang_specific.lang_specific
))->primary_base)
= primary;
1987 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"
, 1987, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1987, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
)
1988 /* We are stealing a primary base. */
1989 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"
, 1989, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1989, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1989, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
= 1;
1990 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"
, 1990, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1990, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
= 1;
1991 if (BINFO_VIRTUAL_P (primary)((tree_check ((primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1991, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
1992 {
1993 tree delta;
1994
1995 BINFO_INHERITANCE_CHAIN (primary)((tree_check ((primary), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 1995, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
= type_binfo;
1996 /* A virtual binfo might have been copied from within
1997 another hierarchy. As we're about to use it as a primary
1998 base, make sure the offsets match. */
1999 delta = size_diffop_loc (input_location, ssize_int (0)size_int_kind (0, stk_ssizetype),
2000 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"
, 2000, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
);
2001
2002 propagate_binfo_offsets (primary, delta);
2003 }
2004
2005 primary = TYPE_BINFO (basetype)((tree_check3 ((basetype), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2005, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
2006
2007 TYPE_VFIELD (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2007, __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"
, 2007, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.minval)
;
2008 BINFO_VTABLE (type_binfo)((tree_check ((type_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2008, __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"
, 2008, __FUNCTION__, (TREE_BINFO)))->binfo.vtable)
;
2009 BINFO_VIRTUALS (type_binfo)((tree_check ((type_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2009, __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"
, 2009, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
;
2010 }
2011}
2012
2013/* Update the variant types of T. */
2014
2015void
2016fixup_type_variants (tree type)
2017{
2018 if (!type)
2019 return;
2020
2021 for (tree variant = TYPE_NEXT_VARIANT (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2021, __FUNCTION__))->type_common.next_variant)
;
2022 variant;
2023 variant = TYPE_NEXT_VARIANT (variant)((tree_class_check ((variant), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2023, __FUNCTION__))->type_common.next_variant)
)
2024 {
2025 /* These fields are in the _TYPE part of the node, not in
2026 the TYPE_LANG_SPECIFIC component, so they are not shared. */
2027 TYPE_HAS_USER_CONSTRUCTOR (variant)(((tree_class_check ((variant), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2027, __FUNCTION__))->type_common.lang_flag_1))
= TYPE_HAS_USER_CONSTRUCTOR (type)(((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2027, __FUNCTION__))->type_common.lang_flag_1))
;
2028 TYPE_NEEDS_CONSTRUCTING (variant)((tree_class_check ((variant), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2028, __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"
, 2028, __FUNCTION__))->type_common.needs_constructing_flag
)
;
2029 TYPE_HAS_NONTRIVIAL_DESTRUCTOR (variant)(((tree_class_check ((variant), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2029, __FUNCTION__))->type_common.lang_flag_4))
2030 = 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"
, 2030, __FUNCTION__))->type_common.lang_flag_4))
;
2031
2032 TYPE_POLYMORPHIC_P (variant)(((tree_not_check2 ((variant), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2032, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
= TYPE_POLYMORPHIC_P (type)(((tree_not_check2 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2032, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
;
2033 CLASSTYPE_FINAL (variant)((tree_check3 ((variant), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2033, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->base.default_def_flag)
= CLASSTYPE_FINAL (type)((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2033, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->base.default_def_flag)
;
2034
2035 TYPE_BINFO (variant)((tree_check3 ((variant), "/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.maxval)
= TYPE_BINFO (type)((tree_check3 ((type), "/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.maxval)
;
2036
2037 /* Copy whatever these are holding today. */
2038 TYPE_VFIELD (variant)((tree_check3 ((variant), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2038, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.minval)
= TYPE_VFIELD (type)((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2038, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.minval)
;
2039 TYPE_FIELDS (variant)((tree_check3 ((variant), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2039, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
= TYPE_FIELDS (type)((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2039, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
;
2040
2041 TYPE_SIZE (variant)((tree_class_check ((variant), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2041, __FUNCTION__))->type_common.size)
= TYPE_SIZE (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2041, __FUNCTION__))->type_common.size)
;
2042 TYPE_SIZE_UNIT (variant)((tree_class_check ((variant), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2042, __FUNCTION__))->type_common.size_unit)
= TYPE_SIZE_UNIT (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2042, __FUNCTION__))->type_common.size_unit)
;
2043
2044 if (!TYPE_USER_ALIGN (variant)((tree_class_check ((variant), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2044, __FUNCTION__))->base.u.bits.user_align)
2045 || TYPE_NAME (variant)((tree_class_check ((variant), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2045, __FUNCTION__))->type_common.name)
== TYPE_NAME (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2045, __FUNCTION__))->type_common.name)
2046 || TYPE_ALIGN_RAW (variant)((tree_class_check ((variant), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2046, __FUNCTION__))->type_common.align)
< TYPE_ALIGN_RAW (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2046, __FUNCTION__))->type_common.align)
)
2047 {
2048 TYPE_ALIGN_RAW (variant)((tree_class_check ((variant), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2048, __FUNCTION__))->type_common.align)
= TYPE_ALIGN_RAW (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2048, __FUNCTION__))->type_common.align)
;
2049 TYPE_USER_ALIGN (variant)((tree_class_check ((variant), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2049, __FUNCTION__))->base.u.bits.user_align)
= TYPE_USER_ALIGN (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2049, __FUNCTION__))->base.u.bits.user_align)
;
2050 }
2051
2052 TYPE_PRECISION (variant)((tree_class_check ((variant), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2052, __FUNCTION__))->type_common.precision)
= TYPE_PRECISION (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2052, __FUNCTION__))->type_common.precision)
;
2053 TYPE_MODE_RAW (variant)((tree_class_check ((variant), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2053, __FUNCTION__))->type_common.mode)
= TYPE_MODE_RAW (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2053, __FUNCTION__))->type_common.mode)
;
2054 TYPE_EMPTY_P (variant)((tree_class_check ((variant), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2054, __FUNCTION__))->type_common.empty_flag)
= TYPE_EMPTY_P (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2054, __FUNCTION__))->type_common.empty_flag)
;
2055 }
2056}
2057
2058/* KLASS is a class that we're applying may_alias to after the body is
2059 parsed. Fixup any POINTER_TO and REFERENCE_TO types. The
2060 canonical type(s) will be implicitly updated. */
2061
2062static void
2063fixup_may_alias (tree klass)
2064{
2065 tree t, v;
2066
2067 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"
, 2067, __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"
, 2067, __FUNCTION__, (POINTER_TYPE)))->type_non_common.minval
)
)
2068 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"
, 2068, __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"
, 2068, __FUNCTION__))->type_common.next_variant)
)
2069 TYPE_REF_CAN_ALIAS_ALL (v)((tree_check2 ((v), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2069, __FUNCTION__, (POINTER_TYPE), (REFERENCE_TYPE)))->
base.static_flag)
= true;
2070 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"
, 2070, __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"
, 2070, __FUNCTION__, (REFERENCE_TYPE)))->type_non_common.
minval)
)
2071 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"
, 2071, __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"
, 2071, __FUNCTION__))->type_common.next_variant)
)
2072 TYPE_REF_CAN_ALIAS_ALL (v)((tree_check2 ((v), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2072, __FUNCTION__, (POINTER_TYPE), (REFERENCE_TYPE)))->
base.static_flag)
= true;
2073}
2074
2075/* Early variant fixups: we apply attributes at the beginning of the class
2076 definition, and we need to fix up any variants that have already been
2077 made via elaborated-type-specifier so that check_qualified_type works. */
2078
2079void
2080fixup_attribute_variants (tree t)
2081{
2082 tree variants;
2083
2084 if (!t)
2085 return;
2086
2087 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"
, 2087, __FUNCTION__))->type_common.attributes)
;
2088 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"
, 2088, __FUNCTION__))->type_common.align) ? ((unsigned)1)
<< (((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2088, __FUNCTION__))->type_common.align) - 1) : 0)
;
2089 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"
, 2089, __FUNCTION__))->base.u.bits.user_align)
;
2090 bool may_alias = lookup_attribute ("may_alias", attrs);
2091 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"
, 2091, __FUNCTION__))->base.u.bits.packed_flag)
;
2092
2093 if (may_alias)
2094 fixup_may_alias (t);
2095
2096 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"
, 2096, __FUNCTION__))->type_common.next_variant)
;
2097 variants;
2098 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"
, 2098, __FUNCTION__))->type_common.next_variant)
)
2099 {
2100 /* These are the two fields that check_qualified_type looks at and
2101 are affected by attributes. */
2102 TYPE_ATTRIBUTES (variants)((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2102, __FUNCTION__))->type_common.attributes)
= attrs;
2103 unsigned valign = align;
2104 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"
, 2104, __FUNCTION__))->base.u.bits.user_align)
)
2105 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"
, 2105, __FUNCTION__))->type_common.align) ? ((unsigned)1)
<< (((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2105, __FUNCTION__))->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"
, 2105, __FUNCTION__))->type_common.align) ? ((unsigned)1)
<< (((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2105, __FUNCTION__))->type_common.align) - 1) : 0)))
;
2106 else
2107 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"
, 2107, __FUNCTION__))->base.u.bits.user_align)
= user_align;
2108 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"
, 2108, __FUNCTION__))->type_common.align = ffs_hwi (valign
))
;
2109 TYPE_PACKED (variants)((tree_class_check ((variants), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2109, __FUNCTION__))->base.u.bits.packed_flag)
= packed;
2110 if (may_alias)
2111 fixup_may_alias (variants);
2112 }
2113}
2114
2115/* Set memoizing fields and bits of T (and its variants) for later
2116 use. */
2117
2118static void
2119finish_struct_bits (tree t)
2120{
2121 /* Fix up variants (if any). */
2122 fixup_type_variants (t);
2123
2124 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"
, 2124, __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"
, 2124, __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"
, 2124, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
)
2125 /* For a class w/o baseclasses, 'finish_struct' has set
2126 CLASSTYPE_PURE_VIRTUALS correctly (by definition).
2127 Similarly for a class whose base classes do not have vtables.
2128 When neither of these is true, we might have removed abstract
2129 virtuals (by providing a definition), added some (by declaring
2130 new ones), or redeclared ones from a base class. We need to
2131 recalculate what's really an abstract virtual at this point (by
2132 looking in the vtables). */
2133 get_pure_virtuals (t);
2134
2135 /* If this type has a copy constructor or a destructor, force its
2136 mode to be BLKmode, and force its TREE_ADDRESSABLE bit to be
2137 nonzero. This will cause it to be passed by invisible reference
2138 and prevent it from being returned in a register. */
2139 if (type_has_nontrivial_copy_init (t)
2140 || 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"
, 2140, __FUNCTION__))->type_common.lang_flag_4))
)
2141 {
2142 tree variants;
2143 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"
, 2143, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2143, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2143, __FUNCTION__))->common.chain)))), (TS_DECL_COMMON)
, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2143, __FUNCTION__))->decl_common.mode = (((void) 0, E_BLKmode
)))
;
2144 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"
, 2144, __FUNCTION__))->type_common.next_variant)
)
2145 {
2146 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"
, 2146, __FUNCTION__))->type_common.mode = (((void) 0, E_BLKmode
)))
;
2147 TREE_ADDRESSABLE (variants)((variants)->base.addressable_flag) = 1;
2148 }
2149 }
2150}
2151
2152/* Issue warnings about T having private constructors, but no friends,
2153 and so forth.
2154
2155 HAS_NONPRIVATE_METHOD is nonzero if T has any non-private methods or
2156 static members. HAS_NONPRIVATE_STATIC_FN is nonzero if T has any
2157 non-private static member functions. */
2158
2159static void
2160maybe_warn_about_overly_private_class (tree t)
2161{
2162 int has_member_fn = 0;
2163 int has_nonprivate_method = 0;
2164 bool nonprivate_ctor = false;
2165
2166 if (!warn_ctor_dtor_privacyglobal_options.x_warn_ctor_dtor_privacy
2167 /* If the class has friends, those entities might create and
2168 access instances, so we should not warn. */
2169 || (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"
, 2169, __FUNCTION__))->type_with_lang_specific.lang_specific
))->friend_classes)
2170 || 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"
, 2170, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2170, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2170, __FUNCTION__))->common.chain)))), (TS_DECL_COMMON)
, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2170, __FUNCTION__))->decl_common.initial))
)
2171 /* We will have warned when the template was declared; there's
2172 no need to warn on every instantiation. */
2173 || 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"
, 2173, __FUNCTION__))->type_with_lang_specific.lang_specific
))->use_template) & 1)
)
2174 /* There's no reason to even consider warning about this
2175 class. */
2176 return;
2177
2178 /* We only issue one warning, if more than one applies, because
2179 otherwise, on code like:
2180
2181 class A {
2182 // Oops - forgot `public:'
2183 A();
2184 A(const A&);
2185 ~A();
2186 };
2187
2188 we warn several times about essentially the same problem. */
2189
2190 /* Check to see if all (non-constructor, non-destructor) member
2191 functions are private. (Since there are no friends or
2192 non-private statics, we can't ever call any of the private member
2193 functions.) */
2194 for (tree fn = TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2194, __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"
, 2194, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2194, __FUNCTION__))->common.chain))
)
2195 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == USING_DECL
2196 && 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"
, 2196, __FUNCTION__))->decl_minimal.name)
== ctor_identifiercp_global_trees[CPTI_CTOR_IDENTIFIER]
2197 && !TREE_PRIVATE (fn)((fn)->base.private_flag))
2198 nonprivate_ctor = true;
2199 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"
, 2199, __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"
, 2199, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL))
)
2200 /* Not a function. */;
2201 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"
, 2201, __FUNCTION__))->decl_common.artificial_flag)
)
2202 /* We're not interested in compiler-generated methods; they don't
2203 provide any way to call private members. */;
2204 else if (!TREE_PRIVATE (fn)((fn)->base.private_flag))
2205 {
2206 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"
, 2206, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2206, __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"
, 2206, __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"
, 2206, __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"
, 2206, __FUNCTION__); &lt->u.fn; })->static_function
)
)
2207 /* A non-private static member function is just like a
2208 friend; it can create and invoke private member
2209 functions, and be accessed without a class
2210 instance. */
2211 return;
2212
2213 has_nonprivate_method = 1;
2214 /* Keep searching for a static member function. */
2215 }
2216 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"
, 2216, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2216, __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"
, 2216, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2216, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
)
2217 has_member_fn = 1;
2218
2219 if (!has_nonprivate_method && has_member_fn)
2220 {
2221 /* There are no non-private methods, and there's at least one
2222 private member function that isn't a constructor or
2223 destructor. (If all the private members are
2224 constructors/destructors we want to use the code below that
2225 issues error messages specifically referring to
2226 constructors/destructors.) */
2227 unsigned i;
2228 tree binfo = TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2228, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
2229
2230 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"
, 2230, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)->
length ())
; i++)
2231 if (BINFO_BASE_ACCESS (binfo, i)(*((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2231, __FUNCTION__, (TREE_BINFO)))->binfo.base_accesses)
)[(i)]
!= access_private_nodeglobal_trees[TI_PRIVATE])
2232 {
2233 has_nonprivate_method = 1;
2234 break;
2235 }
2236 if (!has_nonprivate_method)
2237 {
2238 warning (OPT_Wctor_dtor_privacy,
2239 "all member functions in class %qT are private", t);
2240 return;
2241 }
2242 }
2243
2244 /* Even if some of the member functions are non-private, the class
2245 won't be useful for much if all the constructors or destructors
2246 are private: such an object can never be created or destroyed. */
2247 if (tree dtor = CLASSTYPE_DESTRUCTOR (t)(get_class_binding_direct (t, cp_global_trees[CPTI_DTOR_IDENTIFIER
]))
)
2248 if (TREE_PRIVATE (dtor)((dtor)->base.private_flag))
2249 {
2250 warning (OPT_Wctor_dtor_privacy,
2251 "%q#T only defines a private destructor and has no friends",
2252 t);
2253 return;
2254 }
2255
2256 /* Warn about classes that have private constructors and no friends. */
2257 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"
, 2257, __FUNCTION__))->type_common.lang_flag_1))
2258 /* Implicitly generated constructors are always public. */
2259 && !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"
, 2259, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_default_ctor)
)
2260 {
2261 tree copy_or_move = NULL_TREE(tree) __null;
2262
2263 /* If a non-template class does not define a copy
2264 constructor, one is defined for it, enabling it to avoid
2265 this warning. For a template class, this does not
2266 happen, and so we would normally get a warning on:
2267
2268 template <class T> class C { private: C(); };
2269
2270 To avoid this asymmetry, we check TYPE_HAS_COPY_CTOR. All
2271 complete non-template or fully instantiated classes have this
2272 flag set. */
2273 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"
, 2273, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
)
2274 nonprivate_ctor = true;
2275 else
2276 for (tree fn : ovl_range (CLASSTYPE_CONSTRUCTORS (t)(get_class_binding_direct (t, cp_global_trees[CPTI_CTOR_IDENTIFIER
]))
))
2277 if (TREE_PRIVATE (fn)((fn)->base.private_flag))
2278 continue;
2279 else if (copy_fn_p (fn) || move_fn_p (fn))
2280 /* Ideally, we wouldn't count any constructor that takes
2281 an argument of the class type as a parameter, because
2282 such things cannot be used to construct an instance of
2283 the class unless you already have one. */
2284 copy_or_move = fn;
2285 else
2286 {
2287 nonprivate_ctor = true;
2288 break;
2289 }
2290
2291 if (!nonprivate_ctor)
2292 {
2293 bool w = warning (OPT_Wctor_dtor_privacy,
2294 "%q#T only defines private constructors and has "
2295 "no friends", t);
2296 if (w && copy_or_move)
2297 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"
, 2297, __FUNCTION__))->decl_minimal.locus)
,
2298 "%q#D is public, but requires an existing %q#T object",
2299 copy_or_move, t);
2300 return;
2301 }
2302 }
2303}
2304
2305/* Make BINFO's vtable have N entries, including RTTI entries,
2306 vbase and vcall offsets, etc. Set its type and call the back end
2307 to lay it out. */
2308
2309static void
2310layout_vtable_decl (tree binfo, int n)
2311{
2312 tree atype;
2313 tree vtable;
2314
2315 atype = build_array_of_n_type (vtable_entry_typecp_global_trees[CPTI_VTABLE_ENTRY_TYPE], n);
2316 layout_type (atype);
2317
2318 /* We may have to grow the vtable. */
2319 vtable = get_vtbl_decl_for_binfo (binfo);
2320 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"
, 2320, __FUNCTION__))->typed.type)), (atype), 0)
)
2321 {
2322 TREE_TYPE (vtable)((contains_struct_check ((vtable), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2322, __FUNCTION__))->typed.type)
= atype;
2323 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"
, 2323, __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"
, 2323, __FUNCTION__))->decl_common.size_unit)
= NULL_TREE(tree) __null;
2324 layout_decl (vtable, 0);
2325 }
2326}
2327
2328/* True iff FNDECL and BASE_FNDECL (both non-static member functions)
2329 have the same signature. */
2330
2331int
2332same_signature_p (const_tree fndecl, const_tree base_fndecl)
2333{
2334 /* One destructor overrides another if they are the same kind of
2335 destructor. */
2336 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"
, 2336, __FUNCTION__, (TEMPLATE_DECL))))))))->result : base_fndecl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2336, __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"
, 2336, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fndecl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2336, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
2337 && special_function_p (base_fndecl) == special_function_p (fndecl))
2338 return 1;
2339 /* But a non-destructor never overrides a destructor, nor vice
2340 versa, nor do different kinds of destructors override
2341 one-another. For example, a complete object destructor does not
2342 override a deleting destructor. */
2343 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"
, 2343, __FUNCTION__, (TEMPLATE_DECL))))))))->result : base_fndecl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2343, __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"
, 2343, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fndecl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2343, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
)
2344 return 0;
2345
2346 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"
, 2346, __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"
, 2346, __FUNCTION__))->decl_minimal.name)
2347 || (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"
, 2347, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2347, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2347, __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"
, 2347, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2347, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2347, __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"
, 2347, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2347, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2347, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))
2348 && 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"
, 2348, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2348, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2348, __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"
, 2348, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2348, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2348, __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"
, 2348, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2348, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2348, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))
2349 && 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"
, 2349, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2349, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2349, __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"
, 2349, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2349, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2349, __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"
, 2349, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2349, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2349, __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"
, 2349, __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"
, 2349, __FUNCTION__))->decl_minimal.name))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2349, __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"
, 2350, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2350, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2350, __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"
, 2350, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2350, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2350, __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"
, 2350, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2350, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2350, __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"
, 2350, __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"
, 2350, __FUNCTION__))->decl_minimal.name))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2350, __FUNCTION__))->typed.type)), 0)
2350 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"
, 2349, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2349, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2349, __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"
, 2349, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2349, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2349, __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"
, 2349, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2349, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2349, __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"
, 2349, __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"
, 2349, __FUNCTION__))->decl_minimal.name))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2349, __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"
, 2350, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2350, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2350, __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"
, 2350, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2350, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2350, __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"
, 2350, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2350, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2350, __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"
, 2350, __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"
, 2350, __FUNCTION__))->decl_minimal.name))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2350, __FUNCTION__))->typed.type)), 0)
))
2351 {
2352 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"
, 2352, __FUNCTION__))->typed.type)
;
2353 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"
, 2353, __FUNCTION__))->typed.type)
;
2354 if (type_memfn_quals (fntype) == type_memfn_quals (base_fntype)
2355 && type_memfn_rqual (fntype) == type_memfn_rqual (base_fntype)
2356 && 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"
, 2356, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2356, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
,
2357 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"
, 2357, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2357, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
))
2358 return 1;
2359 }
2360 return 0;
2361}
2362
2363/* Returns TRUE if DERIVED is a binfo containing the binfo BASE as a
2364 subobject. */
2365
2366static bool
2367base_derived_from (tree derived, tree base)
2368{
2369 tree probe;
2370
2371 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"
, 2371, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
)
2372 {
2373 if (probe == derived)
2374 return true;
2375 else if (BINFO_VIRTUAL_P (probe)((tree_check ((probe), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2375, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
2376 /* If we meet a virtual base, we can't follow the inheritance
2377 any more. See if the complete type of DERIVED contains
2378 such a virtual base. */
2379 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"
, 2379, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2379, __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"
, 2379, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2379, __FUNCTION__))->typed.type)
)
2380 != NULL_TREE(tree) __null);
2381 }
2382 return false;
2383}
2384
2385struct find_final_overrider_data {
2386 /* The function for which we are trying to find a final overrider. */
2387 tree fn;
2388 /* The base class in which the function was declared. */
2389 tree declaring_base;
2390 /* The candidate overriders. */
2391 tree candidates;
2392 /* Path to most derived. */
2393 auto_vec<tree> path;
2394};
2395
2396/* Add the overrider along the current path to FFOD->CANDIDATES.
2397 Returns true if an overrider was found; false otherwise. */
2398
2399static bool
2400dfs_find_final_overrider_1 (tree binfo,
2401 find_final_overrider_data *ffod,
2402 unsigned depth)
2403{
2404 tree method;
2405
2406 /* If BINFO is not the most derived type, try a more derived class.
2407 A definition there will overrider a definition here. */
2408 if (depth)
2409 {
2410 depth--;
2411 if (dfs_find_final_overrider_1
2412 (ffod->path[depth], ffod, depth))
2413 return true;
2414 }
2415
2416 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"
, 2416, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2416, __FUNCTION__))->typed.type)
, ffod->fn);
2417 if (method)
2418 {
2419 tree *candidate = &ffod->candidates;
2420
2421 /* Remove any candidates overridden by this new function. */
2422 while (*candidate)
2423 {
2424 /* If *CANDIDATE overrides METHOD, then METHOD
2425 cannot override anything else on the list. */
2426 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"
, 2426, __FUNCTION__, (TREE_LIST)))->list.value)
, binfo))
2427 return true;
2428 /* If METHOD overrides *CANDIDATE, remove *CANDIDATE. */
2429 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"
, 2429, __FUNCTION__, (TREE_LIST)))->list.value)
))
2430 *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"
, 2430, __FUNCTION__))->common.chain)
;
2431 else
2432 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"
, 2432, __FUNCTION__))->common.chain)
;
2433 }
2434
2435 /* Add the new function. */
2436 ffod->candidates = tree_cons (method, binfo, ffod->candidates);
2437 return true;
2438 }
2439
2440 return false;
2441}
2442
2443/* Called from find_final_overrider via dfs_walk. */
2444
2445static tree
2446dfs_find_final_overrider_pre (tree binfo, void *data)
2447{
2448 find_final_overrider_data *ffod = (find_final_overrider_data *) data;
2449
2450 if (binfo == ffod->declaring_base)
2451 dfs_find_final_overrider_1 (binfo, ffod, ffod->path.length ());
2452 ffod->path.safe_push (binfo);
2453
2454 return NULL_TREE(tree) __null;
2455}
2456
2457static tree
2458dfs_find_final_overrider_post (tree /*binfo*/, void *data)
2459{
2460 find_final_overrider_data *ffod = (find_final_overrider_data *) data;
2461 ffod->path.pop ();
2462
2463 return NULL_TREE(tree) __null;
2464}
2465
2466/* Returns a TREE_LIST whose TREE_PURPOSE is the final overrider for
2467 FN and whose TREE_VALUE is the binfo for the base where the
2468 overriding occurs. BINFO (in the hierarchy dominated by the binfo
2469 DERIVED) is the base object in which FN is declared. */
2470
2471static tree
2472find_final_overrider (tree derived, tree binfo, tree fn)
2473{
2474 find_final_overrider_data ffod;
2475
2476 /* Getting this right is a little tricky. This is valid:
2477
2478 struct S { virtual void f (); };
2479 struct T { virtual void f (); };
2480 struct U : public S, public T { };
2481
2482 even though calling `f' in `U' is ambiguous. But,
2483
2484 struct R { virtual void f(); };
2485 struct S : virtual public R { virtual void f (); };
2486 struct T : virtual public R { virtual void f (); };
2487 struct U : public S, public T { };
2488
2489 is not -- there's no way to decide whether to put `S::f' or
2490 `T::f' in the vtable for `R'.
2491
2492 The solution is to look at all paths to BINFO. If we find
2493 different overriders along any two, then there is a problem. */
2494 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"
, 2494, __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"
, 2494, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2494, __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"
, 2494, __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"
, 2494, __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"
, 2494, __FUNCTION__); &lt->u.fn; })->thunk_p)
)
2495 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"
, 2495, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2495, __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"
, 2495, __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"
, 2495, __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"
, 2495, __FUNCTION__); &lt->u.fn; })->befriending_classes
)
;
2496
2497 /* Determine the depth of the hierarchy. */
2498 ffod.fn = fn;
2499 ffod.declaring_base = binfo;
2500 ffod.candidates = NULL_TREE(tree) __null;
2501 ffod.path.create (30);
2502
2503 dfs_walk_all (derived, dfs_find_final_overrider_pre,
2504 dfs_find_final_overrider_post, &ffod);
2505
2506 /* If there was no winner, issue an error message. */
2507 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"
, 2507, __FUNCTION__))->common.chain)
)
2508 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2509
2510 return ffod.candidates;
2511}
2512
2513/* Return the index of the vcall offset for FN when TYPE is used as a
2514 virtual base. */
2515
2516static tree
2517get_vcall_index (tree fn, tree type)
2518{
2519 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"
, 2519, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vcall_indices)
;
2520 tree_pair_p p;
2521 unsigned ix;
2522
2523 FOR_EACH_VEC_SAFE_ELT (indices, ix, p)for (ix = 0; vec_safe_iterate ((indices), (ix), &(p)); ++
(ix))
2524 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"
, 2524, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2524, __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"
, 2524, __FUNCTION__, (TEMPLATE_DECL))))))))->result : p->
purpose)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2524, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
)
2525 || same_signature_p (fn, p->purpose))
2526 return p->value;
2527
2528 /* There should always be an appropriate index. */
2529 gcc_unreachable ()(fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2529, __FUNCTION__))
;
2530}
2531
2532/* Given a DECL_VINDEX of a virtual function found in BINFO, return the final
2533 overrider at that index in the vtable. This should only be used when we
2534 know that BINFO is correct for the dynamic type of the object. */
2535
2536tree
2537lookup_vfn_in_binfo (tree idx, tree binfo)
2538{
2539 int ix = tree_to_shwi (idx);
2540 if (TARGET_VTABLE_USES_DESCRIPTORS0)
2541 ix /= MAX (TARGET_VTABLE_USES_DESCRIPTORS, 1)((0) > (1) ? (0) : (1));
2542 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"
, 2542, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2542, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
)
2543 /* BINFO_VIRTUALS in a primary base isn't accurate, find the derived
2544 class that actually owns the vtable. */
2545 binfo = BINFO_INHERITANCE_CHAIN (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2545, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
;
2546 tree virtuals = BINFO_VIRTUALS (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2546, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
;
2547 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"
, 2547, __FUNCTION__, (TREE_LIST)))->list.value)
;
2548}
2549
2550/* Update an entry in the vtable for BINFO, which is in the hierarchy
2551 dominated by T. FN is the old function; VIRTUALS points to the
2552 corresponding position in the new BINFO_VIRTUALS list. IX is the index
2553 of that entry in the list. */
2554
2555static void
2556update_vtable_entry_for_fn (tree t, tree binfo, tree fn, tree* virtuals,
2557 unsigned ix)
2558{
2559 tree b;
2560 tree overrider;
2561 tree delta;
2562 tree virtual_base;
2563 tree first_defn;
2564 tree overrider_fn, overrider_target;
2565 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"
, 2565, __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"
, 2565, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2565, __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"
, 2565, __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"
, 2565, __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"
, 2565, __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"
, 2565, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2565, __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"
, 2565, __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"
, 2565, __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"
, 2565, __FUNCTION__); &lt->u.fn; })->befriending_classes
)
: fn;
2566 tree over_return, base_return;
2567 bool lost = false;
2568
2569 /* Find the nearest primary base (possibly binfo itself) which defines
2570 this function; this is the class the caller will convert to when
2571 calling FN through BINFO. */
2572 for (b = binfo; ; b = get_primary_binfo (b))
2573 {
2574 gcc_assert (b)((void)(!(b) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2574, __FUNCTION__), 0 : 0))
;
2575 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"
, 2575, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2575, __FUNCTION__))->typed.type)
, target_fn))
2576 break;
2577
2578 /* The nearest definition is from a lost primary. */
2579 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"
, 2579, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2579, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
)
2580 lost = true;
2581 }
2582 first_defn = b;
2583
2584 /* Find the final overrider. */
2585 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"
, 2585, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
, b, target_fn);
2586 if (overrider == error_mark_nodeglobal_trees[TI_ERROR_MARK])
2587 {
2588 error ("no unique final overrider for %qD in %qT", target_fn, t);
2589 return;
2590 }
2591 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"
, 2591, __FUNCTION__, (TREE_LIST)))->list.purpose)
;
2592
2593 /* Check for adjusting covariant return types. */
2594 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"
, 2594, __FUNCTION__))->typed.type)), (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 (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"
, 2595, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2595, __FUNCTION__))->typed.type)
;
2596
2597 if (INDIRECT_TYPE_P (over_return)((((enum tree_code) (over_return)->base.code) == POINTER_TYPE
) || (((enum tree_code) (over_return)->base.code) == REFERENCE_TYPE
))
2598 && TREE_CODE (over_return)((enum tree_code) (over_return)->base.code) == TREE_CODE (base_return)((enum tree_code) (base_return)->base.code)
2599 && 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"
, 2599, __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"
, 2599, __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"
, 2599, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2599, __FUNCTION__))->type_common.lang_flag_5))
2600 && 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"
, 2600, __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"
, 2600, __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"
, 2600, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2600, __FUNCTION__))->type_common.lang_flag_5))
2601 /* If the overrider is invalid, don't even try. */
2602 && !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"
, 2602, __FUNCTION__))->decl_common.lang_flag_4))
)
2603 {
2604 /* If FN is a covariant thunk, we must figure out the adjustment
2605 to the final base FN was converting to. As OVERRIDER_TARGET might
2606 also be converting to the return type of FN, we have to
2607 combine the two conversions here. */
2608 tree fixed_offset, virtual_offset;
2609
2610 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"
, 2610, __FUNCTION__))->typed.type)
;
2611 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"
, 2611, __FUNCTION__))->typed.type)
;
2612
2613 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"
, 2613, __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"
, 2613, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2613, __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"
, 2613, __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"
, 2613, __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"
, 2613, __FUNCTION__); &lt->u.fn; })->thunk_p)
)
2614 {
2615 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"
, 2615, __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"
, 2615, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2615, __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"
, 2615, __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"
, 2615, __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"
, 2615, __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"
, 2615, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2615, __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"
, 2615, __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"
, 2615, __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"
, 2615, __FUNCTION__); &lt->u.fn; })->this_thunk_p)
) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2615, __FUNCTION__), 0 : 0))
;
2616 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"
, 2616, __FUNCTION__, 0); __t; })), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2616, __FUNCTION__))->decl_common.lang_specific)->u.fn
.u5.fixed_offset), stk_ssizetype)
;
2617 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"
, 2617, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2617, __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"
, 2617, __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"
, 2617, __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"
, 2617, __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"
, 2617, __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"
, 2617, __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"
, 2617, __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"
, 2617, __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"
, 2617, __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"
, 2617, __FUNCTION__); &lt->u.min; })->access)
;
2618 }
2619 else
2620 fixed_offset = virtual_offset = NULL_TREE(tree) __null;
2621
2622 if (virtual_offset)
2623 /* Find the equivalent binfo within the return type of the
2624 overriding function. We will want the vbase offset from
2625 there. */
2626 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"
, 2626, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2626, __FUNCTION__))->typed.type)
,
2627 over_return);
2628 else if (!same_type_ignoring_top_level_qualifiers_p
2629 (over_return, base_return))
2630 {
2631 /* There was no existing virtual thunk (which takes
2632 precedence). So find the binfo of the base function's
2633 return type within the overriding function's return type.
2634 Fortunately we know the covariancy is valid (it
2635 has already been checked), so we can just iterate along
2636 the binfos, which have been chained in inheritance graph
2637 order. Of course it is lame that we have to repeat the
2638 search here anyway -- we should really be caching pieces
2639 of the vtable and avoiding this repeated work. */
2640 tree thunk_binfo = NULL_TREE(tree) __null;
2641 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"
, 2641, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
2642
2643 /* Find the base binfo within the overriding function's
2644 return type. We will always find a thunk_binfo, except
2645 when the covariancy is invalid (which we will have
2646 already diagnosed). */
2647 if (base_binfo)
2648 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"
, 2648, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
; thunk_binfo;
2649 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"
, 2649, __FUNCTION__))->common.chain)
)
2650 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"
, 2650, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2650, __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"
, 2651, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2651, __FUNCTION__))->typed.type)))
2651 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"
, 2650, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2650, __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"
, 2651, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2651, __FUNCTION__))->typed.type)))
)
2652 break;
2653 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"
, 2653, __FUNCTION__), 0 : 0))
;
2654
2655 /* See if virtual inheritance is involved. */
2656 for (virtual_offset = thunk_binfo;
2657 virtual_offset;
2658 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"
, 2658, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
)
2659 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"
, 2659, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
2660 break;
2661
2662 if (virtual_offset
2663 || (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"
, 2663, __FUNCTION__, (TREE_BINFO)))->binfo.offset)))
))
2664 {
2665 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"
, 2665, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
;
2666
2667 if (virtual_offset)
2668 {
2669 /* We convert via virtual base. Adjust the fixed
2670 offset to be from there. */
2671 offset =
2672 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"
, 2674, __FUNCTION__, (TREE_BINFO)))->binfo.offset)))
2673 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"
, 2674, __FUNCTION__, (TREE_BINFO)))->binfo.offset)))
2674 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"
, 2674, __FUNCTION__, (TREE_BINFO)))->binfo.offset)))
;
2675 }
2676 if (fixed_offset)
2677 /* There was an existing fixed offset, this must be
2678 from the base just converted to, and the base the
2679 FN was thunking to. */
2680 fixed_offset = size_binop (PLUS_EXPR, fixed_offset, offset)size_binop_loc (((location_t) 0), PLUS_EXPR, fixed_offset, offset
)
;
2681 else
2682 fixed_offset = offset;
2683 }
2684 }
2685
2686 if (fixed_offset || virtual_offset)
2687 /* Replace the overriding function with a covariant thunk. We
2688 will emit the overriding function in its own slot as
2689 well. */
2690 overrider_fn = make_thunk (overrider_target, /*this_adjusting=*/0,
2691 fixed_offset, virtual_offset);
2692 }
2693 else
2694 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"
, 2694, __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"
, 2695, __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"
, 2695, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2695, __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"
, 2695, __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"
, 2695, __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"
, 2695, __FUNCTION__); &lt->u.fn; })->thunk_p)) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2695, __FUNCTION__), 0 : 0))
2695 !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"
, 2694, __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"
, 2695, __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"
, 2695, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2695, __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"
, 2695, __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"
, 2695, __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"
, 2695, __FUNCTION__); &lt->u.fn; })->thunk_p)) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2695, __FUNCTION__), 0 : 0))
;
2696
2697 /* If we need a covariant thunk, then we may need to adjust first_defn.
2698 The ABI specifies that the thunks emitted with a function are
2699 determined by which bases the function overrides, so we need to be
2700 sure that we're using a thunk for some overridden base; even if we
2701 know that the necessary this adjustment is zero, there may not be an
2702 appropriate zero-this-adjustment thunk for us to use since thunks for
2703 overriding virtual bases always use the vcall offset.
2704
2705 Furthermore, just choosing any base that overrides this function isn't
2706 quite right, as this slot won't be used for calls through a type that
2707 puts a covariant thunk here. Calling the function through such a type
2708 will use a different slot, and that slot is the one that determines
2709 the thunk emitted for that base.
2710
2711 So, keep looking until we find the base that we're really overriding
2712 in this slot: the nearest primary base that doesn't use a covariant
2713 thunk in this slot. */
2714 if (overrider_target != overrider_fn)
2715 {
2716 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"
, 2716, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2716, __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"
, 2716, __FUNCTION__))->decl_minimal.context)
)
2717 /* We already know that the overrider needs a covariant thunk. */
2718 b = get_primary_binfo (b);
2719 for (; ; b = get_primary_binfo (b))
2720 {
2721 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"
, 2721, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2721, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2721, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
2722 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"
, 2722, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
);
2723 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"
, 2723, __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"
, 2723, __FUNCTION__, (TREE_LIST)))->list.value)), (TS_DECL_COMMON
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2723, __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"
, 2723, __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"
, 2723, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2723, __FUNCTION__, (TEMPLATE_DECL))))))))->result : ((tree_check
((bv), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2723, __FUNCTION__, (TREE_LIST)))->list.value))), (TS_DECL_COMMON
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2723, __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"
, 2723, __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"
, 2723, __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"
, 2723, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2723, __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"
, 2723, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2723, __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"
, 2723, __FUNCTION__); &lt->u.fn; })->thunk_p)
)
2724 break;
2725 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"
, 2725, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2725, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4)
)
2726 lost = true;
2727 }
2728 first_defn = b;
2729 }
2730
2731 /* Assume that we will produce a thunk that convert all the way to
2732 the final overrider, and not to an intermediate virtual base. */
2733 virtual_base = NULL_TREE(tree) __null;
2734
2735 /* See if we can convert to an intermediate virtual base first, and then
2736 use the vcall offset located there to finish the conversion. */
2737 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"
, 2737, __FUNCTION__, (TREE_BINFO)))->binfo.inheritance)
)
2738 {
2739 /* If we find the final overrider, then we can stop
2740 walking. */
2741 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"
, 2741, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2741, __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"
, 2742, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2742, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2742, __FUNCTION__))->typed.type)))
2742 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"
, 2741, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2741, __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"
, 2742, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2742, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2742, __FUNCTION__))->typed.type)))
)
2743 break;
2744
2745 /* If we find a virtual base, and we haven't yet found the
2746 overrider, then there is a virtual base between the
2747 declaring base (first_defn) and the final overrider. */
2748 if (BINFO_VIRTUAL_P (b)((tree_check ((b), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2748, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
2749 {
2750 virtual_base = b;
2751 break;
2752 }
2753 }
2754
2755 /* Compute the constant adjustment to the `this' pointer. The
2756 `this' pointer, when this function is called, will point at BINFO
2757 (or one of its primary bases, which are at the same offset). */
2758 if (virtual_base)
2759 /* The `this' pointer needs to be adjusted from the declaration to
2760 the nearest virtual base. */
2761 delta = size_diffop_loc (input_location,
2762 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"
, 2762, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
,
2763 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"
, 2763, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
);
2764 else if (lost)
2765 /* If the nearest definition is in a lost primary, we don't need an
2766 entry in our vtable. Except possibly in a constructor vtable,
2767 if we happen to get our primary back. In that case, the offset
2768 will be zero, as it will be a primary base. */
2769 delta = size_zero_nodeglobal_trees[TI_SIZE_ZERO];
2770 else
2771 /* The `this' pointer needs to be adjusted from pointing to
2772 BINFO to pointing at the base where the final overrider
2773 appears. */
2774 delta = size_diffop_loc (input_location,
2775 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"
, 2776, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2776, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
2776 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"
, 2776, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2776, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
,
2777 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"
, 2777, __FUNCTION__, (TREE_BINFO)))->binfo.offset))
);
2778
2779 modify_vtable_entry (t, binfo, overrider_fn, delta, virtuals);
2780
2781 if (virtual_base)
2782 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"
, 2782, __FUNCTION__))->typed.type))
2783 = 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"
, 2783, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2783, __FUNCTION__))->typed.type)
);
2784 else
2785 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"
, 2785, __FUNCTION__))->typed.type))
= NULL_TREE(tree) __null;
2786
2787 BV_LOST_PRIMARY (*virtuals)(((tree_not_check2 ((*virtuals), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2787, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
= lost;
2788}
2789
2790/* Called from modify_all_vtables via dfs_walk. */
2791
2792static tree
2793dfs_modify_vtables (tree binfo, void* data)
2794{
2795 tree t = (tree) data;
2796 tree virtuals;
2797 tree old_virtuals;
2798 unsigned ix;
2799
2800 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"
, 2800, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2800, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2800, __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"
, 2800, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2800, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2800, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vbases))
)
2801 /* A base without a vtable needs no modification, and its bases
2802 are uninteresting. */
2803 return dfs_skip_bases((tree)1);
2804
2805 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"
, 2805, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2805, __FUNCTION__))->typed.type)) == (t))
2806 && !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"
, 2806, __FUNCTION__))->type_with_lang_specific.lang_specific
))->primary_base) != (tree) __null)
)
2807 /* Don't do the primary vtable, if it's new. */
2808 return NULL_TREE(tree) __null;
2809
2810 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"
, 2810, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2810, __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"
, 2810, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
2811 /* There's no need to modify the vtable for a non-virtual primary
2812 base; we're not going to use that vtable anyhow. We do still
2813 need to do this for virtual primary bases, as they could become
2814 non-primary in a construction vtable. */
2815 return NULL_TREE(tree) __null;
2816
2817 make_new_vtable (t, binfo);
2818
2819 /* Now, go through each of the virtual functions in the virtual
2820 function table for BINFO. Find the final overrider, and update
2821 the BINFO_VIRTUALS list appropriately. */
2822 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"
, 2822, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
,
2823 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"
, 2823, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2823, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2823, __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"
, 2823, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
;
2824 virtuals;
2825 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"
, 2825, __FUNCTION__))->common.chain)
,
2826 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"
, 2826, __FUNCTION__))->common.chain)
)
2827 update_vtable_entry_for_fn (t,
2828 binfo,
2829 BV_FN (old_virtuals)(((tree_check ((old_virtuals), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2829, __FUNCTION__, (TREE_LIST)))->list.value))
,
2830 &virtuals, ix);
2831
2832 return NULL_TREE(tree) __null;
2833}
2834
2835/* Update all of the primary and secondary vtables for T. Create new
2836 vtables as required, and initialize their RTTI information. Each
2837 of the functions in VIRTUALS is declared in T and may override a
2838 virtual function from a base class; find and modify the appropriate
2839 entries to point to the overriding functions. Returns a list, in
2840 declaration order, of the virtual functions that are declared in T,
2841 but do not appear in the primary base class vtable, and which
2842 should therefore be appended to the end of the vtable for T. */
2843
2844static tree
2845modify_all_vtables (tree t, tree virtuals)
2846{
2847 tree binfo = TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2847, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
2848 tree *fnsp;
2849
2850 /* Mangle the vtable name before entering dfs_walk (c++/51884). */
2851 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"
, 2851, __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"
, 2851, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vbases))
)
2852 get_vtable_decl (t, false);
2853
2854 /* Update all of the vtables. */
2855 dfs_walk_once (binfo, dfs_modify_vtables, NULL__null, t);
2856
2857 /* Add virtual functions not already in our primary vtable. These
2858 will be both those introduced by this class, and those overridden
2859 from secondary bases. It does not include virtuals merely
2860 inherited from secondary bases. */
2861 for (fnsp = &virtuals; *fnsp; )
2862 {
2863 tree fn = TREE_VALUE (*fnsp)((tree_check ((*fnsp), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2863, __FUNCTION__, (TREE_LIST)))->list.value)
;
2864
2865 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"
, 2865, __FUNCTION__, (TREE_BINFO)))->binfo.virtuals)
)
2866 || DECL_VINDEX (fn)((tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2866, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
== error_mark_nodeglobal_trees[TI_ERROR_MARK])
2867 {
2868 /* We don't need to adjust the `this' pointer when
2869 calling this function. */
2870 BV_DELTA (*fnsp)(((tree_check ((*fnsp), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2870, __FUNCTION__, (TREE_LIST)))->list.purpose))
= integer_zero_nodeglobal_trees[TI_INTEGER_ZERO];
2871 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"
, 2871, __FUNCTION__))->typed.type))
= NULL_TREE(tree) __null;
2872
2873 /* This is a function not already in our vtable. Keep it. */
2874 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"
, 2874, __FUNCTION__))->common.chain)
;
2875 }
2876 else
2877 /* We've already got an entry for this function. Skip it. */
2878 *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"
, 2878, __FUNCTION__))->common.chain)
;
2879 }
2880
2881 return virtuals;
2882}
2883
2884/* Get the base virtual function declarations in T that have the
2885 indicated NAME. */
2886
2887static void
2888get_basefndecls (tree name, tree t, vec<tree> *base_fndecls)
2889{
2890 bool found_decls = false;
2891
2892 /* Find virtual functions in T with the indicated NAME. */
2893 for (tree method : ovl_range (get_class_binding (t, name)))
2894 {
2895 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"
, 2895, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
)
2896 {
2897 base_fndecls->safe_push (method);
2898 found_decls = true;
2899 }
2900 }
2901
2902 if (found_decls)
2903 return;
2904
2905 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"
, 2905, __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"
, 2905, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)->
length ())
;
2906 for (int i = 0; i < n_baseclasses; i++)
2907 {
2908 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"
, 2908, __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"
, 2908, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos))[
(i)])), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2908, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2908, __FUNCTION__))->typed.type)
;
2909 get_basefndecls (name, basetype, base_fndecls);
2910 }
2911}
2912
2913/* If this method overrides a virtual method from a base, then mark
2914 this member function as being virtual as well. Do 'final' and
2915 'override' checks too. */
2916
2917void
2918check_for_override (tree decl, tree ctype)
2919{
2920 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_DECL)
2921 /* In [temp.mem] we have:
2922
2923 A specialization of a member function template does not
2924 override a virtual function from a base class. */
2925 return;
2926
2927 /* IDENTIFIER_VIRTUAL_P indicates whether the name has ever been
2928 used for a vfunc. That avoids the expensive look_for_overrides
2929 call that when we know there's nothing to find. As conversion
2930 operators for the same type can have distinct identifiers, we
2931 cannot optimize those in that way. */
2932 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"
, 2932, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2932, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2932, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
2933 || 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"
, 2933, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2933, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2933, __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"
, 2933, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2933, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2933, __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"
, 2933, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2933, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2933, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))
)
2934 && look_for_overrides (ctype, decl)
2935 /* Check staticness after we've checked if we 'override'. */
2936 && !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"
, 2936, __FUNCTION__, (TEMPLATE_DECL))))))))->result : decl
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2936, __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"
, 2936, __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"
, 2936, __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"
, 2936, __FUNCTION__); &lt->u.fn; })->static_function
)
)
2937 {
2938 /* Set DECL_VINDEX to a value that is neither an INTEGER_CST nor
2939 the error_mark_node so that we know it is an overriding
2940 function. */
2941 DECL_VINDEX (decl)((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2941, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
= decl;
2942
2943 if (warn_overrideglobal_options.x_warn_override
2944 && !DECL_OVERRIDE_P (decl)(((tree_not_check2 ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2944, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
2945 && !DECL_FINAL_P (decl)((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2945, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.final
)
2946 && !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"
, 2946, __FUNCTION__, (TEMPLATE_DECL))))))))->result : decl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2946, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
)
2947 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"
, 2947, __FUNCTION__))->decl_minimal.locus)
, OPT_Wsuggest_override,
2948 "%qD can be marked override", decl);
2949 }
2950 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"
, 2950, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
)
2951 error ("%q+#D marked %<override%>, but does not override", decl);
2952
2953 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"
, 2953, __FUNCTION__))->decl_common.virtual_flag)
)
2954 {
2955 /* Remember this identifier is virtual name. */
2956 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"
, 2956, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2956, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2956, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
= true;
2957
2958 if (!DECL_VINDEX (decl)((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2958, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
)
2959 /* It's a new vfunc. */
2960 DECL_VINDEX (decl)((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2960, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
= error_mark_nodeglobal_trees[TI_ERROR_MARK];
2961
2962 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"
, 2962, __FUNCTION__, (TEMPLATE_DECL))))))))->result : decl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2962, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
)
2963 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"
, 2963, __FUNCTION__))->type_common.lang_flag_4))
= true;
2964 }
2965 else if (DECL_FINAL_P (decl)((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2965, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.final
)
)
2966 error ("%q+#D marked %<final%>, but is not virtual", decl);
2967}
2968
2969/* Warn about hidden virtual functions that are not overridden in t.
2970 We know that constructors and destructors don't apply. */
2971
2972static void
2973warn_hidden (tree t)
2974{
2975 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"
, 2975, __FUNCTION__))->type_with_lang_specific.lang_specific
))->members)
)
2976 for (unsigned ix = member_vec->length (); ix--;)
2977 {
2978 tree fns = (*member_vec)[ix];
2979
2980 if (!OVL_P (fns)(((enum tree_code) (fns)->base.code) == FUNCTION_DECL || (
(enum tree_code) (fns)->base.code) == OVERLOAD)
)
2981 continue;
2982
2983 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"
, 2983, __FUNCTION__))->decl_minimal.name)
;
2984 auto_vec<tree, 20> base_fndecls;
2985 tree base_binfo;
2986 tree binfo;
2987 unsigned j;
2988
2989 /* Iterate through all of the base classes looking for possibly
2990 hidden functions. */
2991 for (binfo = TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2991, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
, j = 0;
2992 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"
, 2992, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)->
iterate ((j), &(base_binfo)))
; j++)
2993 {
2994 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"
, 2994, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 2994, __FUNCTION__))->typed.type)
;
2995 get_basefndecls (name, basetype, &base_fndecls);
2996 }
2997
2998 /* If there are no functions to hide, continue. */
2999 if (base_fndecls.is_empty ())
3000 continue;
3001
3002 /* Remove any overridden functions. */
3003 for (tree fndecl : ovl_range (fns))
3004 {
3005 if (TREE_CODE (fndecl)((enum tree_code) (fndecl)->base.code) == FUNCTION_DECL
3006 && DECL_VINDEX (fndecl)((tree_check ((fndecl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3006, __FUNCTION__, (FUNCTION_DECL)))->function_decl.vindex
)
)
3007 {
3008 /* If the method from the base class has the same
3009 signature as the method from the derived class, it
3010 has been overridden. */
3011 for (size_t k = 0; k < base_fndecls.length (); k++)
3012 if (base_fndecls[k]
3013 && same_signature_p (fndecl, base_fndecls[k]))
3014 base_fndecls[k] = NULL_TREE(tree) __null;
3015 }
3016 }
3017
3018 /* Now give a warning for all base functions without overriders,
3019 as they are hidden. */
3020 tree base_fndecl;
3021 FOR_EACH_VEC_ELT (base_fndecls, j, base_fndecl)for (j = 0; (base_fndecls).iterate ((j), &(base_fndecl));
++(j))
3022 if (base_fndecl)
3023 {
3024 auto_diagnostic_group d;
3025 /* Here we know it is a hider, and no overrider exists. */
3026 if (warning_at (location_of (base_fndecl),
3027 OPT_Woverloaded_virtual,
3028 "%qD was hidden", base_fndecl))
3029 inform (location_of (fns), " by %qD", fns);
3030 }
3031 }
3032}
3033
3034/* Recursive helper for finish_struct_anon. */
3035
3036static void
3037finish_struct_anon_r (tree field)
3038{
3039 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"
, 3039, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3039, __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"
, 3039, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3039, __FUNCTION__))->common.chain))
)
3040 {
3041 /* We're generally only interested in entities the user
3042 declared, but we also find nested classes by noticing
3043 the TYPE_DECL that we create implicitly. You're
3044 allowed to put one anonymous union inside another,
3045 though, so we explicitly tolerate that. We use
3046 TYPE_UNNAMED_P rather than ANON_AGGR_TYPE_P so that
3047 we also allow unnamed types used for defining fields. */
3048 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"
, 3048, __FUNCTION__))->decl_common.artificial_flag)
3049 && (!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"
, 3049, __FUNCTION__))->decl_common.lang_flag_2))
3050 || 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"
, 3050, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __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"
, 3050, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __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"
, 3050, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __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"
, 3050, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __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"
, 3050, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __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"
, 3050, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __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"
, 3050, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __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"
, 3050, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __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"
, 3050, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __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"
, 3050, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __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"
, 3050, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __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"
, 3050, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3050, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))
))
3051 continue;
3052
3053 TREE_PRIVATE (elt)((elt)->base.private_flag) = TREE_PRIVATE (field)((field)->base.private_flag);
3054 TREE_PROTECTED (elt)((elt)->base.protected_flag) = TREE_PROTECTED (field)((field)->base.protected_flag);
3055
3056 /* Recurse into the anonymous aggregates to correctly handle
3057 access control (c++/24926):
3058
3059 class A {
3060 union {
3061 union {
3062 int i;
3063 };
3064 };
3065 };
3066
3067 int j=A().i; */
3068 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"
, 3068, __FUNCTION__))->decl_minimal.name)
== NULL_TREE(tree) __null
3069 && 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"
, 3069, __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"
, 3069, __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"
, 3069, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3069, __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"
, 3069, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3069, __FUNCTION__))->type_with_lang_specific.lang_specific
))->anon_aggr)
)
3070 finish_struct_anon_r (elt);
3071 }
3072}
3073
3074/* Fix up any anonymous union/struct members of T. */
3075
3076static void
3077finish_struct_anon (tree t)
3078{
3079 for (tree field = TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3079, __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"
, 3079, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3079, __FUNCTION__))->common.chain))
)
3080 {
3081 if (TREE_STATIC (field)((field)->base.static_flag))
3082 continue;
3083 if (TREE_CODE (field)((enum tree_code) (field)->base.code) != FIELD_DECL)
3084 continue;
3085
3086 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"
, 3086, __FUNCTION__))->decl_minimal.name)
== NULL_TREE(tree) __null
3087 && 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"
, 3087, __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"
, 3087, __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"
, 3087, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3087, __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"
, 3087, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3087, __FUNCTION__))->type_with_lang_specific.lang_specific
))->anon_aggr)
)
3088 finish_struct_anon_r (field);
3089 }
3090}
3091
3092/* Add T to CLASSTYPE_DECL_LIST of current_class_type which
3093 will be used later during class template instantiation.
3094 When FRIEND_P is zero, T can be a static member data (VAR_DECL),
3095 a non-static member data (FIELD_DECL), a member function
3096 (FUNCTION_DECL), a nested type (RECORD_TYPE, ENUM_TYPE),
3097 a typedef (TYPE_DECL) or a member class template (TEMPLATE_DECL)
3098 When FRIEND_P is nonzero, T is either a friend class
3099 (RECORD_TYPE, TEMPLATE_DECL) or a friend function
3100 (FUNCTION_DECL, TEMPLATE_DECL). */
3101
3102void
3103maybe_add_class_template_decl_list (tree type, tree t, int friend_p)
3104{
3105 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"
, 3105, __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"
, 3105, __FUNCTION__))->type_non_common.lang_1))
3106 && TREE_CODE (t)((enum tree_code) (t)->base.code) != CONST_DECL)
3107 {
3108 tree purpose = friend_p ? NULL_TREE(tree) __null : type;
3109
3110 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"
, 3110, __FUNCTION__))->type_with_lang_specific.lang_specific
))->decl_list)
3111 = 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"
, 3111, __FUNCTION__))->type_with_lang_specific.lang_specific
))->decl_list)
);
3112 }
3113}
3114
3115/* This function is called from declare_virt_assop_and_dtor via
3116 dfs_walk_all.
3117
3118 DATA is a type that direcly or indirectly inherits the base
3119 represented by BINFO. If BINFO contains a virtual assignment [copy
3120 assignment or move assigment] operator or a virtual constructor,
3121 declare that function in DATA if it hasn't been already declared. */
3122
3123static tree
3124dfs_declare_virt_assop_and_dtor (tree binfo, void *data)
3125{
3126 tree bv, fn, t = (tree)data;
3127 tree opname = assign_op_identifier(ovl_op_info[true][OVL_OP_NOP_EXPR].identifier);
3128
3129 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"
, 3129, __FUNCTION__))->type_common.lang_flag_5))) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3129, __FUNCTION__), 0 : 0))
;
3130 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"
, 3130, __FUNCTION__), 0 : 0))
;
3131
3132 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"
, 3132, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3132, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3132, __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"
, 3132, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3132, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3132, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vbases))
)
3133 /* A base without a vtable needs no modification, and its bases
3134 are uninteresting. */
3135 return dfs_skip_bases((tree)1);
3136
3137 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"
, 3137, __FUNCTION__, (TREE_BINFO)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3137, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
)
3138 /* If this is a primary base, then we have already looked at the
3139 virtual functions of its vtable. */
3140 return NULL_TREE(tree) __null;
3141
3142 for (bv = BINFO_VIRTUALS (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3142, __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"
, 3142, __FUNCTION__))->common.chain)
)
3143 {
3144 fn = BV_FN (bv)(((tree_check ((bv), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3144, __FUNCTION__, (TREE_LIST)))->list.value))
;
3145
3146 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"
, 3146, __FUNCTION__))->decl_minimal.name)
== opname)
3147 {
3148 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"
, 3148, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_copy_assign)
)
3149 lazily_declare_fn (sfk_copy_assignment, t);
3150 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"
, 3150, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_move_assign)
)
3151 lazily_declare_fn (sfk_move_assignment, t);
3152 }
3153 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"
, 3153, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3153, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
3154 && 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"
, 3154, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_destructor)
)
3155 lazily_declare_fn (sfk_destructor, t);
3156 }
3157
3158 return NULL_TREE(tree) __null;
3159}
3160
3161/* If the class type T has a direct or indirect base that contains a
3162 virtual assignment operator or a virtual destructor, declare that
3163 function in T if it hasn't been already declared. */
3164
3165static void
3166declare_virt_assop_and_dtor (tree t)
3167{
3168 if (!(TYPE_POLYMORPHIC_P (t)(((tree_not_check2 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3168, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
3169 && (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"
, 3169, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_copy_assign)
3170 || 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"
, 3170, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_move_assign)
3171 || 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"
, 3171, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_destructor)
)))
3172 return;
3173
3174 dfs_walk_all (TYPE_BINFO (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3174, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
,
3175 dfs_declare_virt_assop_and_dtor,
3176 NULL__null, t);
3177}
3178
3179/* Declare the inheriting constructor for class T inherited from base
3180 constructor CTOR with the parameter array PARMS of size NPARMS. */
3181
3182static void
3183one_inheriting_sig (tree t, tree ctor, tree *parms, int nparms)
3184{
3185 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"
, 3185, __FUNCTION__))->type_common.main_variant) == t) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3185, __FUNCTION__), 0 : 0))
;
3186
3187 /* We don't declare an inheriting ctor that would be a default,
3188 copy or move ctor for derived or base. */
3189 if (nparms == 0)
3190 return;
3191 if (nparms == 1
3192 && TYPE_REF_P (parms[0])(((enum tree_code) (parms[0])->base.code) == REFERENCE_TYPE
)
)
3193 {
3194 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"
, 3194, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3194, __FUNCTION__))->type_common.main_variant)
;
3195 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"
, 3195, __FUNCTION__))->decl_minimal.context)
)
3196 return;
3197 }
3198
3199 tree parmlist = void_list_nodeglobal_trees[TI_VOID_LIST_NODE];
3200 for (int i = nparms - 1; i >= 0; i--)
3201 parmlist = tree_cons (NULL_TREE(tree) __null, parms[i], parmlist);
3202 tree fn = implicitly_declare_fn (sfk_inheriting_constructor,
3203 t, false, ctor, parmlist);
3204
3205 if (add_method (t, fn, false))
3206 {
3207 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"
, 3207, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3207, __FUNCTION__))->common.chain))
= TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3207, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
;
3208 TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3208, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
= fn;
3209 }
3210}
3211
3212/* Declare all the inheriting constructors for class T inherited from base
3213 constructor CTOR. */
3214
3215static void
3216one_inherited_ctor (tree ctor, tree t, tree using_decl)
3217{
3218 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"
, 3218, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3218, __FUNCTION__, (FUNCTION_TYPE), (METHOD_TYPE)))->type_non_common
.values))
;
3219
3220 if (flag_new_inheriting_ctorsglobal_options.x_flag_new_inheriting_ctors)
3221 {
3222 ctor = implicitly_declare_fn (sfk_inheriting_constructor,
3223 t, /*const*/false, ctor, parms);
3224 add_method (t, ctor, using_decl != NULL_TREE(tree) __null);
3225 return;
3226 }
3227
3228 tree *new_parms = XALLOCAVEC (tree, list_length (parms))((tree *) __builtin_alloca(sizeof (tree) * (list_length (parms
))))
;
3229 int i = 0;
3230 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"
, 3230, __FUNCTION__))->common.chain)
)
3231 {
3232 if (TREE_PURPOSE (parms)((tree_check ((parms), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3232, __FUNCTION__, (TREE_LIST)))->list.purpose)
)
3233 one_inheriting_sig (t, ctor, new_parms, i);
3234 new_parms[i++] = TREE_VALUE (parms)((tree_check ((parms), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3234, __FUNCTION__, (TREE_LIST)))->list.value)
;
3235 }
3236 one_inheriting_sig (t, ctor, new_parms, i);
3237 if (parms == NULL_TREE(tree) __null)
3238 {
3239 auto_diagnostic_group d;
3240 if (warning (OPT_Winherited_variadic_ctor,
3241 "the ellipsis in %qD is not inherited", ctor))
3242 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"
, 3242, __FUNCTION__))->decl_minimal.locus)
, "%qD declared here", ctor);
3243 }
3244}
3245
3246/* Create default constructors, assignment operators, and so forth for
3247 the type indicated by T, if they are needed. CANT_HAVE_CONST_CTOR,
3248 and CANT_HAVE_CONST_ASSIGNMENT are nonzero if, for whatever reason,
3249 the class cannot have a default constructor, copy constructor
3250 taking a const reference argument, or an assignment operator taking
3251 a const reference, respectively. */
3252
3253static void
3254add_implicitly_declared_members (tree t, tree* access_decls,
3255 int cant_have_const_cctor,
3256 int cant_have_const_assignment)
3257{
3258 /* Destructor. */
3259 if (!CLASSTYPE_DESTRUCTOR (t)(get_class_binding_direct (t, cp_global_trees[CPTI_DTOR_IDENTIFIER
]))
)
3260 /* In general, we create destructors lazily. */
3261 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"
, 3261, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_destructor)
= 1;
3262
3263 bool move_ok = false;
3264 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"
, 3264, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_destructor)
3265 && !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"
, 3265, __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"
, 3265, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
3266 && !classtype_has_move_assign_or_move_ctor_p (t, false))
3267 move_ok = true;
3268
3269 /* [class.ctor]
3270
3271 If there is no user-declared constructor for a class, a default
3272 constructor is implicitly declared. */
3273 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"
, 3273, __FUNCTION__))->type_common.lang_flag_1))
)
3274 {
3275 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"
, 3275, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_default_ctor)
= 1;
3276 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"
, 3276, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_default_ctor)
= 1;
3277 if (cxx_dialect >= cxx11)
3278 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"
, 3278, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_constexpr_ctor)
3279 /* Don't force the declaration to get a hard answer; if the
3280 definition would have made the class non-literal, it will still be
3281 non-literal because of the base or member in question, and that
3282 gives a better diagnostic. */
3283 = type_maybe_constexpr_default_constructor (t);
3284 }
3285
3286 /* [class.ctor]
3287
3288 If a class definition does not explicitly declare a copy
3289 constructor, one is declared implicitly. */
3290 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"
, 3290, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
)
3291 {
3292 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"
, 3292, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
= 1;
3293 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"
, 3293, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_const_copy_ctor)
= !cant_have_const_cctor;
3294 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"
, 3294, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_copy_ctor)
= 1;
3295 if (move_ok)
3296 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"
, 3296, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_move_ctor)
= 1;
3297 }
3298
3299 /* If there is no assignment operator, one will be created if and
3300 when it is needed. For now, just record whether or not the type
3301 of the parameter to the assignment operator will be a const or
3302 non-const reference. */
3303 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"
, 3303, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
)
3304 {
3305 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"
, 3305, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
= 1;
3306 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"
, 3306, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_const_copy_assign)
= !cant_have_const_assignment;
3307 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"
, 3307, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_copy_assign)
= 1;
3308 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"
, 3308, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3308, __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"
, 3308, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3308, __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"
, 3308, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3308, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3308, __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"
, 3308, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3308, __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"
, 3308, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3308, __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"
, 3308, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3308, __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"
, 3308, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3308, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3308, __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"
, 3308, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3308, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3308, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))
)
3309 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"
, 3309, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lazy_move_assign)
= 1;
3310 }
3311
3312 /* We can't be lazy about declaring functions that might override
3313 a virtual function from a base class. */
3314 declare_virt_assop_and_dtor (t);
3315
3316 /* If the class definition does not explicitly declare an == operator
3317 function, but declares a defaulted three-way comparison operator function,
3318 an == operator function is declared implicitly. */
3319 if (!classtype_has_op (t, EQ_EXPR))
3320 if (tree space = classtype_has_defaulted_op (t, SPACESHIP_EXPR))
3321 {
3322 tree eq = implicitly_declare_fn (sfk_comparison, t, false, space,
3323 NULL_TREE(tree) __null);
3324 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"
, 3324, __FUNCTION__))->decl_minimal.context)
!= t;
3325 if (is_friend)
3326 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"
, 3326, __FUNCTION__))->decl_minimal.name)
, eq,
3327 NO_SPECIAL, true);
3328 else
3329 {
3330 add_method (t, eq, false);
3331 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"
, 3331, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3331, __FUNCTION__))->common.chain))
= TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3331, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
;
3332 TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3332, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
= eq;
3333 }
3334 maybe_add_class_template_decl_list (t, eq, is_friend);
3335 }
3336
3337 while (*access_decls)
3338 {
3339 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"
, 3339, __FUNCTION__, (TREE_LIST)))->list.value)
;
3340 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"
, 3340, __FUNCTION__, (USING_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3340, __FUNCTION__))->decl_common.initial)
;
3341 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"
, 3341, __FUNCTION__))->decl_minimal.name)
== ctor_identifiercp_global_trees[CPTI_CTOR_IDENTIFIER])
3342 {
3343 /* declare, then remove the decl */
3344 tree ctor_list = decl;
3345 location_t loc = input_location;
3346 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"
, 3346, __FUNCTION__))->decl_minimal.locus)
;
3347 for (tree fn : ovl_range (ctor_list))
3348 one_inherited_ctor (fn, t, using_decl);
3349 *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"
, 3349, __FUNCTION__))->common.chain)
;
3350 input_location = loc;
3351 }
3352 else
3353 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"
, 3353, __FUNCTION__))->common.chain)
;
3354 }
3355}
3356
3357/* Cache of enum_min_precision values. */
3358static GTY((deletable)) hash_map<tree, int> *enum_to_min_precision;
3359
3360/* Return the minimum precision of a bit-field needed to store all
3361 enumerators of ENUMERAL_TYPE TYPE. */
3362
3363static int
3364enum_min_precision (tree type)
3365{
3366 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"
, 3366, __FUNCTION__))->type_common.main_variant)
;
3367 /* For unscoped enums without fixed underlying type and without mode
3368 attribute we can just use precision of the underlying type. */
3369 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"
, 3369, __FUNCTION__, (ENUMERAL_TYPE)))->base.static_flag)
)
3370 && !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"
, 3370, __FUNCTION__))->type_common.lang_flag_5))
3371 && !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"
, 3371, __FUNCTION__))->type_common.attributes)
))
3372 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"
, 3372, __FUNCTION__, (ENUMERAL_TYPE)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3372, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3372, __FUNCTION__))->type_common.precision)
;
3373
3374 if (enum_to_min_precision == NULL__null)
3375 enum_to_min_precision = hash_map<tree, int>::create_ggc (37);
3376
3377 bool existed;
3378 int &prec = enum_to_min_precision->get_or_insert (type, &existed);
3379 if (existed)
3380 return prec;
3381
3382 tree minnode, maxnode;
3383 if (TYPE_VALUES (type)((tree_check ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3383, __FUNCTION__, (ENUMERAL_TYPE)))->type_non_common.values
)
)
3384 {
3385 minnode = maxnode = NULL_TREE(tree) __null;
3386 for (tree values = TYPE_VALUES (type)((tree_check ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3386, __FUNCTION__, (ENUMERAL_TYPE)))->type_non_common.values
)
;
3387 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"
, 3387, __FUNCTION__))->common.chain)
)
3388 {
3389 tree decl = TREE_VALUE (values)((tree_check ((values), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3389, __FUNCTION__, (TREE_LIST)))->list.value)
;
3390 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"
, 3390, __FUNCTION__))->decl_common.initial)
;
3391 if (value == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3392 value = integer_zero_nodeglobal_trees[TI_INTEGER_ZERO];
3393 if (!minnode)
3394 minnode = maxnode = value;
3395 else if (tree_int_cst_lt (maxnode, value))
3396 maxnode = value;
3397 else if (tree_int_cst_lt (value, minnode))
3398 minnode = value;
3399 }
3400 }
3401 else
3402 minnode = maxnode = integer_zero_nodeglobal_trees[TI_INTEGER_ZERO];
3403
3404 signop sgn = tree_int_cst_sgn (minnode) >= 0 ? UNSIGNED : SIGNED;
3405 int lowprec = tree_int_cst_min_precision (minnode, sgn);
3406 int highprec = tree_int_cst_min_precision (maxnode, sgn);
3407 prec = MAX (lowprec, highprec)((lowprec) > (highprec) ? (lowprec) : (highprec));
3408 return prec;
3409}
3410
3411/* FIELD is a bit-field. We are finishing the processing for its
3412 enclosing type. Issue any appropriate messages and set appropriate
3413 flags. Returns false if an error has been diagnosed. */
3414
3415static bool
3416check_bitfield_decl (tree field)
3417{
3418 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"
, 3418, __FUNCTION__))->typed.type)
;
3419 tree w;
3420
3421 /* Extract the declared width of the bitfield, which has been
3422 temporarily stashed in DECL_BIT_FIELD_REPRESENTATIVE by grokbitfield. */
3423 w = DECL_BIT_FIELD_REPRESENTATIVE (field)((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3423, __FUNCTION__, (FIELD_DECL)))->field_decl.qualifier
)
;
3424 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"
, 3424, __FUNCTION__), 0 : 0))
;
3425 /* Remove the bit-field width indicator so that the rest of the
3426 compiler does not treat that value as a qualifier. */
3427 DECL_BIT_FIELD_REPRESENTATIVE (field)((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3427, __FUNCTION__, (FIELD_DECL)))->field_decl.qualifier
)
= NULL_TREE(tree) __null;
3428
3429 /* Detect invalid bit-field type. */
3430 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))
)
3431 {
3432 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"
, 3432, __FUNCTION__))->decl_minimal.locus)
,
3433 "bit-field %q#D with non-integral type %qT", field, type);
3434 w = error_mark_nodeglobal_trees[TI_ERROR_MARK];
3435 }
3436 else
3437 {
3438 location_t loc = input_location;
3439 /* Avoid the non_lvalue wrapper added by fold for PLUS_EXPRs. */
3440 STRIP_NOPS (w)(w) = tree_strip_nop_conversions ((const_cast<union tree_node
*> (((w)))))
;
3441
3442 /* detect invalid field size. */
3443 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"
, 3443, __FUNCTION__))->decl_minimal.locus)
;
3444 w = cxx_constant_value (w);
3445 input_location = loc;
3446
3447 if (TREE_CODE (w)((enum tree_code) (w)->base.code) != INTEGER_CST)
3448 {
3449 error ("bit-field %q+D width not an integer constant", field);
3450 w = error_mark_nodeglobal_trees[TI_ERROR_MARK];
3451 }
3452 else if (tree_int_cst_sgn (w) < 0)
3453 {
3454 error ("negative width in bit-field %q+D", field);
3455 w = error_mark_nodeglobal_trees[TI_ERROR_MARK];
3456 }
3457 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"
, 3457, __FUNCTION__))->decl_minimal.name)
!= 0)
3458 {
3459 error ("zero width for bit-field %q+D", field);
3460 w = error_mark_nodeglobal_trees[TI_ERROR_MARK];
3461 }
3462 else if ((TREE_CODE (type)((enum tree_code) (type)->base.code) != ENUMERAL_TYPE
3463 && TREE_CODE (type)((enum tree_code) (type)->base.code) != BOOLEAN_TYPE
3464 && 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"
, 3464, __FUNCTION__))->type_common.precision)
) > 0)
3465 || ((TREE_CODE (type)((enum tree_code) (type)->base.code) == ENUMERAL_TYPE
3466 || TREE_CODE (type)((enum tree_code) (type)->base.code) == BOOLEAN_TYPE)
3467 && 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"
, 3467, __FUNCTION__))->type_common.size)
, w)))
3468 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"
, 3468, __FUNCTION__))->decl_minimal.locus)
, 0,
3469 "width of %qD exceeds its type", field);
3470 else if (TREE_CODE (type)((enum tree_code) (type)->base.code) == ENUMERAL_TYPE)
3471 {
3472 int prec = enum_min_precision (type);
3473 if (compare_tree_int (w, prec) < 0)
3474 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"
, 3474, __FUNCTION__))->decl_minimal.locus)
, 0,
3475 "%qD is too small to hold all values of %q#T",
3476 field, type);
3477 }
3478 }
3479
3480 if (w != error_mark_nodeglobal_trees[TI_ERROR_MARK])
3481 {
3482 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"
, 3482, __FUNCTION__))->decl_common.size)
= fold_convert (bitsizetype, w)fold_convert_loc (((location_t) 0), sizetype_tab[(int) stk_bitsizetype
], w)
;
3483 DECL_BIT_FIELD (field)((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3483, __FUNCTION__, (FIELD_DECL)))->decl_common.decl_flag_1
)
= 1;
3484 return true;
3485 }
3486 else
3487 {
3488 /* Non-bit-fields are aligned for their type. */
3489 DECL_BIT_FIELD (field)((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3489, __FUNCTION__, (FIELD_DECL)))->decl_common.decl_flag_1
)
= 0;
3490 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"
, 3490, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3490, __FUNCTION__))->decl_common.lang_flag_4) = 0)
;
3491 return false;
3492 }
3493}
3494
3495/* FIELD is a non bit-field. We are finishing the processing for its
3496 enclosing type T. Issue any appropriate messages and set appropriate
3497 flags. */
3498
3499static bool
3500check_field_decl (tree field,
3501 tree t,
3502 int* cant_have_const_ctor,
3503 int* no_const_asn_ref)
3504{
3505 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"
, 3505, __FUNCTION__))->typed.type)
);
3506 bool any_default_members = false;
3507
3508 /* In C++98 an anonymous union cannot contain any fields which would change
3509 the settings of CANT_HAVE_CONST_CTOR and friends. */
3510 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"
, 3510, __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"
, 3510, __FUNCTION__))->type_with_lang_specific.lang_specific
))->anon_aggr))
&& cxx_dialect < cxx11)
3511 ;
3512 /* And, we don't set TYPE_HAS_CONST_COPY_CTOR, etc., for anonymous
3513 structs. So, we recurse through their fields here. */
3514 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"
, 3514, __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"
, 3514, __FUNCTION__))->type_with_lang_specific.lang_specific
))->anon_aggr)
)
3515 {
3516 for (tree fields = TYPE_FIELDS (type)((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3516, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
; fields;
3517 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"
, 3517, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3517, __FUNCTION__))->common.chain))
)
3518 if (TREE_CODE (fields)((enum tree_code) (fields)->base.code) == FIELD_DECL)
3519 any_default_members |= check_field_decl (fields, t,
3520 cant_have_const_ctor,
3521 no_const_asn_ref);
3522 }
3523 /* Check members with class type for constructors, destructors,
3524 etc. */
3525 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"
, 3525, __FUNCTION__))->type_common.lang_flag_5))
)
3526 {
3527 /* Never let anything with uninheritable virtuals
3528 make it through without complaint. */
3529 abstract_virtuals_error (field, type);
3530
3531 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == UNION_TYPE && cxx_dialect < cxx11)
3532 {
3533 static bool warned;
3534 int oldcount = errorcount(global_dc)->diagnostic_count[(int) (DK_ERROR)];
3535 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"
, 3535, __FUNCTION__))->type_common.needs_constructing_flag
)
)
3536 error ("member %q+#D with constructor not allowed in union",
3537 field);
3538 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"
, 3538, __FUNCTION__))->type_common.lang_flag_4))
)
3539 error ("member %q+#D with destructor not allowed in union", field);
3540 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"
, 3540, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_assign)
)
3541 error ("member %q+#D with copy assignment operator not allowed in union",
3542 field);
3543 if (!warned && errorcount(global_dc)->diagnostic_count[(int) (DK_ERROR)] > oldcount)
3544 {
3545 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"
, 3545, __FUNCTION__))->decl_minimal.locus)
, "unrestricted unions "
3546 "only available with %<-std=c++11%> or %<-std=gnu++11%>");
3547 warned = true;
3548 }
3549 }
3550 else
3551 {
3552 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"
, 3552, __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"
, 3552, __FUNCTION__))->type_common.needs_constructing_flag
)
;
3553 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"
, 3553, __FUNCTION__))->type_common.lang_flag_4))
3554 |= 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 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"
, 3555, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_assign)
3556 |= (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 || !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"
, 3557, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
);
3558 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"
, 3558, __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"
, 3558, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_ctor)
3559 || !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"
, 3559, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
);
3560 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"
, 3560, __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"
, 3560, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_assign)
;
3561 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"
, 3561, __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"
, 3561, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_ctor)
;
3562 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"
, 3562, __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"
, 3562, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_default_ctor)
3563 || 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"
, 3563, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_dflt)
);
3564 }
3565
3566 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"
, 3566, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
3567 && !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"
, 3567, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_const_copy_ctor)
)
3568 *cant_have_const_ctor = 1;
3569
3570 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"
, 3570, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
3571 && !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"
, 3571, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_const_copy_assign)
)
3572 *no_const_asn_ref = 1;
3573 }
3574
3575 check_abi_tags (t, field);
3576
3577 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"
, 3577, __FUNCTION__))->decl_common.initial)
!= NULL_TREE(tree) __null)
3578 /* `build_class_init_list' does not recognize
3579 non-FIELD_DECLs. */
3580 any_default_members = true;
3581
3582 return any_default_members;
3583}
3584
3585/* Check the data members (both static and non-static), class-scoped
3586 typedefs, etc., appearing in the declaration of T. Issue
3587 appropriate diagnostics. Sets ACCESS_DECLS to a list (in
3588 declaration order) of access declarations; each TREE_VALUE in this
3589 list is a USING_DECL.
3590
3591 In addition, set the following flags:
3592
3593 EMPTY_P
3594 The class is empty, i.e., contains no non-static data members.
3595
3596 CANT_HAVE_CONST_CTOR_P
3597 This class cannot have an implicitly generated copy constructor
3598 taking a const reference.
3599
3600 CANT_HAVE_CONST_ASN_REF
3601 This class cannot have an implicitly generated assignment
3602 operator taking a const reference.
3603
3604 All of these flags should be initialized before calling this
3605 function. */
3606
3607static void
3608check_field_decls (tree t, tree *access_decls,
3609 int *cant_have_const_ctor_p,
3610 int *no_const_asn_ref_p)
3611{
3612 int cant_pack = 0;
3613
3614 /* Assume there are no access declarations. */
3615 *access_decls = NULL_TREE(tree) __null;
3616 /* Effective C has things to say about classes with pointer members. */
3617 tree pointer_member = NULL_TREE(tree) __null;
3618 /* Default initialized members affect the whole class. */
3619 tree default_init_member = NULL_TREE(tree) __null;
3620 /* Lack of any non-static data member of non-volatile literal
3621 type affects a union. */
3622 bool found_nv_literal_p = false;
3623 /* Standard layout requires all FIELDS have same access. */
3624 int field_access = -1;
3625
3626 for (tree field = TYPE_FIELDS (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3626, __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"
, 3626, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3626, __FUNCTION__))->common.chain))
)
3627 {
3628 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"
, 3628, __FUNCTION__))->typed.type)
;
3629
3630 switch (TREE_CODE (field)((enum tree_code) (field)->base.code))
3631 {
3632 default:
3633 gcc_unreachable ()(fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3633, __FUNCTION__))
;
3634
3635 case USING_DECL:
3636 /* Save the access declarations for our caller. */
3637 *access_decls = tree_cons (NULL_TREE(tree) __null, field, *access_decls);
3638 break;
3639
3640 case TYPE_DECL:
3641 case TEMPLATE_DECL:
3642 break;
3643
3644 case FUNCTION_DECL:
3645 /* FIXME: We should fold in the checking from check_methods. */
3646 break;
3647
3648 case CONST_DECL:
3649 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"
, 3649, __FUNCTION__))->decl_common.nonlocal_flag)
= 1;
3650 break;
3651
3652 case VAR_DECL:
3653 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == UNION_TYPE
3654 && cxx_dialect < cxx11)
3655 {
3656 /* [class.union]
3657
3658 (C++98) If a union contains a static data member,
3659 ... the program is ill-formed. */
3660 if (cxx_dialect < cxx11)
3661 error ("in C++98 %q+D may not be static because it is "
3662 "a member of a union", field);
3663 }
3664 goto data_member;
3665
3666 case FIELD_DECL:
3667 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == UNION_TYPE)
3668 {
3669 /* [class.union]
3670
3671 If a union contains ... or a [non-static data] member
3672 of reference type, the program is ill-formed. */
3673 if (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE))
3674 error ("non-static data member %q+D in a union may not "
3675 "have reference type %qT", field, type);
3676 }
3677
3678 data_member:
3679 /* Common VAR_DECL & FIELD_DECL processing. */
3680 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"
, 3680, __FUNCTION__))->decl_minimal.context)
= t;
3681 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"
, 3681, __FUNCTION__))->decl_common.nonlocal_flag)
= 1;
3682
3683 /* Template instantiation can cause this. Perhaps this
3684 should be a specific instantiation check? */
3685 if (TREE_CODE (type)((enum tree_code) (type)->base.code) == FUNCTION_TYPE)
3686 {
3687 error ("data member %q+D invalidly declared function type", field);
3688 type = build_pointer_type (type);
3689 TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3689, __FUNCTION__))->typed.type)
= type;
3690 }
3691 else if (TREE_CODE (type)((enum tree_code) (type)->base.code) == METHOD_TYPE)
3692 {
3693 error ("data member %q+D invalidly declared method type", field);
3694 type = build_pointer_type (type);
3695 TREE_TYPE (field)((contains_struct_check ((field), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3695, __FUNCTION__))->typed.type)
= type;
3696 }
3697
3698 break;
3699 }
3700
3701 if (TREE_CODE (field)((enum tree_code) (field)->base.code) != FIELD_DECL)
3702 continue;
3703
3704 if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3705 continue;
3706
3707 /* If it is not a union and at least one non-static data member is
3708 non-literal, the whole class becomes non-literal. Per Core/1453,
3709 volatile non-static data members and base classes are also not allowed.
3710 If it is a union, we might set CLASSTYPE_LITERAL_P after we've seen all
3711 members.
3712 Note: if the type is incomplete we will complain later on. */
3713 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"
, 3713, __FUNCTION__))->type_common.size) != (tree) __null
)
)
3714 {
3715 if (!literal_type_p (type) || CP_TYPE_VOLATILE_P (type)((cp_type_quals (type) & TYPE_QUAL_VOLATILE) != 0))
3716 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"
, 3716, __FUNCTION__))->type_with_lang_specific.lang_specific
))->is_literal)
= false;
3717 else
3718 found_nv_literal_p = true;
3719 }
3720
3721 int this_field_access = (TREE_PROTECTED (field)((field)->base.protected_flag) ? 1
3722 : TREE_PRIVATE (field)((field)->base.private_flag) ? 2 : 0);
3723 if (field_access != this_field_access)
3724 {
3725 /* A standard-layout class is a class that:
3726
3727 ... has the same access control (Clause 11) for all
3728 non-static data members, */
3729 if (field_access < 0)
3730 field_access = this_field_access;
3731 else
3732 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"
, 3732, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
= 1;
3733
3734 /* Aggregates must be public. */
3735 if (this_field_access)
3736 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"
, 3736, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_aggregate)
= 1;
3737 }
3738
3739 /* If this is of reference type, check if it needs an init. */
3740 if (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE))
3741 {
3742 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"
, 3742, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_pod_class)
= 1;
3743 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"
, 3743, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
= 1;
3744 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"
, 3744, __FUNCTION__))->decl_common.initial)
== NULL_TREE(tree) __null)
3745 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"
, 3745, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init = (1))
;
3746 if (cxx_dialect < cxx11)
3747 {
3748 /* ARM $12.6.2: [A member initializer list] (or, for an
3749 aggregate, initialization by a brace-enclosed list) is the
3750 only way to initialize non-static const and reference
3751 members. */
3752 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"
, 3752, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_assign)
= 1;
3753 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"
, 3753, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_assign)
= 1;
3754 }
3755 }
3756
3757 type = strip_array_types (type);
3758
3759 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"
, 3759, __FUNCTION__))->base.u.bits.packed_flag)
)
3760 {
3761 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"
, 3761, __FUNCTION__))->base.u.bits.packed_flag)
)
3762 {
3763 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"
, 3763, __FUNCTION__))->decl_minimal.locus)
, 0,
3764 "ignoring packed attribute because of"
3765 " unpacked non-POD field %q#D", field);
3766 cant_pack = 1;
3767 }
3768 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"
, 3768, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3768, __FUNCTION__))->decl_common.lang_flag_4) == 1)
3769 || 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"
, 3769, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3769, __FUNCTION__))->type_common.align) ? ((unsigned)1)
<< (((tree_class_check ((((contains_struct_check ((field
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3769, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3769, __FUNCTION__))->type_common.align) - 1) : 0)
> BITS_PER_UNIT(8))
3770 DECL_PACKED (field)((tree_check ((field), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3770, __FUNCTION__, (FIELD_DECL)))->base.u.bits.packed_flag
)
= 1;
3771 }
3772
3773 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"
, 3773, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3773, __FUNCTION__))->decl_common.lang_flag_4) == 1)
3774 && 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"
, 3774, __FUNCTION__, (FIELD_DECL)))->field_decl.qualifier
)
))
3775 /* We don't treat zero-width bitfields as making a class
3776 non-empty. */
3777 ;
3778 else if (field_poverlapping_p (field)
3779 && 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"
, 3779, __FUNCTION__))->typed.type)
))
3780 /* Empty data members also don't make a class non-empty. */
3781 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"
, 3781, __FUNCTION__))->type_with_lang_specific.lang_specific
))->contains_empty_class_p)
= 1;
3782 else
3783 {
3784 /* The class is non-empty. */
3785 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"
, 3785, __FUNCTION__))->type_with_lang_specific.lang_specific
))->empty_p)
= 0;
3786 /* The class is not even nearly empty. */
3787 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"
, 3787, __FUNCTION__))->type_with_lang_specific.lang_specific
))->nearly_empty_p)
= 0;
3788 /* If one of the data members contains an empty class, so
3789 does T. */
3790 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"
, 3790, __FUNCTION__))->type_common.lang_flag_5))
3791 && 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"
, 3791, __FUNCTION__))->type_with_lang_specific.lang_specific
))->contains_empty_class_p)
)
3792 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"
, 3792, __FUNCTION__))->type_with_lang_specific.lang_specific
))->contains_empty_class_p)
= 1;
3793 }
3794
3795 /* This is used by -Weffc++ (see below). Warn only for pointers
3796 to members which might hold dynamic memory. So do not warn
3797 for pointers to functions or pointers to members. */
3798 if (TYPE_PTR_P (type)(((enum tree_code) (type)->base.code) == POINTER_TYPE)
3799 && !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"
, 3799, __FUNCTION__))->typed.type))->base.code) == FUNCTION_TYPE
)
)
3800 pointer_member = field;
3801
3802 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"
, 3802, __FUNCTION__))->type_common.lang_flag_5))
)
3803 {
3804 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"
, 3804, __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"
, 3804, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init : 0)
)
3805 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"
, 3805, __FUNCTION__))->type_with_lang_specific.lang_specific
))->ref_needs_init = (1))
;
3806 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"
, 3806, __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"
, 3806, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0)
)
3807 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"
, 3807, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init = (1))
;
3808 }
3809
3810 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"
, 3810, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3810, __FUNCTION__))->decl_common.lang_flag_0))
|| TYPE_HAS_MUTABLE_P (type)(cp_has_mutable_p (type)))
3811 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"
, 3811, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_mutable)
= 1;
3812
3813 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"
, 3813, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3813, __FUNCTION__))->decl_common.lang_flag_0))
)
3814 {
3815 if (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE))
3816 error ("member %q+D cannot be declared as a %<mutable%> "
3817 "reference", field);
3818 else if (CP_TYPE_CONST_P (type)((cp_type_quals (type) & TYPE_QUAL_CONST) != 0))
3819 error ("member %q+D cannot be declared both %<const%> "
3820 "and %<mutable%>", field);
3821 }
3822
3823 if (! layout_pod_type_p (type))
3824 /* DR 148 now allows pointers to members (which are POD themselves),
3825 to be allowed in POD structs. */
3826 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"
, 3826, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_pod_class)
= 1;
3827
3828 if (field_poverlapping_p (field))
3829 /* A potentially-overlapping non-static data member makes the class
3830 non-layout-POD. */
3831 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"
, 3831, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_pod_class)
= 1;
3832
3833 if (!std_layout_type_p (type))
3834 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"
, 3834, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
= 1;
3835
3836 if (! zero_init_p (type))
3837 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"
, 3837, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_zero_init)
= 1;
3838
3839 /* We set DECL_C_BIT_FIELD in grokbitfield.
3840 If the type and width are valid, we'll also set DECL_BIT_FIELD. */
3841 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"
, 3841, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3841, __FUNCTION__))->decl_common.lang_flag_4) == 1)
)
3842 check_bitfield_decl (field);
3843
3844 if (check_field_decl (field, t,
3845 cant_have_const_ctor_p, no_const_asn_ref_p))
3846 {
3847 if (default_init_member
3848 && TREE_CODE (t)((enum tree_code) (t)->base.code) == UNION_TYPE)
3849 {
3850 error ("multiple fields in union %qT initialized", t);
3851 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"
, 3851, __FUNCTION__))->decl_minimal.locus)
,
3852 "initialized member %q+D declared here",
3853 default_init_member);
3854 }
3855 default_init_member = field;
3856 }
3857
3858 /* Now that we've removed bit-field widths from DECL_INITIAL,
3859 anything left in DECL_INITIAL is an NSDMI that makes the class
3860 non-aggregate in C++11. */
3861 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"
, 3861, __FUNCTION__))->decl_common.initial)
&& cxx_dialect < cxx14)
3862 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"
, 3862, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_aggregate)
= true;
3863
3864 if (CP_TYPE_CONST_P (type)((cp_type_quals (type) & TYPE_QUAL_CONST) != 0))
3865 {
3866 /* If any field is const, the structure type is pseudo-const. */
3867 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"
, 3867, __FUNCTION__))->type_with_lang_specific.lang_specific
))->fields_readonly)
= 1;
3868 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"
, 3868, __FUNCTION__))->decl_common.initial)
== NULL_TREE(tree) __null)
3869 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"
, 3869, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init = (1))
;
3870 if (cxx_dialect < cxx11)
3871 {
3872 /* ARM $12.6.2: [A member initializer list] (or, for an
3873 aggregate, initialization by a brace-enclosed list) is the
3874 only way to initialize non-static const and reference
3875 members. */
3876 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"
, 3876, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_copy_assign)
= 1;
3877 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"
, 3877, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_move_assign)
= 1;
3878 }
3879 }
3880 /* A field that is pseudo-const makes the structure likewise. */
3881 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"
, 3881, __FUNCTION__))->type_common.lang_flag_5))
)
3882 {
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)
|= 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"
, 3883, __FUNCTION__))->type_with_lang_specific.lang_specific
))->fields_readonly)
;
3884 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"
, 3886, __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"
, 3885, __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"
, 3885, __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"
, 3886, __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"
, 3886, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0)))
3885 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"
, 3886, __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"
, 3885, __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"
, 3885, __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"
, 3886, __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"
, 3886, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0)))
3886 | 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"
, 3886, __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"
, 3885, __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"
, 3885, __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"
, 3886, __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"
, 3886, __FUNCTION__))->type_with_lang_specific.lang_specific
))->const_needs_init : 0)))
;
3887 }
3888
3889 /* Core issue 80: A non-static data member is required to have a
3890 different name from the class iff the class has a
3891 user-declared constructor. */
3892 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"
, 3892, __FUNCTION__))->decl_minimal.name)
, t)
3893 && 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"
, 3893, __FUNCTION__))->type_common.lang_flag_1))
)
3894 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"
, 3894, __FUNCTION__))->decl_minimal.locus)
,
3895 "field %q#D with same name as class", field);
3896 }
3897
3898 /* Per CWG 2096, a type is a literal type if it is a union, and at least
3899 one of its non-static data members is of non-volatile literal type. */
3900 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == UNION_TYPE && found_nv_literal_p)
3901 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"
, 3901, __FUNCTION__))->type_with_lang_specific.lang_specific
))->is_literal)
= true;
3902
3903 /* Effective C++ rule 11: if a class has dynamic memory held by pointers,
3904 it should also define a copy constructor and an assignment operator to
3905 implement the correct copy semantic (deep vs shallow, etc.). As it is
3906 not feasible to check whether the constructors do allocate dynamic memory
3907 and store it within members, we approximate the warning like this:
3908
3909 -- Warn only if there are members which are pointers
3910 -- Warn only if there is a non-trivial constructor (otherwise,
3911 there cannot be memory allocated).
3912 -- Warn only if there is a non-trivial destructor. We assume that the
3913 user at least implemented the cleanup correctly, and a destructor
3914 is needed to free dynamic memory.
3915
3916 This seems enough for practical purposes. */
3917 if (warn_ecppglobal_options.x_warn_ecpp
3918 && pointer_member
3919 && 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"
, 3919, __FUNCTION__))->type_common.lang_flag_1))
3920 && 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"
, 3920, __FUNCTION__))->type_common.lang_flag_4))
3921 && !(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"
, 3921, __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"
, 3921, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
))
3922 {
3923 if (warning (OPT_Weffc__, "%q#T has pointer data members", t))
3924 {
3925 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"
, 3925, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_ctor)
)
3926 {
3927 warning (OPT_Weffc__,
3928 " but does not declare %<%T(const %T&)%>", t, t);
3929 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"
, 3929, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
)
3930 warning (OPT_Weffc__, " or %<operator=(const %T&)%>", t);
3931 }
3932 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"
, 3932, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_copy_assign)
)
3933 warning (OPT_Weffc__,
3934 " but does not declare %<operator=(const %T&)%>", t);
3935 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"
, 3935, __FUNCTION__))->decl_minimal.locus)
,
3936 "pointer member %q+D declared here", pointer_member);
3937 }
3938 }
3939
3940 /* Non-static data member initializers make the default constructor
3941 non-trivial. */
3942 if (default_init_member)
3943 {
3944 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"
, 3944, __FUNCTION__))->type_common.needs_constructing_flag
)
= true;
3945 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"
, 3945, __FUNCTION__))->type_with_lang_specific.lang_specific
))->has_complex_dflt)
= true;
3946 }
3947
3948 /* If any of the fields couldn't be packed, unset TYPE_PACKED. */
3949 if (cant_pack)
3950 TYPE_PACKED (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/class.c"
, 3950, __FUNCTION__))->base.u.bits.packed_flag)
= 0;
3951
3952 /* Check anonymous struct/anonymous union fields. */
3953 finish_struct_anon (t);
3954
3955 /* We've built up the list of access declarations in reverse order.
3956 Fix that now. */
3957 *access_decls = nreverse (*access_decls);
3958}
3959
3960/* If TYPE is an empty class type, records its OFFSET in the table of
3961 OFFSETS. */
3962
3963static int
3964record_subobject_offset (tree type, tree offset, splay_tree offsets)
3965{
3966 splay_tree_node n;
3967
3968 if (!is_empty_class (type))
3969 return 0;
3970
3971 /* Record the location of this empty object in OFFSETS. */
3972 n = splay_tree_lookup (offsets, (splay_tree_key) offset);
3973 if (!n)
3974 n = splay_tree_insert (offsets,
3975 (splay_tree_key) offset,
3976 (splay_tree_value) NULL_TREE(tree) __null);
3977 n->value = ((splay_tree_value)
3978 tree_cons (NULL_TREE(tree) __null,
3979 type,
3980 (tree) n->value));
3981
3982 return 0;
3983}
3984
3985/* Returns nonzero if TYPE is an empty class type and there is
3986 already an entry in OFFSETS for the same TYPE as the same OFFSET. */
3987
3988static int
3989check_subobject_offset (tree type, tree offset, splay_tree offsets)
3990{
3991 splay_tree_node n;
3992 tree t;
3993
3994 if (!is_empty_class (type))
3995 return 0;
3996
3997 /* Record the location of this empty object in OFFSETS. */
3998 n = splay_tree_lookup (offsets, (splay_tree_key) offset);
3999 if (!n)
4000 return 0;
4001
4002 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"
, 4002, __FUNCTION__))->common.chain)
)
4003 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"
, 4003, __FUNCTION__, (TREE_LIST)))->list.value)), (type),
0)
)
4004 return 1;
4005
4006 return 0;
4007}
4008
4009/* Walk through all the subobjects of TYPE (located at OFFSET). Call
4010 F for every subobject, passing it the type, offset, and table of
4011 OFFSETS. If VBASES_P is one, then virtual non-primary bases should
4012 be traversed.
4013
4014 If MAX_OFFSET is non-NULL, then subobjects with an offset greater
4015 than MAX_OFFSET will not be walked.
4016
4017 If F returns a nonzero value, the traversal ceases, and that value
4018 is returned. Otherwise, returns zero. */
4019
4020static int
4021walk_subobject_offsets (tree type,
4022 subobject_offset_fn f,
4023 tree offset,