Bug Summary

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

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-unknown-linux-gnu -analyze -disable-free -disable-llvm-verifier -discard-value-names -main-file-name semantics.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-ZONynP.plist -x c++ /home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c

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

1/* Perform the semantic phase of parsing, i.e., the process of
2 building tree structure, checking semantic consistency, and
3 building RTL. These routines are used both during actual parsing
4 and during the instantiation of template functions.
5
6 Copyright (C) 1998-2021 Free Software Foundation, Inc.
7 Written by Mark Mitchell (mmitchell@usa.net) based on code found
8 formerly in parse.y and pt.c.
9
10 This file is part of GCC.
11
12 GCC is free software; you can redistribute it and/or modify it
13 under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 3, or (at your option)
15 any later version.
16
17 GCC is distributed in the hope that it will be useful, but
18 WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 General Public License for more details.
21
22You should have received a copy of the GNU General Public License
23along with GCC; see the file COPYING3. If not see
24<http://www.gnu.org/licenses/>. */
25
26#include "config.h"
27#include "system.h"
28#include "coretypes.h"
29#include "target.h"
30#include "bitmap.h"
31#include "cp-tree.h"
32#include "stringpool.h"
33#include "cgraph.h"
34#include "stmt.h"
35#include "varasm.h"
36#include "stor-layout.h"
37#include "c-family/c-objc.h"
38#include "tree-inline.h"
39#include "intl.h"
40#include "tree-iterator.h"
41#include "omp-general.h"
42#include "convert.h"
43#include "stringpool.h"
44#include "attribs.h"
45#include "gomp-constants.h"
46#include "predict.h"
47#include "memmodel.h"
48
49/* There routines provide a modular interface to perform many parsing
50 operations. They may therefore be used during actual parsing, or
51 during template instantiation, which may be regarded as a
52 degenerate form of parsing. */
53
54static tree maybe_convert_cond (tree);
55static tree finalize_nrv_r (tree *, int *, void *);
56static tree capture_decltype (tree);
57
58/* Used for OpenMP non-static data member privatization. */
59
60static hash_map<tree, tree> *omp_private_member_map;
61static vec<tree> omp_private_member_vec;
62static bool omp_private_member_ignore_next;
63
64
65/* Deferred Access Checking Overview
66 ---------------------------------
67
68 Most C++ expressions and declarations require access checking
69 to be performed during parsing. However, in several cases,
70 this has to be treated differently.
71
72 For member declarations, access checking has to be deferred
73 until more information about the declaration is known. For
74 example:
75
76 class A {
77 typedef int X;
78 public:
79 X f();
80 };
81
82 A::X A::f();
83 A::X g();
84
85 When we are parsing the function return type `A::X', we don't
86 really know if this is allowed until we parse the function name.
87
88 Furthermore, some contexts require that access checking is
89 never performed at all. These include class heads, and template
90 instantiations.
91
92 Typical use of access checking functions is described here:
93
94 1. When we enter a context that requires certain access checking
95 mode, the function `push_deferring_access_checks' is called with
96 DEFERRING argument specifying the desired mode. Access checking
97 may be performed immediately (dk_no_deferred), deferred
98 (dk_deferred), or not performed (dk_no_check).
99
100 2. When a declaration such as a type, or a variable, is encountered,
101 the function `perform_or_defer_access_check' is called. It
102 maintains a vector of all deferred checks.
103
104 3. The global `current_class_type' or `current_function_decl' is then
105 setup by the parser. `enforce_access' relies on these information
106 to check access.
107
108 4. Upon exiting the context mentioned in step 1,
109 `perform_deferred_access_checks' is called to check all declaration
110 stored in the vector. `pop_deferring_access_checks' is then
111 called to restore the previous access checking mode.
112
113 In case of parsing error, we simply call `pop_deferring_access_checks'
114 without `perform_deferred_access_checks'. */
115
116struct GTY(()) deferred_access {
117 /* A vector representing name-lookups for which we have deferred
118 checking access controls. We cannot check the accessibility of
119 names used in a decl-specifier-seq until we know what is being
120 declared because code like:
121
122 class A {
123 class B {};
124 B* f();
125 }
126
127 A::B* A::f() { return 0; }
128
129 is valid, even though `A::B' is not generally accessible. */
130 vec<deferred_access_check, va_gc> *deferred_access_checks;
131
132 /* The current mode of access checks. */
133 enum deferring_kind deferring_access_checks_kind;
134};
135
136/* Data for deferred access checking. */
137static GTY(()) vec<deferred_access, va_gc> *deferred_access_stack;
138static GTY(()) unsigned deferred_access_no_check;
139
140/* Save the current deferred access states and start deferred
141 access checking iff DEFER_P is true. */
142
143void
144push_deferring_access_checks (deferring_kind deferring)
145{
146 /* For context like template instantiation, access checking
147 disabling applies to all nested context. */
148 if (deferred_access_no_check || deferring == dk_no_check)
149 deferred_access_no_check++;
150 else
151 {
152 deferred_access e = {NULL__null, deferring};
153 vec_safe_push (deferred_access_stack, e);
154 }
155}
156
157/* Save the current deferred access states and start deferred access
158 checking, continuing the set of deferred checks in CHECKS. */
159
160void
161reopen_deferring_access_checks (vec<deferred_access_check, va_gc> * checks)
162{
163 push_deferring_access_checks (dk_deferred);
164 if (!deferred_access_no_check)
165 deferred_access_stack->last().deferred_access_checks = checks;
166}
167
168/* Resume deferring access checks again after we stopped doing
169 this previously. */
170
171void
172resume_deferring_access_checks (void)
173{
174 if (!deferred_access_no_check)
175 deferred_access_stack->last().deferring_access_checks_kind = dk_deferred;
176}
177
178/* Stop deferring access checks. */
179
180void
181stop_deferring_access_checks (void)
182{
183 if (!deferred_access_no_check)
184 deferred_access_stack->last().deferring_access_checks_kind = dk_no_deferred;
185}
186
187/* Discard the current deferred access checks and restore the
188 previous states. */
189
190void
191pop_deferring_access_checks (void)
192{
193 if (deferred_access_no_check)
194 deferred_access_no_check--;
195 else
196 deferred_access_stack->pop ();
197}
198
199/* Returns a TREE_LIST representing the deferred checks.
200 The TREE_PURPOSE of each node is the type through which the
201 access occurred; the TREE_VALUE is the declaration named.
202 */
203
204vec<deferred_access_check, va_gc> *
205get_deferred_access_checks (void)
206{
207 if (deferred_access_no_check)
208 return NULL__null;
209 else
210 return (deferred_access_stack->last().deferred_access_checks);
211}
212
213/* Take current deferred checks and combine with the
214 previous states if we also defer checks previously.
215 Otherwise perform checks now. */
216
217void
218pop_to_parent_deferring_access_checks (void)
219{
220 if (deferred_access_no_check)
221 deferred_access_no_check--;
222 else
223 {
224 vec<deferred_access_check, va_gc> *checks;
225 deferred_access *ptr;
226
227 checks = (deferred_access_stack->last ().deferred_access_checks);
228
229 deferred_access_stack->pop ();
230 ptr = &deferred_access_stack->last ();
231 if (ptr->deferring_access_checks_kind == dk_no_deferred)
232 {
233 /* Check access. */
234 perform_access_checks (checks, tf_warning_or_error);
235 }
236 else
237 {
238 /* Merge with parent. */
239 int i, j;
240 deferred_access_check *chk, *probe;
241
242 FOR_EACH_VEC_SAFE_ELT (checks, i, chk)for (i = 0; vec_safe_iterate ((checks), (i), &(chk)); ++(
i))
243 {
244 FOR_EACH_VEC_SAFE_ELT (ptr->deferred_access_checks, j, probe)for (j = 0; vec_safe_iterate ((ptr->deferred_access_checks
), (j), &(probe)); ++(j))
245 {
246 if (probe->binfo == chk->binfo &&
247 probe->decl == chk->decl &&
248 probe->diag_decl == chk->diag_decl)
249 goto found;
250 }
251 /* Insert into parent's checks. */
252 vec_safe_push (ptr->deferred_access_checks, *chk);
253 found:;
254 }
255 }
256 }
257}
258
259/* Called from enforce_access. A class has attempted (but failed) to access
260 DECL. It is already established that a baseclass of that class,
261 PARENT_BINFO, has private access to DECL. Examine certain special cases
262 to find a decl that accurately describes the source of the problem. If
263 none of the special cases apply, simply return DECL as the source of the
264 problem. */
265
266static tree
267get_class_access_diagnostic_decl (tree parent_binfo, tree decl)
268{
269 /* When a class is denied access to a decl in a baseclass, most of the
270 time it is because the decl itself was declared as private at the point
271 of declaration.
272
273 However, in C++, there are (at least) two situations in which a decl
274 can be private even though it was not originally defined as such.
275 These two situations only apply if a baseclass had private access to
276 DECL (this function is only called if that is the case). */
277
278 /* We should first check whether the reason the parent had private access
279 to DECL was simply because DECL was created and declared as private in
280 the parent. If it was, then DECL is definitively the source of the
281 problem. */
282 if (SAME_BINFO_TYPE_P (context_for_name_lookup (decl),((context_for_name_lookup (decl)) == (((contains_struct_check
(((tree_check ((parent_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 283, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 283, __FUNCTION__))->typed.type)))
283 BINFO_TYPE (parent_binfo))((context_for_name_lookup (decl)) == (((contains_struct_check
(((tree_check ((parent_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 283, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 283, __FUNCTION__))->typed.type)))
)
284 return decl;
285
286 /* 1. If the "using" keyword is used to inherit DECL within the parent,
287 this may cause DECL to be private, so we should return the using
288 statement as the source of the problem.
289
290 Scan the fields of PARENT_BINFO and see if there are any using decls. If
291 there are, see if they inherit DECL. If they do, that's where DECL must
292 have been declared private. */
293
294 for (tree parent_field = TYPE_FIELDS (BINFO_TYPE (parent_binfo))((tree_check3 ((((contains_struct_check (((tree_check ((parent_binfo
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 294, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 294, __FUNCTION__))->typed.type)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 294, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
;
295 parent_field;
296 parent_field = DECL_CHAIN (parent_field)(((contains_struct_check (((contains_struct_check ((parent_field
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 296, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 296, __FUNCTION__))->common.chain))
)
297 /* Not necessary, but also check TREE_PRIVATE for the sake of
298 eliminating obviously non-relevant using decls. */
299 if (TREE_CODE (parent_field)((enum tree_code) (parent_field)->base.code) == USING_DECL
300 && TREE_PRIVATE (parent_field)((parent_field)->base.private_flag))
301 {
302 tree decl_stripped = strip_using_decl (parent_field);
303
304 /* The using statement might be overloaded. If so, we need to
305 check all of the overloads. */
306 for (ovl_iterator iter (decl_stripped); iter; ++iter)
307 /* If equal, the using statement inherits DECL, and so is the
308 source of the access failure, so return it. */
309 if (*iter == decl)
310 return parent_field;
311 }
312
313 /* 2. If DECL was privately inherited by the parent class, then DECL will
314 be inaccessible, even though it may originally have been accessible to
315 deriving classes. In that case, the fault lies with the parent, since it
316 used a private inheritance, so we return the parent as the source of the
317 problem.
318
319 Since this is the last check, we just assume it's true. At worst, it
320 will simply point to the class that failed to give access, which is
321 technically true. */
322 return TYPE_NAME (BINFO_TYPE (parent_binfo))((tree_class_check ((((contains_struct_check (((tree_check ((
parent_binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 322, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 322, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 322, __FUNCTION__))->type_common.name)
;
323}
324
325/* If the current scope isn't allowed to access DECL along
326 BASETYPE_PATH, give an error, or if we're parsing a function or class
327 template, defer the access check to be performed at instantiation time.
328 The most derived class in BASETYPE_PATH is the one used to qualify DECL.
329 DIAG_DECL is the declaration to use in the error diagnostic. */
330
331static bool
332enforce_access (tree basetype_path, tree decl, tree diag_decl,
333 tsubst_flags_t complain, access_failure_info *afi = NULL__null)
334{
335 gcc_assert (TREE_CODE (basetype_path) == TREE_BINFO)((void)(!(((enum tree_code) (basetype_path)->base.code) ==
TREE_BINFO) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 335, __FUNCTION__), 0 : 0))
;
336
337 if (flag_new_inheriting_ctorsglobal_options.x_flag_new_inheriting_ctors
338 && DECL_INHERITED_CTOR (decl)((((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/semantics.c"
, 338, __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/semantics.c"
, 338, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->base
.code) == FUNCTION_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/semantics.c"
, 338, __FUNCTION__, (TEMPLATE_DECL))))))))->result : decl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 338, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
) ? __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/semantics.c"
, 338, __FUNCTION__, (TEMPLATE_DECL))))))))->result : decl
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 338, __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/semantics.c"
, 338, __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/semantics.c"
, 338, __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/semantics.c"
, 338, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null)
)
339 {
340 /* 7.3.3/18: The additional constructors are accessible if they would be
341 accessible when used to construct an object of the corresponding base
342 class. */
343 decl = strip_inheriting_ctors (decl);
344 basetype_path = lookup_base (basetype_path, DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 344, __FUNCTION__))->decl_minimal.context)
,
345 ba_any, NULL__null, complain);
346 }
347
348 tree cs = current_scope ();
349 if (processing_template_declscope_chain->x_processing_template_decl
350 && (CLASS_TYPE_P (cs)(((((enum tree_code) (cs)->base.code)) == RECORD_TYPE || (
((enum tree_code) (cs)->base.code)) == UNION_TYPE) &&
((tree_class_check ((cs), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 350, __FUNCTION__))->type_common.lang_flag_5))
|| TREE_CODE (cs)((enum tree_code) (cs)->base.code) == FUNCTION_DECL))
351 if (tree template_info = get_template_info (cs))
352 {
353 /* When parsing a function or class template, we in general need to
354 defer access checks until template instantiation time, since a friend
355 declaration may grant access only to a particular specialization of
356 the template. */
357
358 if (accessible_p (basetype_path, decl, /*consider_local_p=*/true))
359 /* But if the member is deemed accessible at parse time, then we can
360 assume it'll be accessible at instantiation time. */
361 return true;
362
363 /* Access of a dependent decl should be rechecked after tsubst'ing
364 into the user of the decl, rather than explicitly deferring the
365 check here. */
366 gcc_assert (!uses_template_parms (decl))((void)(!(!uses_template_parms (decl)) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 366, __FUNCTION__), 0 : 0))
;
367 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == FIELD_DECL)
368 gcc_assert (!uses_template_parms (DECL_CONTEXT (decl)))((void)(!(!uses_template_parms (((contains_struct_check ((decl
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 368, __FUNCTION__))->decl_minimal.context))) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 368, __FUNCTION__), 0 : 0))
;
369
370 /* Defer this access check until instantiation time. */
371 deferred_access_check access_check;
372 access_check.binfo = basetype_path;
373 access_check.decl = decl;
374 access_check.diag_decl = diag_decl;
375 access_check.loc = input_location;
376 vec_safe_push (TI_DEFERRED_ACCESS_CHECKS (template_info)((struct tree_template_info*)(tree_check ((template_info), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 376, __FUNCTION__, (TEMPLATE_INFO))))->deferred_access_checks
, access_check);
377 return true;
378 }
379
380 if (!accessible_p (basetype_path, decl, /*consider_local_p=*/true))
381 {
382 if (flag_new_inheriting_ctorsglobal_options.x_flag_new_inheriting_ctors)
383 diag_decl = strip_inheriting_ctors (diag_decl);
384 if (complain & tf_error)
385 {
386 access_kind access_failure_reason = ak_none;
387
388 /* By default, using the decl as the source of the problem will
389 usually give correct results. */
390 tree diag_location = diag_decl;
391
392 /* However, if a parent of BASETYPE_PATH had private access to decl,
393 then it actually might be the case that the source of the problem
394 is not DECL. */
395 tree parent_binfo = get_parent_with_private_access (decl,
396 basetype_path);
397
398 /* So if a parent did have private access, then we need to do
399 special checks to obtain the best diagnostic location decl. */
400 if (parent_binfo != NULL_TREE(tree) __null)
401 {
402 diag_location = get_class_access_diagnostic_decl (parent_binfo,
403 diag_decl);
404
405 /* We also at this point know that the reason access failed was
406 because decl was private. */
407 access_failure_reason = ak_private;
408 }
409
410 /* Finally, generate an error message. */
411 complain_about_access (decl, diag_decl, diag_location, true,
412 access_failure_reason);
413 }
414 if (afi)
415 afi->record_access_failure (basetype_path, decl, diag_decl);
416 return false;
417 }
418
419 return true;
420}
421
422/* Perform the access checks in CHECKS. The TREE_PURPOSE of each node
423 is the BINFO indicating the qualifying scope used to access the
424 DECL node stored in the TREE_VALUE of the node. If CHECKS is empty
425 or we aren't in SFINAE context or all the checks succeed return TRUE,
426 otherwise FALSE. */
427
428bool
429perform_access_checks (vec<deferred_access_check, va_gc> *checks,
430 tsubst_flags_t complain)
431{
432 int i;
433 deferred_access_check *chk;
434 location_t loc = input_location;
435 bool ok = true;
436
437 if (!checks)
438 return true;
439
440 FOR_EACH_VEC_SAFE_ELT (checks, i, chk)for (i = 0; vec_safe_iterate ((checks), (i), &(chk)); ++(
i))
441 {
442 input_location = chk->loc;
443 ok &= enforce_access (chk->binfo, chk->decl, chk->diag_decl, complain);
444 }
445
446 input_location = loc;
447 return (complain & tf_error) ? true : ok;
448}
449
450/* Perform the deferred access checks.
451
452 After performing the checks, we still have to keep the list
453 `deferred_access_stack->deferred_access_checks' since we may want
454 to check access for them again later in a different context.
455 For example:
456
457 class A {
458 typedef int X;
459 static X a;
460 };
461 A::X A::a, x; // No error for `A::a', error for `x'
462
463 We have to perform deferred access of `A::X', first with `A::a',
464 next with `x'. Return value like perform_access_checks above. */
465
466bool
467perform_deferred_access_checks (tsubst_flags_t complain)
468{
469 return perform_access_checks (get_deferred_access_checks (), complain);
470}
471
472/* Defer checking the accessibility of DECL, when looked up in
473 BINFO. DIAG_DECL is the declaration to use to print diagnostics.
474 Return value like perform_access_checks above.
475 If non-NULL, report failures to AFI. */
476
477bool
478perform_or_defer_access_check (tree binfo, tree decl, tree diag_decl,
479 tsubst_flags_t complain,
480 access_failure_info *afi)
481{
482 int i;
483 deferred_access *ptr;
484 deferred_access_check *chk;
485
486 /* Exit if we are in a context that no access checking is performed. */
487 if (deferred_access_no_check)
488 return true;
489
490 gcc_assert (TREE_CODE (binfo) == TREE_BINFO)((void)(!(((enum tree_code) (binfo)->base.code) == TREE_BINFO
) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 490, __FUNCTION__), 0 : 0))
;
491
492 ptr = &deferred_access_stack->last ();
493
494 /* If we are not supposed to defer access checks, just check now. */
495 if (ptr->deferring_access_checks_kind == dk_no_deferred)
496 {
497 bool ok = enforce_access (binfo, decl, diag_decl, complain, afi);
498 return (complain & tf_error) ? true : ok;
499 }
500
501 /* See if we are already going to perform this check. */
502 FOR_EACH_VEC_SAFE_ELT (ptr->deferred_access_checks, i, chk)for (i = 0; vec_safe_iterate ((ptr->deferred_access_checks
), (i), &(chk)); ++(i))
503 {
504 if (chk->decl == decl && chk->binfo == binfo &&
505 chk->diag_decl == diag_decl)
506 {
507 return true;
508 }
509 }
510 /* If not, record the check. */
511 deferred_access_check new_access = {binfo, decl, diag_decl, input_location};
512 vec_safe_push (ptr->deferred_access_checks, new_access);
513
514 return true;
515}
516
517/* Returns nonzero if the current statement is a full expression,
518 i.e. temporaries created during that statement should be destroyed
519 at the end of the statement. */
520
521int
522stmts_are_full_exprs_p (void)
523{
524 return current_stmt_tree ()->stmts_are_full_exprs_p;
525}
526
527/* T is a statement. Add it to the statement-tree. This is the C++
528 version. The C/ObjC frontends have a slightly different version of
529 this function. */
530
531tree
532add_stmt (tree t)
533{
534 enum tree_code code = TREE_CODE (t)((enum tree_code) (t)->base.code);
535
536 if (EXPR_P (t)((tree_code_type[(int) (((enum tree_code) (t)->base.code))
]) >= tcc_reference && (tree_code_type[(int) (((enum
tree_code) (t)->base.code))]) <= tcc_expression)
&& code != LABEL_EXPR)
537 {
538 if (!EXPR_HAS_LOCATION (t)(((IS_ADHOC_LOC (((((t)) && ((tree_code_type[(int) ((
(enum tree_code) ((t))->base.code))]) >= tcc_reference &&
(tree_code_type[(int) (((enum tree_code) ((t))->base.code
))]) <= tcc_expression)) ? (t)->exp.locus : ((location_t
) 0)))) ? get_location_from_adhoc_loc (line_table, ((((t)) &&
((tree_code_type[(int) (((enum tree_code) ((t))->base.code
))]) >= tcc_reference && (tree_code_type[(int) (((
enum tree_code) ((t))->base.code))]) <= tcc_expression)
) ? (t)->exp.locus : ((location_t) 0))) : (((((t)) &&
((tree_code_type[(int) (((enum tree_code) ((t))->base.code
))]) >= tcc_reference && (tree_code_type[(int) (((
enum tree_code) ((t))->base.code))]) <= tcc_expression)
) ? (t)->exp.locus : ((location_t) 0)))) != ((location_t) 0
))
)
539 SET_EXPR_LOCATION (t, input_location)(expr_check (((t)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 539, __FUNCTION__))->exp.locus = (input_location)
;
540
541 /* When we expand a statement-tree, we must know whether or not the
542 statements are full-expressions. We record that fact here. */
543 if (STATEMENT_CODE_P (TREE_CODE (t))statement_code_p[(int) (((enum tree_code) (t)->base.code))
]
)
544 STMT_IS_FULL_EXPR_P (t)((tree_not_check2 (((t)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 544, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1)
= stmts_are_full_exprs_p ();
545 }
546
547 if (code == LABEL_EXPR || code == CASE_LABEL_EXPR)
548 STATEMENT_LIST_HAS_LABEL (cur_stmt_list)((tree_not_check2 (((tree_check ((((current_stmt_tree ()->
x_cur_stmt_list)->last ())), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 548, __FUNCTION__, (STATEMENT_LIST)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 548, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3)
= 1;
549
550 /* Add T to the statement-tree. Non-side-effect statements need to be
551 recorded during statement expressions. */
552 gcc_checking_assert (!stmt_list_stack->is_empty ())((void)(!(!(current_stmt_tree ()->x_cur_stmt_list)->is_empty
()) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 552, __FUNCTION__), 0 : 0))
;
553 append_to_statement_list_force (t, &cur_stmt_list((current_stmt_tree ()->x_cur_stmt_list)->last ()));
554
555 return t;
556}
557
558/* Returns the stmt_tree to which statements are currently being added. */
559
560stmt_tree
561current_stmt_tree (void)
562{
563 return (cfun(cfun + 0)
564 ? &cfun(cfun + 0)->language->base.x_stmt_tree
565 : &scope_chain->x_stmt_tree);
566}
567
568/* If statements are full expressions, wrap STMT in a CLEANUP_POINT_EXPR. */
569
570static tree
571maybe_cleanup_point_expr (tree expr)
572{
573 if (!processing_template_declscope_chain->x_processing_template_decl && stmts_are_full_exprs_p ())
574 expr = fold_build_cleanup_point_expr (TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 574, __FUNCTION__))->typed.type)
, expr);
575 return expr;
576}
577
578/* Like maybe_cleanup_point_expr except have the type of the new expression be
579 void so we don't need to create a temporary variable to hold the inner
580 expression. The reason why we do this is because the original type might be
581 an aggregate and we cannot create a temporary variable for that type. */
582
583tree
584maybe_cleanup_point_expr_void (tree expr)
585{
586 if (!processing_template_declscope_chain->x_processing_template_decl && stmts_are_full_exprs_p ())
587 expr = fold_build_cleanup_point_expr (void_type_nodeglobal_trees[TI_VOID_TYPE], expr);
588 return expr;
589}
590
591
592
593/* Create a declaration statement for the declaration given by the DECL. */
594
595void
596add_decl_expr (tree decl)
597{
598 tree r = build_stmt (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 598, __FUNCTION__))->decl_minimal.locus)
, DECL_EXPR, decl);
599 if (DECL_INITIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 599, __FUNCTION__))->decl_common.initial)
600 || (DECL_SIZE (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 600, __FUNCTION__))->decl_common.size)
&& TREE_SIDE_EFFECTS (DECL_SIZE (decl))((non_type_check ((((contains_struct_check ((decl), (TS_DECL_COMMON
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 600, __FUNCTION__))->decl_common.size)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 600, __FUNCTION__))->base.side_effects_flag)
))
601 r = maybe_cleanup_point_expr_void (r);
602 add_stmt (r);
603}
604
605/* Set EXPR_LOCATION of the cleanups of any CLEANUP_STMT in STMTS to LOC. */
606
607static void
608set_cleanup_locs (tree stmts, location_t loc)
609{
610 if (TREE_CODE (stmts)((enum tree_code) (stmts)->base.code) == CLEANUP_STMT)
611 {
612 protected_set_expr_location (CLEANUP_EXPR (stmts)(*((const_cast<tree*> (tree_operand_check (((tree_check
((stmts), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 612, __FUNCTION__, (CLEANUP_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 612, __FUNCTION__)))))
, loc);
613 set_cleanup_locs (CLEANUP_BODY (stmts)(*((const_cast<tree*> (tree_operand_check (((tree_check
((stmts), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 613, __FUNCTION__, (CLEANUP_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 613, __FUNCTION__)))))
, loc);
614 }
615 else if (TREE_CODE (stmts)((enum tree_code) (stmts)->base.code) == STATEMENT_LIST)
616 for (tree stmt : tsi_range (stmts))
617 set_cleanup_locs (stmt, loc);
618}
619
620/* Finish a scope. */
621
622tree
623do_poplevel (tree stmt_list)
624{
625 tree block = NULL__null;
626
627 if (stmts_are_full_exprs_p ())
628 block = poplevel (kept_level_p (), 1, 0);
629
630 stmt_list = pop_stmt_list (stmt_list);
631
632 /* input_location is the last token of the scope, usually a }. */
633 set_cleanup_locs (stmt_list, input_location);
634
635 if (!processing_template_declscope_chain->x_processing_template_decl)
636 {
637 stmt_list = c_build_bind_expr (input_location, block, stmt_list);
638 /* ??? See c_end_compound_stmt re statement expressions. */
639 }
640
641 return stmt_list;
642}
643
644/* Begin a new scope. */
645
646static tree
647do_pushlevel (scope_kind sk)
648{
649 tree ret = push_stmt_list ();
650 if (stmts_are_full_exprs_p ())
651 begin_scope (sk, NULL__null);
652 return ret;
653}
654
655/* Queue a cleanup. CLEANUP is an expression/statement to be executed
656 when the current scope is exited. EH_ONLY is true when this is not
657 meant to apply to normal control flow transfer. */
658
659void
660push_cleanup (tree decl, tree cleanup, bool eh_only)
661{
662 tree stmt = build_stmt (input_location, CLEANUP_STMT, NULL__null, cleanup, decl);
663 CLEANUP_EH_ONLY (stmt)((stmt)->base.static_flag) = eh_only;
664 add_stmt (stmt);
665 CLEANUP_BODY (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 665, __FUNCTION__, (CLEANUP_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 665, __FUNCTION__)))))
= push_stmt_list ();
666}
667
668/* Simple infinite loop tracking for -Wreturn-type. We keep a stack of all
669 the current loops, represented by 'NULL_TREE' if we've seen a possible
670 exit, and 'error_mark_node' if not. This is currently used only to
671 suppress the warning about a function with no return statements, and
672 therefore we don't bother noting returns as possible exits. We also
673 don't bother with gotos. */
674
675static void
676begin_maybe_infinite_loop (tree cond)
677{
678 /* Only track this while parsing a function, not during instantiation. */
679 if (!cfun(cfun + 0) || (DECL_TEMPLATE_INSTANTIATION (current_function_decl)((((contains_struct_check ((current_function_decl), (TS_DECL_COMMON
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 679, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) & 1)
2
Assuming the condition is false
3
Assuming the condition is false
680 && !processing_template_declscope_chain->x_processing_template_decl))
681 return;
682 bool maybe_infinite = true;
683 if (cond)
4
Assuming 'cond' is null
5
Taking false branch
684 {
685 cond = fold_non_dependent_expr (cond);
686 maybe_infinite = integer_nonzerop (cond);
687 }
688 vec_safe_push (cp_function_chain((cfun + 0)->language)->infinite_loops,
7
Passing value via 1st parameter 'v'
8
Calling 'vec_safe_push<tree_node *, va_gc>'
689 maybe_infinite
5.1
'maybe_infinite' is true
5.1
'maybe_infinite' is true
? error_mark_nodeglobal_trees[TI_ERROR_MARK] : NULL_TREE(tree) __null)
;
6
'?' condition is true
690
691}
692
693/* A break is a possible exit for the current loop. */
694
695void
696break_maybe_infinite_loop (void)
697{
698 if (!cfun(cfun + 0))
699 return;
700 cp_function_chain((cfun + 0)->language)->infinite_loops->last() = NULL_TREE(tree) __null;
701}
702
703/* If we reach the end of the loop without seeing a possible exit, we have
704 an infinite loop. */
705
706static void
707end_maybe_infinite_loop (tree cond)
708{
709 if (!cfun(cfun + 0) || (DECL_TEMPLATE_INSTANTIATION (current_function_decl)((((contains_struct_check ((current_function_decl), (TS_DECL_COMMON
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 709, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) & 1)
710 && !processing_template_declscope_chain->x_processing_template_decl))
711 return;
712 tree current = cp_function_chain((cfun + 0)->language)->infinite_loops->pop();
713 if (current != NULL_TREE(tree) __null)
714 {
715 cond = fold_non_dependent_expr (cond);
716 if (integer_nonzerop (cond))
717 current_function_infinite_loop((cfun + 0)->language)->infinite_loop = 1;
718 }
719}
720
721
722/* Begin a conditional that might contain a declaration. When generating
723 normal code, we want the declaration to appear before the statement
724 containing the conditional. When generating template code, we want the
725 conditional to be rendered as the raw DECL_EXPR. */
726
727static void
728begin_cond (tree *cond_p)
729{
730 if (processing_template_declscope_chain->x_processing_template_decl)
731 *cond_p = push_stmt_list ();
732}
733
734/* Finish such a conditional. */
735
736static void
737finish_cond (tree *cond_p, tree expr)
738{
739 if (processing_template_declscope_chain->x_processing_template_decl)
740 {
741 tree cond = pop_stmt_list (*cond_p);
742
743 if (expr == NULL_TREE(tree) __null)
744 /* Empty condition in 'for'. */
745 gcc_assert (empty_expr_stmt_p (cond))((void)(!(empty_expr_stmt_p (cond)) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 745, __FUNCTION__), 0 : 0))
;
746 else if (check_for_bare_parameter_packs (expr))
747 expr = error_mark_nodeglobal_trees[TI_ERROR_MARK];
748 else if (!empty_expr_stmt_p (cond))
749 expr = build2 (COMPOUND_EXPR, TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 749, __FUNCTION__))->typed.type)
, cond, expr);
750 }
751 *cond_p = expr;
752}
753
754/* If *COND_P specifies a conditional with a declaration, transform the
755 loop such that
756 while (A x = 42) { }
757 for (; A x = 42;) { }
758 becomes
759 while (true) { A x = 42; if (!x) break; }
760 for (;;) { A x = 42; if (!x) break; }
761 The statement list for BODY will be empty if the conditional did
762 not declare anything. */
763
764static void
765simplify_loop_decl_cond (tree *cond_p, tree body)
766{
767 tree cond, if_stmt;
768
769 if (!TREE_SIDE_EFFECTS (body)((non_type_check ((body), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 769, __FUNCTION__))->base.side_effects_flag)
)
770 return;
771
772 cond = *cond_p;
773 *cond_p = boolean_true_nodeglobal_trees[TI_BOOLEAN_TRUE];
774
775 if_stmt = begin_if_stmt ();
776 cond = cp_build_unary_op (TRUTH_NOT_EXPR, cond, false, tf_warning_or_error);
777 finish_if_stmt_cond (cond, if_stmt);
778 finish_break_stmt ();
779 finish_then_clause (if_stmt);
780 finish_if_stmt (if_stmt);
781}
782
783/* Finish a goto-statement. */
784
785tree
786finish_goto_stmt (tree destination)
787{
788 if (identifier_p (destination))
789 destination = lookup_label (destination);
790
791 /* We warn about unused labels with -Wunused. That means we have to
792 mark the used labels as used. */
793 if (TREE_CODE (destination)((enum tree_code) (destination)->base.code) == LABEL_DECL)
794 TREE_USED (destination)((destination)->base.used_flag) = 1;
795 else
796 {
797 destination = mark_rvalue_use (destination);
798 if (!processing_template_declscope_chain->x_processing_template_decl)
799 {
800 destination = cp_convert (ptr_type_nodeglobal_trees[TI_PTR_TYPE], destination,
801 tf_warning_or_error);
802 if (error_operand_p (destination))
803 return NULL_TREE(tree) __null;
804 destination
805 = fold_build_cleanup_point_expr (TREE_TYPE (destination)((contains_struct_check ((destination), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 805, __FUNCTION__))->typed.type)
,
806 destination);
807 }
808 }
809
810 check_goto (destination);
811
812 add_stmt (build_predict_expr (PRED_GOTO, NOT_TAKEN));
813 return add_stmt (build_stmt (input_location, GOTO_EXPR, destination));
814}
815
816/* COND is the condition-expression for an if, while, etc.,
817 statement. Convert it to a boolean value, if appropriate.
818 In addition, verify sequence points if -Wsequence-point is enabled. */
819
820static tree
821maybe_convert_cond (tree cond)
822{
823 /* Empty conditions remain empty. */
824 if (!cond)
825 return NULL_TREE(tree) __null;
826
827 /* Wait until we instantiate templates before doing conversion. */
828 if (type_dependent_expression_p (cond))
829 return cond;
830
831 if (warn_sequence_pointglobal_options.x_warn_sequence_point && !processing_template_declscope_chain->x_processing_template_decl)
832 verify_sequence_points (cond);
833
834 /* Do the conversion. */
835 cond = convert_from_reference (cond);
836
837 if (TREE_CODE (cond)((enum tree_code) (cond)->base.code) == MODIFY_EXPR
838 && warn_parenthesesglobal_options.x_warn_parentheses
839 && !warning_suppressed_p (cond, OPT_Wparentheses)
840 && warning_at (cp_expr_loc_or_input_loc (cond),
841 OPT_Wparentheses, "suggest parentheses around "
842 "assignment used as truth value"))
843 suppress_warning (cond, OPT_Wparentheses);
844
845 return condition_conversion (cond);
846}
847
848/* Finish an expression-statement, whose EXPRESSION is as indicated. */
849
850tree
851finish_expr_stmt (tree expr)
852{
853 tree r = NULL_TREE(tree) __null;
854 location_t loc = EXPR_LOCATION (expr)((((expr)) && ((tree_code_type[(int) (((enum tree_code
) ((expr))->base.code))]) >= tcc_reference && (
tree_code_type[(int) (((enum tree_code) ((expr))->base.code
))]) <= tcc_expression)) ? (expr)->exp.locus : ((location_t
) 0))
;
855
856 if (expr != NULL_TREE(tree) __null)
857 {
858 /* If we ran into a problem, make sure we complained. */
859 gcc_assert (expr != error_mark_node || seen_error ())((void)(!(expr != global_trees[TI_ERROR_MARK] || seen_error (
)) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 859, __FUNCTION__), 0 : 0))
;
860
861 if (!processing_template_declscope_chain->x_processing_template_decl)
862 {
863 if (warn_sequence_pointglobal_options.x_warn_sequence_point)
864 verify_sequence_points (expr);
865 expr = convert_to_void (expr, ICV_STATEMENT, tf_warning_or_error);
866 }
867 else if (!type_dependent_expression_p (expr))
868 convert_to_void (build_non_dependent_expr (expr), ICV_STATEMENT,
869 tf_warning_or_error);
870
871 if (check_for_bare_parameter_packs (expr))
872 expr = error_mark_nodeglobal_trees[TI_ERROR_MARK];
873
874 /* Simplification of inner statement expressions, compound exprs,
875 etc can result in us already having an EXPR_STMT. */
876 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) != CLEANUP_POINT_EXPR)
877 {
878 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) != EXPR_STMT)
879 expr = build_stmt (loc, EXPR_STMT, expr);
880 expr = maybe_cleanup_point_expr_void (expr);
881 }
882
883 r = add_stmt (expr);
884 }
885
886 return r;
887}
888
889
890/* Begin an if-statement. Returns a newly created IF_STMT if
891 appropriate. */
892
893tree
894begin_if_stmt (void)
895{
896 tree r, scope;
897 scope = do_pushlevel (sk_cond);
898 r = build_stmt (input_location, IF_STMT, NULL_TREE(tree) __null,
899 NULL_TREE(tree) __null, NULL_TREE(tree) __null, scope);
900 current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->this_entity = r;
901 begin_cond (&IF_COND (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 901, __FUNCTION__, (IF_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 901, __FUNCTION__)))))
);
902 return r;
903}
904
905/* Returns true if FN, a CALL_EXPR, is a call to
906 std::is_constant_evaluated or __builtin_is_constant_evaluated. */
907
908static bool
909is_std_constant_evaluated_p (tree fn)
910{
911 /* std::is_constant_evaluated takes no arguments. */
912 if (call_expr_nargs (fn)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check
((fn), (tcc_vl_exp), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 912, __FUNCTION__))->exp.operands[0]), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 912, __FUNCTION__)))) - 3)
!= 0)
913 return false;
914
915 tree fndecl = cp_get_callee_fndecl_nofold (fn);
916 if (fndecl == NULL_TREE(tree) __null)
917 return false;
918
919 if (fndecl_built_in_p (fndecl, CP_BUILT_IN_IS_CONSTANT_EVALUATED,
920 BUILT_IN_FRONTEND))
921 return true;
922
923 if (!decl_in_std_namespace_p (fndecl))
924 return false;
925
926 tree name = DECL_NAME (fndecl)((contains_struct_check ((fndecl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 926, __FUNCTION__))->decl_minimal.name)
;
927 return name && id_equal (name, "is_constant_evaluated");
928}
929
930/* Callback function for maybe_warn_for_constant_evaluated that looks
931 for calls to std::is_constant_evaluated in TP. */
932
933static tree
934find_std_constant_evaluated_r (tree *tp, int *walk_subtrees, void *)
935{
936 tree t = *tp;
937
938 if (TYPE_P (t)(tree_code_type[(int) (((enum tree_code) (t)->base.code))]
== tcc_type)
|| TREE_CONSTANT (t)((non_type_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 938, __FUNCTION__))->base.constant_flag)
)
939 {
940 *walk_subtrees = false;
941 return NULL_TREE(tree) __null;
942 }
943
944 switch (TREE_CODE (t)((enum tree_code) (t)->base.code))
945 {
946 case CALL_EXPR:
947 if (is_std_constant_evaluated_p (t))
948 return t;
949 break;
950 case EXPR_STMT:
951 /* Don't warn in statement expressions. */
952 *walk_subtrees = false;
953 return NULL_TREE(tree) __null;
954 default:
955 break;
956 }
957
958 return NULL_TREE(tree) __null;
959}
960
961/* In certain contexts, std::is_constant_evaluated() is always true (for
962 instance, in a consteval function or in a constexpr if), or always false
963 (e.g., in a non-constexpr non-consteval function) so give the user a clue. */
964
965static void
966maybe_warn_for_constant_evaluated (tree cond, bool constexpr_if)
967{
968 if (!warn_tautological_compareglobal_options.x_warn_tautological_compare)
969 return;
970
971 /* Suppress warning for std::is_constant_evaluated if the conditional
972 comes from a macro. */
973 if (from_macro_expansion_at (EXPR_LOCATION (cond)((((cond)) && ((tree_code_type[(int) (((enum tree_code
) ((cond))->base.code))]) >= tcc_reference && (
tree_code_type[(int) (((enum tree_code) ((cond))->base.code
))]) <= tcc_expression)) ? (cond)->exp.locus : ((location_t
) 0))
))
974 return;
975
976 cond = cp_walk_tree_without_duplicates (&cond, find_std_constant_evaluated_r,walk_tree_without_duplicates_1 (&cond, find_std_constant_evaluated_r
, __null, cp_walk_subtrees)
977 NULL)walk_tree_without_duplicates_1 (&cond, find_std_constant_evaluated_r
, __null, cp_walk_subtrees)
;
978 if (cond)
979 {
980 if (constexpr_if)
981 warning_at (EXPR_LOCATION (cond)((((cond)) && ((tree_code_type[(int) (((enum tree_code
) ((cond))->base.code))]) >= tcc_reference && (
tree_code_type[(int) (((enum tree_code) ((cond))->base.code
))]) <= tcc_expression)) ? (cond)->exp.locus : ((location_t
) 0))
, OPT_Wtautological_compare,
982 "%<std::is_constant_evaluated%> always evaluates to "
983 "true in %<if constexpr%>");
984 else if (!maybe_constexpr_fn (current_function_decl))
985 warning_at (EXPR_LOCATION (cond)((((cond)) && ((tree_code_type[(int) (((enum tree_code
) ((cond))->base.code))]) >= tcc_reference && (
tree_code_type[(int) (((enum tree_code) ((cond))->base.code
))]) <= tcc_expression)) ? (cond)->exp.locus : ((location_t
) 0))
, OPT_Wtautological_compare,
986 "%<std::is_constant_evaluated%> always evaluates to "
987 "false in a non-%<constexpr%> function");
988 else if (DECL_IMMEDIATE_FUNCTION_P (current_function_decl)(((contains_struct_check (((tree_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/semantics.c"
, 988, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 988, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 988, __FUNCTION__))->decl_common.lang_specific) ? __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/semantics.c"
, 988, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 988, __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/semantics.c"
, 988, __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/semantics.c"
, 988, __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/semantics.c"
, 988, __FUNCTION__); &lt->u.fn; })->immediate_fn_p
: false)
)
989 warning_at (EXPR_LOCATION (cond)((((cond)) && ((tree_code_type[(int) (((enum tree_code
) ((cond))->base.code))]) >= tcc_reference && (
tree_code_type[(int) (((enum tree_code) ((cond))->base.code
))]) <= tcc_expression)) ? (cond)->exp.locus : ((location_t
) 0))
, OPT_Wtautological_compare,
990 "%<std::is_constant_evaluated%> always evaluates to "
991 "true in a %<consteval%> function");
992 }
993}
994
995/* Process the COND of an if-statement, which may be given by
996 IF_STMT. */
997
998tree
999finish_if_stmt_cond (tree cond, tree if_stmt)
1000{
1001 cond = maybe_convert_cond (cond);
1002 if (IF_STMT_CONSTEXPR_P (if_stmt)((tree_not_check2 (((tree_check ((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1002, __FUNCTION__, (IF_STMT)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1002, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
1003 && !type_dependent_expression_p (cond)
1004 && require_constant_expression (cond)
1005 && !instantiation_dependent_expression_p (cond)
1006 /* Wait until instantiation time, since only then COND has been
1007 converted to bool. */
1008 && TYPE_MAIN_VARIANT (TREE_TYPE (cond))((tree_class_check ((((contains_struct_check ((cond), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1008, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1008, __FUNCTION__))->type_common.main_variant)
== boolean_type_nodeglobal_trees[TI_BOOLEAN_TYPE])
1009 {
1010 maybe_warn_for_constant_evaluated (cond, /*constexpr_if=*/true);
1011 cond = instantiate_non_dependent_expr (cond);
1012 cond = cxx_constant_value (cond, NULL_TREE(tree) __null);
1013 }
1014 else
1015 maybe_warn_for_constant_evaluated (cond, /*constexpr_if=*/false);
1016 finish_cond (&IF_COND (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1016, __FUNCTION__, (IF_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1016, __FUNCTION__)))))
, cond);
1017 add_stmt (if_stmt);
1018 THEN_CLAUSE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1018, __FUNCTION__, (IF_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1018, __FUNCTION__)))))
= push_stmt_list ();
1019 return cond;
1020}
1021
1022/* Finish the then-clause of an if-statement, which may be given by
1023 IF_STMT. */
1024
1025tree
1026finish_then_clause (tree if_stmt)
1027{
1028 THEN_CLAUSE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1028, __FUNCTION__, (IF_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1028, __FUNCTION__)))))
= pop_stmt_list (THEN_CLAUSE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1028, __FUNCTION__, (IF_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1028, __FUNCTION__)))))
);
1029 return if_stmt;
1030}
1031
1032/* Begin the else-clause of an if-statement. */
1033
1034void
1035begin_else_clause (tree if_stmt)
1036{
1037 ELSE_CLAUSE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1037, __FUNCTION__, (IF_STMT)))), (2), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1037, __FUNCTION__)))))
= push_stmt_list ();
1038}
1039
1040/* Finish the else-clause of an if-statement, which may be given by
1041 IF_STMT. */
1042
1043void
1044finish_else_clause (tree if_stmt)
1045{
1046 ELSE_CLAUSE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1046, __FUNCTION__, (IF_STMT)))), (2), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1046, __FUNCTION__)))))
= pop_stmt_list (ELSE_CLAUSE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1046, __FUNCTION__, (IF_STMT)))), (2), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1046, __FUNCTION__)))))
);
1047}
1048
1049/* Callback for cp_walk_tree to mark all {VAR,PARM}_DECLs in a tree as
1050 read. */
1051
1052static tree
1053maybe_mark_exp_read_r (tree *tp, int *, void *)
1054{
1055 tree t = *tp;
1056 if (VAR_P (t)(((enum tree_code) (t)->base.code) == VAR_DECL) || TREE_CODE (t)((enum tree_code) (t)->base.code) == PARM_DECL)
1057 mark_exp_read (t);
1058 return NULL_TREE(tree) __null;
1059}
1060
1061/* Finish an if-statement. */
1062
1063void
1064finish_if_stmt (tree if_stmt)
1065{
1066 tree scope = IF_SCOPE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1066, __FUNCTION__, (IF_STMT)))), (3), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1066, __FUNCTION__)))))
;
1067 IF_SCOPE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1067, __FUNCTION__, (IF_STMT)))), (3), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1067, __FUNCTION__)))))
= NULL__null;
1068 if (IF_STMT_CONSTEXPR_P (if_stmt)((tree_not_check2 (((tree_check ((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1068, __FUNCTION__, (IF_STMT)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1068, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
)
1069 {
1070 /* Prevent various -Wunused warnings. We might not instantiate
1071 either of these branches, so we would not mark the variables
1072 used in that branch as read. */
1073 cp_walk_tree_without_duplicates (&THEN_CLAUSE (if_stmt),walk_tree_without_duplicates_1 (&(*((const_cast<tree*>
(tree_operand_check (((tree_check ((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1073, __FUNCTION__, (IF_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1073, __FUNCTION__))))), maybe_mark_exp_read_r, __null, cp_walk_subtrees
)
1074 maybe_mark_exp_read_r, NULL)walk_tree_without_duplicates_1 (&(*((const_cast<tree*>
(tree_operand_check (((tree_check ((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1073, __FUNCTION__, (IF_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1073, __FUNCTION__))))), maybe_mark_exp_read_r, __null, cp_walk_subtrees
)
;
1075 cp_walk_tree_without_duplicates (&ELSE_CLAUSE (if_stmt),walk_tree_without_duplicates_1 (&(*((const_cast<tree*>
(tree_operand_check (((tree_check ((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1075, __FUNCTION__, (IF_STMT)))), (2), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1075, __FUNCTION__))))), maybe_mark_exp_read_r, __null, cp_walk_subtrees
)
1076 maybe_mark_exp_read_r, NULL)walk_tree_without_duplicates_1 (&(*((const_cast<tree*>
(tree_operand_check (((tree_check ((if_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1075, __FUNCTION__, (IF_STMT)))), (2), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1075, __FUNCTION__))))), maybe_mark_exp_read_r, __null, cp_walk_subtrees
)
;
1077 }
1078 add_stmt (do_poplevel (scope));
1079}
1080
1081/* Begin a while-statement. Returns a newly created WHILE_STMT if
1082 appropriate. */
1083
1084tree
1085begin_while_stmt (void)
1086{
1087 tree r;
1088 r = build_stmt (input_location, WHILE_STMT, NULL_TREE(tree) __null, NULL_TREE(tree) __null);
1089 add_stmt (r);
1090 WHILE_BODY (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1090, __FUNCTION__, (WHILE_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1090, __FUNCTION__)))))
= do_pushlevel (sk_block);
1091 begin_cond (&WHILE_COND (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1091, __FUNCTION__, (WHILE_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1091, __FUNCTION__)))))
);
1092 return r;
1093}
1094
1095/* Process the COND of a while-statement, which may be given by
1096 WHILE_STMT. */
1097
1098void
1099finish_while_stmt_cond (tree cond, tree while_stmt, bool ivdep,
1100 unsigned short unroll)
1101{
1102 cond = maybe_convert_cond (cond);
1103 finish_cond (&WHILE_COND (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1103, __FUNCTION__, (WHILE_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1103, __FUNCTION__)))))
, cond);
1104 begin_maybe_infinite_loop (cond);
1105 if (ivdep && cond != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1106 WHILE_COND (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1106, __FUNCTION__, (WHILE_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1106, __FUNCTION__)))))
= build3 (ANNOTATE_EXPR,
1107 TREE_TYPE (WHILE_COND (while_stmt))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
(((tree_check ((while_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1107, __FUNCTION__, (WHILE_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1107, __FUNCTION__)))))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1107, __FUNCTION__))->typed.type)
,
1108 WHILE_COND (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1108, __FUNCTION__, (WHILE_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1108, __FUNCTION__)))))
,
1109 build_int_cst (integer_type_nodeinteger_types[itk_int],
1110 annot_expr_ivdep_kind),
1111 integer_zero_nodeglobal_trees[TI_INTEGER_ZERO]);
1112 if (unroll && cond != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1113 WHILE_COND (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1113, __FUNCTION__, (WHILE_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1113, __FUNCTION__)))))
= build3 (ANNOTATE_EXPR,
1114 TREE_TYPE (WHILE_COND (while_stmt))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
(((tree_check ((while_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1114, __FUNCTION__, (WHILE_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1114, __FUNCTION__)))))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1114, __FUNCTION__))->typed.type)
,
1115 WHILE_COND (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1115, __FUNCTION__, (WHILE_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1115, __FUNCTION__)))))
,
1116 build_int_cst (integer_type_nodeinteger_types[itk_int],
1117 annot_expr_unroll_kind),
1118 build_int_cst (integer_type_nodeinteger_types[itk_int],
1119 unroll));
1120 simplify_loop_decl_cond (&WHILE_COND (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1120, __FUNCTION__, (WHILE_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1120, __FUNCTION__)))))
, WHILE_BODY (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1120, __FUNCTION__, (WHILE_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1120, __FUNCTION__)))))
);
1121}
1122
1123/* Finish a while-statement, which may be given by WHILE_STMT. */
1124
1125void
1126finish_while_stmt (tree while_stmt)
1127{
1128 end_maybe_infinite_loop (boolean_true_nodeglobal_trees[TI_BOOLEAN_TRUE]);
1129 WHILE_BODY (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1129, __FUNCTION__, (WHILE_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1129, __FUNCTION__)))))
= do_poplevel (WHILE_BODY (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1129, __FUNCTION__, (WHILE_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1129, __FUNCTION__)))))
);
1130}
1131
1132/* Begin a do-statement. Returns a newly created DO_STMT if
1133 appropriate. */
1134
1135tree
1136begin_do_stmt (void)
1137{
1138 tree r = build_stmt (input_location, DO_STMT, NULL_TREE(tree) __null, NULL_TREE(tree) __null);
1139 begin_maybe_infinite_loop (boolean_true_nodeglobal_trees[TI_BOOLEAN_TRUE]);
1140 add_stmt (r);
1141 DO_BODY (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1141, __FUNCTION__, (DO_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1141, __FUNCTION__)))))
= push_stmt_list ();
1142 return r;
1143}
1144
1145/* Finish the body of a do-statement, which may be given by DO_STMT. */
1146
1147void
1148finish_do_body (tree do_stmt)
1149{
1150 tree body = DO_BODY (do_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((do_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1150, __FUNCTION__, (DO_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1150, __FUNCTION__)))))
= pop_stmt_list (DO_BODY (do_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((do_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1150, __FUNCTION__, (DO_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1150, __FUNCTION__)))))
);
1151
1152 if (TREE_CODE (body)((enum tree_code) (body)->base.code) == STATEMENT_LIST && STATEMENT_LIST_TAIL (body)((tree_check ((body), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1152, __FUNCTION__, (STATEMENT_LIST)))->stmt_list.tail)
)
1153 body = STATEMENT_LIST_TAIL (body)((tree_check ((body), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1153, __FUNCTION__, (STATEMENT_LIST)))->stmt_list.tail)
->stmt;
1154
1155 if (IS_EMPTY_STMT (body)(((enum tree_code) (body)->base.code) == NOP_EXPR &&
(((enum tree_code) (((contains_struct_check ((body), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1155, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE
) && integer_zerop ((*((const_cast<tree*> (tree_operand_check
((body), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1155, __FUNCTION__)))))))
)
1156 warning (OPT_Wempty_body,
1157 "suggest explicit braces around empty body in %<do%> statement");
1158}
1159
1160/* Finish a do-statement, which may be given by DO_STMT, and whose
1161 COND is as indicated. */
1162
1163void
1164finish_do_stmt (tree cond, tree do_stmt, bool ivdep, unsigned short unroll)
1165{
1166 cond = maybe_convert_cond (cond);
1167 end_maybe_infinite_loop (cond);
1168 /* Unlike other iteration statements, the condition may not contain
1169 a declaration, so we don't call finish_cond which checks for
1170 unexpanded parameter packs. */
1171 if (check_for_bare_parameter_packs (cond))
1172 cond = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1173 if (ivdep && cond != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1174 cond = build3 (ANNOTATE_EXPR, TREE_TYPE (cond)((contains_struct_check ((cond), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1174, __FUNCTION__))->typed.type)
, cond,
1175 build_int_cst (integer_type_nodeinteger_types[itk_int], annot_expr_ivdep_kind),
1176 integer_zero_nodeglobal_trees[TI_INTEGER_ZERO]);
1177 if (unroll && cond != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1178 cond = build3 (ANNOTATE_EXPR, TREE_TYPE (cond)((contains_struct_check ((cond), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1178, __FUNCTION__))->typed.type)
, cond,
1179 build_int_cst (integer_type_nodeinteger_types[itk_int], annot_expr_unroll_kind),
1180 build_int_cst (integer_type_nodeinteger_types[itk_int], unroll));
1181 DO_COND (do_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((do_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1181, __FUNCTION__, (DO_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1181, __FUNCTION__)))))
= cond;
1182}
1183
1184/* Finish a return-statement. The EXPRESSION returned, if any, is as
1185 indicated. */
1186
1187tree
1188finish_return_stmt (tree expr)
1189{
1190 tree r;
1191 bool no_warning;
1192
1193 expr = check_return_expr (expr, &no_warning);
1194
1195 if (error_operand_p (expr)
1196 || (flag_openmpglobal_options.x_flag_openmp && !check_omp_return ()))
1197 {
1198 /* Suppress -Wreturn-type for this function. */
1199 if (warn_return_typeglobal_options.x_warn_return_type)
1200 suppress_warning (current_function_decl, OPT_Wreturn_type);
1201 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1202 }
1203
1204 if (!processing_template_declscope_chain->x_processing_template_decl)
1205 {
1206 if (warn_sequence_pointglobal_options.x_warn_sequence_point)
1207 verify_sequence_points (expr);
1208
1209 if (DECL_DESTRUCTOR_P (current_function_decl)((tree_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/semantics.c"
, 1209, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1209, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
1210 || (DECL_CONSTRUCTOR_P (current_function_decl)((tree_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/semantics.c"
, 1210, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1210, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
)
1211 && targetm.cxx.cdtor_returns_this ()))
1212 {
1213 /* Similarly, all destructors must run destructors for
1214 base-classes before returning. So, all returns in a
1215 destructor get sent to the DTOR_LABEL; finish_function emits
1216 code to return a value there. */
1217 return finish_goto_stmt (cdtor_label((cfun + 0)->language)->x_cdtor_label);
1218 }
1219 }
1220
1221 r = build_stmt (input_location, RETURN_EXPR, expr);
1222 if (no_warning)
1223 suppress_warning (r, OPT_Wreturn_type);
1224 r = maybe_cleanup_point_expr_void (r);
1225 r = add_stmt (r);
1226
1227 return r;
1228}
1229
1230/* Begin the scope of a for-statement or a range-for-statement.
1231 Both the returned trees are to be used in a call to
1232 begin_for_stmt or begin_range_for_stmt. */
1233
1234tree
1235begin_for_scope (tree *init)
1236{
1237 tree scope = do_pushlevel (sk_for);
1238
1239 if (processing_template_declscope_chain->x_processing_template_decl)
1240 *init = push_stmt_list ();
1241 else
1242 *init = NULL_TREE(tree) __null;
1243
1244 return scope;
1245}
1246
1247/* Begin a for-statement. Returns a new FOR_STMT.
1248 SCOPE and INIT should be the return of begin_for_scope,
1249 or both NULL_TREE */
1250
1251tree
1252begin_for_stmt (tree scope, tree init)
1253{
1254 tree r;
1255
1256 r = build_stmt (input_location, FOR_STMT, NULL_TREE(tree) __null, NULL_TREE(tree) __null,
1257 NULL_TREE(tree) __null, NULL_TREE(tree) __null, NULL_TREE(tree) __null);
1258
1259 if (scope == NULL_TREE(tree) __null)
1260 {
1261 gcc_assert (!init)((void)(!(!init) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1261, __FUNCTION__), 0 : 0))
;
1262 scope = begin_for_scope (&init);
1263 }
1264
1265 FOR_INIT_STMT (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1265, __FUNCTION__, (FOR_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1265, __FUNCTION__)))))
= init;
1266 FOR_SCOPE (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1266, __FUNCTION__, (FOR_STMT)))), (4), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1266, __FUNCTION__)))))
= scope;
1267
1268 return r;
1269}
1270
1271/* Finish the init-statement of a for-statement, which may be
1272 given by FOR_STMT. */
1273
1274void
1275finish_init_stmt (tree for_stmt)
1276{
1277 if (processing_template_declscope_chain->x_processing_template_decl)
1278 FOR_INIT_STMT (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1278, __FUNCTION__, (FOR_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1278, __FUNCTION__)))))
= pop_stmt_list (FOR_INIT_STMT (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1278, __FUNCTION__, (FOR_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1278, __FUNCTION__)))))
);
1279 add_stmt (for_stmt);
1280 FOR_BODY (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1280, __FUNCTION__, (FOR_STMT)))), (3), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1280, __FUNCTION__)))))
= do_pushlevel (sk_block);
1281 begin_cond (&FOR_COND (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1281, __FUNCTION__, (FOR_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1281, __FUNCTION__)))))
);
1282}
1283
1284/* Finish the COND of a for-statement, which may be given by
1285 FOR_STMT. */
1286
1287void
1288finish_for_cond (tree cond, tree for_stmt, bool ivdep, unsigned short unroll)
1289{
1290 cond = maybe_convert_cond (cond);
1291 finish_cond (&FOR_COND (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1291, __FUNCTION__, (FOR_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1291, __FUNCTION__)))))
, cond);
1292 begin_maybe_infinite_loop (cond);
1293 if (ivdep && cond != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1294 FOR_COND (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1294, __FUNCTION__, (FOR_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1294, __FUNCTION__)))))
= build3 (ANNOTATE_EXPR,
1295 TREE_TYPE (FOR_COND (for_stmt))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
(((tree_check ((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1295, __FUNCTION__, (FOR_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1295, __FUNCTION__)))))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1295, __FUNCTION__))->typed.type)
,
1296 FOR_COND (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1296, __FUNCTION__, (FOR_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1296, __FUNCTION__)))))
,
1297 build_int_cst (integer_type_nodeinteger_types[itk_int],
1298 annot_expr_ivdep_kind),
1299 integer_zero_nodeglobal_trees[TI_INTEGER_ZERO]);
1300 if (unroll && cond != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1301 FOR_COND (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1301, __FUNCTION__, (FOR_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1301, __FUNCTION__)))))
= build3 (ANNOTATE_EXPR,
1302 TREE_TYPE (FOR_COND (for_stmt))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
(((tree_check ((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1302, __FUNCTION__, (FOR_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1302, __FUNCTION__)))))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1302, __FUNCTION__))->typed.type)
,
1303 FOR_COND (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1303, __FUNCTION__, (FOR_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1303, __FUNCTION__)))))
,
1304 build_int_cst (integer_type_nodeinteger_types[itk_int],
1305 annot_expr_unroll_kind),
1306 build_int_cst (integer_type_nodeinteger_types[itk_int],
1307 unroll));
1308 simplify_loop_decl_cond (&FOR_COND (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1308, __FUNCTION__, (FOR_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1308, __FUNCTION__)))))
, FOR_BODY (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1308, __FUNCTION__, (FOR_STMT)))), (3), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1308, __FUNCTION__)))))
);
1309}
1310
1311/* Finish the increment-EXPRESSION in a for-statement, which may be
1312 given by FOR_STMT. */
1313
1314void
1315finish_for_expr (tree expr, tree for_stmt)
1316{
1317 if (!expr)
1318 return;
1319 /* If EXPR is an overloaded function, issue an error; there is no
1320 context available to use to perform overload resolution. */
1321 if (type_unknown_p (expr))
1322 {
1323 cxx_incomplete_type_error (expr, TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1323, __FUNCTION__))->typed.type)
);
1324 expr = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1325 }
1326 if (!processing_template_declscope_chain->x_processing_template_decl)
1327 {
1328 if (warn_sequence_pointglobal_options.x_warn_sequence_point)
1329 verify_sequence_points (expr);
1330 expr = convert_to_void (expr, ICV_THIRD_IN_FOR,
1331 tf_warning_or_error);
1332 }
1333 else if (!type_dependent_expression_p (expr))
1334 convert_to_void (build_non_dependent_expr (expr), ICV_THIRD_IN_FOR,
1335 tf_warning_or_error);
1336 expr = maybe_cleanup_point_expr_void (expr);
1337 if (check_for_bare_parameter_packs (expr))
1338 expr = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1339 FOR_EXPR (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1339, __FUNCTION__, (FOR_STMT)))), (2), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1339, __FUNCTION__)))))
= expr;
1340}
1341
1342/* Finish the body of a for-statement, which may be given by
1343 FOR_STMT. The increment-EXPR for the loop must be
1344 provided.
1345 It can also finish RANGE_FOR_STMT. */
1346
1347void
1348finish_for_stmt (tree for_stmt)
1349{
1350 end_maybe_infinite_loop (boolean_true_nodeglobal_trees[TI_BOOLEAN_TRUE]);
1351
1352 if (TREE_CODE (for_stmt)((enum tree_code) (for_stmt)->base.code) == RANGE_FOR_STMT)
1353 RANGE_FOR_BODY (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1353, __FUNCTION__, (RANGE_FOR_STMT)))), (2), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1353, __FUNCTION__)))))
= do_poplevel (RANGE_FOR_BODY (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1353, __FUNCTION__, (RANGE_FOR_STMT)))), (2), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1353, __FUNCTION__)))))
);
1354 else
1355 FOR_BODY (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1355, __FUNCTION__, (FOR_STMT)))), (3), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1355, __FUNCTION__)))))
= do_poplevel (FOR_BODY (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1355, __FUNCTION__, (FOR_STMT)))), (3), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1355, __FUNCTION__)))))
);
1356
1357 /* Pop the scope for the body of the loop. */
1358 tree *scope_ptr = (TREE_CODE (for_stmt)((enum tree_code) (for_stmt)->base.code) == RANGE_FOR_STMT
1359 ? &RANGE_FOR_SCOPE (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1359, __FUNCTION__, (RANGE_FOR_STMT)))), (3), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1359, __FUNCTION__)))))
1360 : &FOR_SCOPE (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1360, __FUNCTION__, (FOR_STMT)))), (4), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1360, __FUNCTION__)))))
);
1361 tree scope = *scope_ptr;
1362 *scope_ptr = NULL__null;
1363
1364 /* During parsing of the body, range for uses "__for_{range,begin,end} "
1365 decl names to make those unaccessible by code in the body.
1366 Change it to ones with underscore instead of space, so that it can
1367 be inspected in the debugger. */
1368 tree range_for_decl[3] = { NULL_TREE(tree) __null, NULL_TREE(tree) __null, NULL_TREE(tree) __null };
1369 gcc_assert (CPTI_FOR_BEGIN__IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER + 1((void)(!(CPTI_FOR_BEGIN__IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 1 && CPTI_FOR_END__IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 2 && CPTI_FOR_RANGE_IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 3 && CPTI_FOR_BEGIN_IDENTIFIER == CPTI_FOR_BEGIN__IDENTIFIER
+ 3 && CPTI_FOR_END_IDENTIFIER == CPTI_FOR_END__IDENTIFIER
+ 3) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1373, __FUNCTION__), 0 : 0))
1370 && CPTI_FOR_END__IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER + 2((void)(!(CPTI_FOR_BEGIN__IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 1 && CPTI_FOR_END__IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 2 && CPTI_FOR_RANGE_IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 3 && CPTI_FOR_BEGIN_IDENTIFIER == CPTI_FOR_BEGIN__IDENTIFIER
+ 3 && CPTI_FOR_END_IDENTIFIER == CPTI_FOR_END__IDENTIFIER
+ 3) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1373, __FUNCTION__), 0 : 0))
1371 && CPTI_FOR_RANGE_IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER + 3((void)(!(CPTI_FOR_BEGIN__IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 1 && CPTI_FOR_END__IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 2 && CPTI_FOR_RANGE_IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 3 && CPTI_FOR_BEGIN_IDENTIFIER == CPTI_FOR_BEGIN__IDENTIFIER
+ 3 && CPTI_FOR_END_IDENTIFIER == CPTI_FOR_END__IDENTIFIER
+ 3) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1373, __FUNCTION__), 0 : 0))
1372 && CPTI_FOR_BEGIN_IDENTIFIER == CPTI_FOR_BEGIN__IDENTIFIER + 3((void)(!(CPTI_FOR_BEGIN__IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 1 && CPTI_FOR_END__IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 2 && CPTI_FOR_RANGE_IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 3 && CPTI_FOR_BEGIN_IDENTIFIER == CPTI_FOR_BEGIN__IDENTIFIER
+ 3 && CPTI_FOR_END_IDENTIFIER == CPTI_FOR_END__IDENTIFIER
+ 3) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1373, __FUNCTION__), 0 : 0))
1373 && CPTI_FOR_END_IDENTIFIER == CPTI_FOR_END__IDENTIFIER + 3)((void)(!(CPTI_FOR_BEGIN__IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 1 && CPTI_FOR_END__IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 2 && CPTI_FOR_RANGE_IDENTIFIER == CPTI_FOR_RANGE__IDENTIFIER
+ 3 && CPTI_FOR_BEGIN_IDENTIFIER == CPTI_FOR_BEGIN__IDENTIFIER
+ 3 && CPTI_FOR_END_IDENTIFIER == CPTI_FOR_END__IDENTIFIER
+ 3) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1373, __FUNCTION__), 0 : 0))
;
1374 for (int i = 0; i < 3; i++)
1375 {
1376 tree id = cp_global_trees[CPTI_FOR_RANGE__IDENTIFIER + i];
1377 if (IDENTIFIER_BINDING (id)(((struct lang_identifier*)(tree_check ((id), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1377, __FUNCTION__, (IDENTIFIER_NODE))))->bindings)
1378 && IDENTIFIER_BINDING (id)(((struct lang_identifier*)(tree_check ((id), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1378, __FUNCTION__, (IDENTIFIER_NODE))))->bindings)
->scope == current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
)
1379 {
1380 range_for_decl[i] = IDENTIFIER_BINDING (id)(((struct lang_identifier*)(tree_check ((id), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1380, __FUNCTION__, (IDENTIFIER_NODE))))->bindings)
->value;
1381 gcc_assert (VAR_P (range_for_decl[i])((void)(!((((enum tree_code) (range_for_decl[i])->base.code
) == VAR_DECL) && ((contains_struct_check ((range_for_decl
[i]), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1382, __FUNCTION__))->decl_common.artificial_flag)) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1382, __FUNCTION__), 0 : 0))
1382 && DECL_ARTIFICIAL (range_for_decl[i]))((void)(!((((enum tree_code) (range_for_decl[i])->base.code
) == VAR_DECL) && ((contains_struct_check ((range_for_decl
[i]), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1382, __FUNCTION__))->decl_common.artificial_flag)) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1382, __FUNCTION__), 0 : 0))
;
1383 }
1384 }
1385
1386 add_stmt (do_poplevel (scope));
1387
1388 for (int i = 0; i < 3; i++)
1389 if (range_for_decl[i])
1390 DECL_NAME (range_for_decl[i])((contains_struct_check ((range_for_decl[i]), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1390, __FUNCTION__))->decl_minimal.name)
1391 = cp_global_trees[CPTI_FOR_RANGE_IDENTIFIER + i];
1392}
1393
1394/* Begin a range-for-statement. Returns a new RANGE_FOR_STMT.
1395 SCOPE and INIT should be the return of begin_for_scope,
1396 or both NULL_TREE .
1397 To finish it call finish_for_stmt(). */
1398
1399tree
1400begin_range_for_stmt (tree scope, tree init)
1401{
1402 begin_maybe_infinite_loop (boolean_false_nodeglobal_trees[TI_BOOLEAN_FALSE]);
1
Calling 'begin_maybe_infinite_loop'
1403
1404 tree r = build_stmt (input_location, RANGE_FOR_STMT, NULL_TREE(tree) __null, NULL_TREE(tree) __null,
1405 NULL_TREE(tree) __null, NULL_TREE(tree) __null, NULL_TREE(tree) __null, NULL_TREE(tree) __null);
1406
1407 if (scope == NULL_TREE(tree) __null)
1408 {
1409 gcc_assert (!init)((void)(!(!init) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1409, __FUNCTION__), 0 : 0))
;
1410 scope = begin_for_scope (&init);
1411 }
1412
1413 /* Since C++20, RANGE_FOR_STMTs can use the init tree, so save it. */
1414 RANGE_FOR_INIT_STMT (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1414, __FUNCTION__, (RANGE_FOR_STMT)))), (5), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1414, __FUNCTION__)))))
= init;
1415 RANGE_FOR_SCOPE (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1415, __FUNCTION__, (RANGE_FOR_STMT)))), (3), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1415, __FUNCTION__)))))
= scope;
1416
1417 return r;
1418}
1419
1420/* Finish the head of a range-based for statement, which may
1421 be given by RANGE_FOR_STMT. DECL must be the declaration
1422 and EXPR must be the loop expression. */
1423
1424void
1425finish_range_for_decl (tree range_for_stmt, tree decl, tree expr)
1426{
1427 if (processing_template_declscope_chain->x_processing_template_decl)
1428 RANGE_FOR_INIT_STMT (range_for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((range_for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1428, __FUNCTION__, (RANGE_FOR_STMT)))), (5), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1428, __FUNCTION__)))))
1429 = pop_stmt_list (RANGE_FOR_INIT_STMT (range_for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((range_for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1429, __FUNCTION__, (RANGE_FOR_STMT)))), (5), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1429, __FUNCTION__)))))
);
1430 RANGE_FOR_DECL (range_for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((range_for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1430, __FUNCTION__, (RANGE_FOR_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1430, __FUNCTION__)))))
= decl;
1431 RANGE_FOR_EXPR (range_for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((range_for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1431, __FUNCTION__, (RANGE_FOR_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1431, __FUNCTION__)))))
= expr;
1432 add_stmt (range_for_stmt);
1433 RANGE_FOR_BODY (range_for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((range_for_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1433, __FUNCTION__, (RANGE_FOR_STMT)))), (2), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1433, __FUNCTION__)))))
= do_pushlevel (sk_block);
1434}
1435
1436/* Finish a break-statement. */
1437
1438tree
1439finish_break_stmt (void)
1440{
1441 /* In switch statements break is sometimes stylistically used after
1442 a return statement. This can lead to spurious warnings about
1443 control reaching the end of a non-void function when it is
1444 inlined. Note that we are calling block_may_fallthru with
1445 language specific tree nodes; this works because
1446 block_may_fallthru returns true when given something it does not
1447 understand. */
1448 if (!block_may_fallthru (cur_stmt_list((current_stmt_tree ()->x_cur_stmt_list)->last ())))
1449 return void_nodeglobal_trees[TI_VOID];
1450 note_break_stmt ();
1451 return add_stmt (build_stmt (input_location, BREAK_STMT));
1452}
1453
1454/* Finish a continue-statement. */
1455
1456tree
1457finish_continue_stmt (void)
1458{
1459 return add_stmt (build_stmt (input_location, CONTINUE_STMT));
1460}
1461
1462/* Begin a switch-statement. Returns a new SWITCH_STMT if
1463 appropriate. */
1464
1465tree
1466begin_switch_stmt (void)
1467{
1468 tree r, scope;
1469
1470 scope = do_pushlevel (sk_cond);
1471 r = build_stmt (input_location, SWITCH_STMT, NULL_TREE(tree) __null, NULL_TREE(tree) __null, NULL_TREE(tree) __null, scope);
1472
1473 begin_cond (&SWITCH_STMT_COND (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1473, __FUNCTION__, (SWITCH_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1473, __FUNCTION__)))))
);
1474
1475 return r;
1476}
1477
1478/* Finish the cond of a switch-statement. */
1479
1480void
1481finish_switch_cond (tree cond, tree switch_stmt)
1482{
1483 tree orig_type = NULL__null;
1484
1485 if (!processing_template_declscope_chain->x_processing_template_decl)
1486 {
1487 /* Convert the condition to an integer or enumeration type. */
1488 tree orig_cond = cond;
1489 cond = build_expr_type_conversion (WANT_INT1 | WANT_ENUM4, cond, true);
1490 if (cond == NULL_TREE(tree) __null)
1491 {
1492 error_at (cp_expr_loc_or_input_loc (orig_cond),
1493 "switch quantity not an integer");
1494 cond = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1495 }
1496 /* We want unlowered type here to handle enum bit-fields. */
1497 orig_type = unlowered_expr_type (cond);
1498 if (TREE_CODE (orig_type)((enum tree_code) (orig_type)->base.code) != ENUMERAL_TYPE)
1499 orig_type = TREE_TYPE (cond)((contains_struct_check ((cond), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1499, __FUNCTION__))->typed.type)
;
1500 if (cond != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1501 {
1502 /* [stmt.switch]
1503
1504 Integral promotions are performed. */
1505 cond = perform_integral_promotions (cond);
1506 cond = maybe_cleanup_point_expr (cond);
1507 }
1508 }
1509 if (check_for_bare_parameter_packs (cond))
1510 cond = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1511 else if (!processing_template_declscope_chain->x_processing_template_decl && warn_sequence_pointglobal_options.x_warn_sequence_point)
1512 verify_sequence_points (cond);
1513
1514 finish_cond (&SWITCH_STMT_COND (switch_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((switch_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1514, __FUNCTION__, (SWITCH_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1514, __FUNCTION__)))))
, cond);
1515 SWITCH_STMT_TYPE (switch_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((switch_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1515, __FUNCTION__, (SWITCH_STMT)))), (2), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1515, __FUNCTION__)))))
= orig_type;
1516 add_stmt (switch_stmt);
1517 push_switch (switch_stmt);
1518 SWITCH_STMT_BODY (switch_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((switch_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1518, __FUNCTION__, (SWITCH_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1518, __FUNCTION__)))))
= push_stmt_list ();
1519}
1520
1521/* Finish the body of a switch-statement, which may be given by
1522 SWITCH_STMT. The COND to switch on is indicated. */
1523
1524void
1525finish_switch_stmt (tree switch_stmt)
1526{
1527 tree scope;
1528
1529 SWITCH_STMT_BODY (switch_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((switch_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1529, __FUNCTION__, (SWITCH_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1529, __FUNCTION__)))))
=
1530 pop_stmt_list (SWITCH_STMT_BODY (switch_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((switch_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1530, __FUNCTION__, (SWITCH_STMT)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1530, __FUNCTION__)))))
);
1531 pop_switch ();
1532
1533 scope = SWITCH_STMT_SCOPE (switch_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((switch_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1533, __FUNCTION__, (SWITCH_STMT)))), (3), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1533, __FUNCTION__)))))
;
1534 SWITCH_STMT_SCOPE (switch_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((switch_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1534, __FUNCTION__, (SWITCH_STMT)))), (3), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1534, __FUNCTION__)))))
= NULL__null;
1535 add_stmt (do_poplevel (scope));
1536}
1537
1538/* Begin a try-block. Returns a newly-created TRY_BLOCK if
1539 appropriate. */
1540
1541tree
1542begin_try_block (void)
1543{
1544 tree r = build_stmt (input_location, TRY_BLOCK, NULL_TREE(tree) __null, NULL_TREE(tree) __null);
1545 add_stmt (r);
1546 TRY_STMTS (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1546, __FUNCTION__, (TRY_BLOCK)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1546, __FUNCTION__)))))
= push_stmt_list ();
1547 return r;
1548}
1549
1550/* Likewise, for a function-try-block. The block returned in
1551 *COMPOUND_STMT is an artificial outer scope, containing the
1552 function-try-block. */
1553
1554tree
1555begin_function_try_block (tree *compound_stmt)
1556{
1557 tree r;
1558 /* This outer scope does not exist in the C++ standard, but we need
1559 a place to put __FUNCTION__ and similar variables. */
1560 *compound_stmt = begin_compound_stmt (0);
1561 r = begin_try_block ();
1562 FN_TRY_BLOCK_P (r)((tree_not_check2 (((tree_check ((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1562, __FUNCTION__, (TRY_BLOCK)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1562, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3)
= 1;
1563 return r;
1564}
1565
1566/* Finish a try-block, which may be given by TRY_BLOCK. */
1567
1568void
1569finish_try_block (tree try_block)
1570{
1571 TRY_STMTS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1571, __FUNCTION__, (TRY_BLOCK)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1571, __FUNCTION__)))))
= pop_stmt_list (TRY_STMTS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1571, __FUNCTION__, (TRY_BLOCK)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1571, __FUNCTION__)))))
);
1572 TRY_HANDLERS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1572, __FUNCTION__, (TRY_BLOCK)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1572, __FUNCTION__)))))
= push_stmt_list ();
1573}
1574
1575/* Finish the body of a cleanup try-block, which may be given by
1576 TRY_BLOCK. */
1577
1578void
1579finish_cleanup_try_block (tree try_block)
1580{
1581 TRY_STMTS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1581, __FUNCTION__, (TRY_BLOCK)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1581, __FUNCTION__)))))
= pop_stmt_list (TRY_STMTS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1581, __FUNCTION__, (TRY_BLOCK)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1581, __FUNCTION__)))))
);
1582}
1583
1584/* Finish an implicitly generated try-block, with a cleanup is given
1585 by CLEANUP. */
1586
1587void
1588finish_cleanup (tree cleanup, tree try_block)
1589{
1590 TRY_HANDLERS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1590, __FUNCTION__, (TRY_BLOCK)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1590, __FUNCTION__)))))
= cleanup;
1591 CLEANUP_P (try_block)((tree_not_check2 (((tree_check ((try_block), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1591, __FUNCTION__, (TRY_BLOCK)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1591, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= 1;
1592}
1593
1594/* Likewise, for a function-try-block. */
1595
1596void
1597finish_function_try_block (tree try_block)
1598{
1599 finish_try_block (try_block);
1600 /* FIXME : something queer about CTOR_INITIALIZER somehow following
1601 the try block, but moving it inside. */
1602 in_function_try_handler((cfun + 0)->language)->x_in_function_try_handler = 1;
1603}
1604
1605/* Finish a handler-sequence for a try-block, which may be given by
1606 TRY_BLOCK. */
1607
1608void
1609finish_handler_sequence (tree try_block)
1610{
1611 TRY_HANDLERS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1611, __FUNCTION__, (TRY_BLOCK)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1611, __FUNCTION__)))))
= pop_stmt_list (TRY_HANDLERS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1611, __FUNCTION__, (TRY_BLOCK)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1611, __FUNCTION__)))))
);
1612 check_handlers (TRY_HANDLERS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1612, __FUNCTION__, (TRY_BLOCK)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1612, __FUNCTION__)))))
);
1613}
1614
1615/* Finish the handler-seq for a function-try-block, given by
1616 TRY_BLOCK. COMPOUND_STMT is the outer block created by
1617 begin_function_try_block. */
1618
1619void
1620finish_function_handler_sequence (tree try_block, tree compound_stmt)
1621{
1622 in_function_try_handler((cfun + 0)->language)->x_in_function_try_handler = 0;
1623 finish_handler_sequence (try_block);
1624 finish_compound_stmt (compound_stmt);
1625}
1626
1627/* Begin a handler. Returns a HANDLER if appropriate. */
1628
1629tree
1630begin_handler (void)
1631{
1632 tree r;
1633
1634 r = build_stmt (input_location, HANDLER, NULL_TREE(tree) __null, NULL_TREE(tree) __null);
1635 add_stmt (r);
1636
1637 /* Create a binding level for the eh_info and the exception object
1638 cleanup. */
1639 HANDLER_BODY (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1639, __FUNCTION__, (HANDLER)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1639, __FUNCTION__)))))
= do_pushlevel (sk_catch);
1640
1641 return r;
1642}
1643
1644/* Finish the handler-parameters for a handler, which may be given by
1645 HANDLER. DECL is the declaration for the catch parameter, or NULL
1646 if this is a `catch (...)' clause. */
1647
1648void
1649finish_handler_parms (tree decl, tree handler)
1650{
1651 tree type = NULL_TREE(tree) __null;
1652 if (processing_template_declscope_chain->x_processing_template_decl)
1653 {
1654 if (decl)
1655 {
1656 decl = pushdecl (decl);
1657 decl = push_template_decl (decl);
1658 HANDLER_PARMS (handler)(*((const_cast<tree*> (tree_operand_check (((tree_check
((handler), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1658, __FUNCTION__, (HANDLER)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1658, __FUNCTION__)))))
= decl;
1659 type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1659, __FUNCTION__))->typed.type)
;
1660 }
1661 }
1662 else
1663 {
1664 type = expand_start_catch_block (decl);
1665 if (warn_catch_valueglobal_options.x_warn_catch_value
1666 && type != NULL_TREE(tree) __null
1667 && type != error_mark_nodeglobal_trees[TI_ERROR_MARK]
1668 && !TYPE_REF_P (TREE_TYPE (decl))(((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1668, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE
)
)
1669 {
1670 tree orig_type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1670, __FUNCTION__))->typed.type)
;
1671 if (CLASS_TYPE_P (orig_type)(((((enum tree_code) (orig_type)->base.code)) == RECORD_TYPE
|| (((enum tree_code) (orig_type)->base.code)) == UNION_TYPE
) && ((tree_class_check ((orig_type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1671, __FUNCTION__))->type_common.lang_flag_5))
)
1672 {
1673 if (TYPE_POLYMORPHIC_P (orig_type)(((tree_not_check2 ((orig_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1673, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
)
1674 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/semantics.c"
, 1674, __FUNCTION__))->decl_minimal.locus)
,
1675 OPT_Wcatch_value_,
1676 "catching polymorphic type %q#T by value",
1677 orig_type);
1678 else if (warn_catch_valueglobal_options.x_warn_catch_value > 1)
1679 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/semantics.c"
, 1679, __FUNCTION__))->decl_minimal.locus)
,
1680 OPT_Wcatch_value_,
1681 "catching type %q#T by value", orig_type);
1682 }
1683 else if (warn_catch_valueglobal_options.x_warn_catch_value > 2)
1684 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/semantics.c"
, 1684, __FUNCTION__))->decl_minimal.locus)
,
1685 OPT_Wcatch_value_,
1686 "catching non-reference type %q#T", orig_type);
1687 }
1688 }
1689 HANDLER_TYPE (handler)((contains_struct_check (((tree_check ((handler), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1689, __FUNCTION__, (HANDLER)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1689, __FUNCTION__))->typed.type)
= type;
1690}
1691
1692/* Finish a handler, which may be given by HANDLER. The BLOCKs are
1693 the return value from the matching call to finish_handler_parms. */
1694
1695void
1696finish_handler (tree handler)
1697{
1698 if (!processing_template_declscope_chain->x_processing_template_decl)
1699 expand_end_catch_block ();
1700 HANDLER_BODY (handler)(*((const_cast<tree*> (tree_operand_check (((tree_check
((handler), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1700, __FUNCTION__, (HANDLER)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1700, __FUNCTION__)))))
= do_poplevel (HANDLER_BODY (handler)(*((const_cast<tree*> (tree_operand_check (((tree_check
((handler), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1700, __FUNCTION__, (HANDLER)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1700, __FUNCTION__)))))
);
1701}
1702
1703/* Begin a compound statement. FLAGS contains some bits that control the
1704 behavior and context. If BCS_NO_SCOPE is set, the compound statement
1705 does not define a scope. If BCS_FN_BODY is set, this is the outermost
1706 block of a function. If BCS_TRY_BLOCK is set, this is the block
1707 created on behalf of a TRY statement. Returns a token to be passed to
1708 finish_compound_stmt. */
1709
1710tree
1711begin_compound_stmt (unsigned int flags)
1712{
1713 tree r;
1714
1715 if (flags & BCS_NO_SCOPE)
1716 {
1717 r = push_stmt_list ();
1718 STATEMENT_LIST_NO_SCOPE (r)((tree_not_check2 (((tree_check ((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1718, __FUNCTION__, (STATEMENT_LIST)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1718, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= 1;
1719
1720 /* Normally, we try hard to keep the BLOCK for a statement-expression.
1721 But, if it's a statement-expression with a scopeless block, there's
1722 nothing to keep, and we don't want to accidentally keep a block
1723 *inside* the scopeless block. */
1724 keep_next_level (false);
1725 }
1726 else
1727 {
1728 scope_kind sk = sk_block;
1729 if (flags & BCS_TRY_BLOCK)
1730 sk = sk_try;
1731 else if (flags & BCS_TRANSACTION)
1732 sk = sk_transaction;
1733 r = do_pushlevel (sk);
1734 }
1735
1736 /* When processing a template, we need to remember where the braces were,
1737 so that we can set up identical scopes when instantiating the template
1738 later. BIND_EXPR is a handy candidate for this.
1739 Note that do_poplevel won't create a BIND_EXPR itself here (and thus
1740 result in nested BIND_EXPRs), since we don't build BLOCK nodes when
1741 processing templates. */
1742 if (processing_template_declscope_chain->x_processing_template_decl)
1743 {
1744 r = build3 (BIND_EXPR, NULL__null, NULL__null, r, NULL__null);
1745 BIND_EXPR_TRY_BLOCK (r)((tree_not_check2 (((tree_check ((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1745, __FUNCTION__, (BIND_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1745, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= (flags & BCS_TRY_BLOCK) != 0;
1746 BIND_EXPR_BODY_BLOCK (r)((tree_not_check2 (((tree_check ((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1746, __FUNCTION__, (BIND_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1746, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3)
= (flags & BCS_FN_BODY) != 0;
1747 TREE_SIDE_EFFECTS (r)((non_type_check ((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1747, __FUNCTION__))->base.side_effects_flag)
= 1;
1748 }
1749
1750 return r;
1751}
1752
1753/* Finish a compound-statement, which is given by STMT. */
1754
1755void
1756finish_compound_stmt (tree stmt)
1757{
1758 if (TREE_CODE (stmt)((enum tree_code) (stmt)->base.code) == BIND_EXPR)
1759 {
1760 tree body = do_poplevel (BIND_EXPR_BODY (stmt)((*((const_cast<tree*> (tree_operand_check (((tree_check
((stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1760, __FUNCTION__, (BIND_EXPR)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1760, __FUNCTION__))))))
);
1761 /* If the STATEMENT_LIST is empty and this BIND_EXPR isn't special,
1762 discard the BIND_EXPR so it can be merged with the containing
1763 STATEMENT_LIST. */
1764 if (TREE_CODE (body)((enum tree_code) (body)->base.code) == STATEMENT_LIST
1765 && STATEMENT_LIST_HEAD (body)((tree_check ((body), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1765, __FUNCTION__, (STATEMENT_LIST)))->stmt_list.head)
== NULL__null
1766 && !BIND_EXPR_BODY_BLOCK (stmt)((tree_not_check2 (((tree_check ((stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1766, __FUNCTION__, (BIND_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1766, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3)
1767 && !BIND_EXPR_TRY_BLOCK (stmt)((tree_not_check2 (((tree_check ((stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1767, __FUNCTION__, (BIND_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1767, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
)
1768 stmt = body;
1769 else
1770 BIND_EXPR_BODY (stmt)((*((const_cast<tree*> (tree_operand_check (((tree_check
((stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1770, __FUNCTION__, (BIND_EXPR)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1770, __FUNCTION__))))))
= body;
1771 }
1772 else if (STATEMENT_LIST_NO_SCOPE (stmt)((tree_not_check2 (((tree_check ((stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1772, __FUNCTION__, (STATEMENT_LIST)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1772, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
)
1773 stmt = pop_stmt_list (stmt);
1774 else
1775 {
1776 /* Destroy any ObjC "super" receivers that may have been
1777 created. */
1778 objc_clear_super_receiver ();
1779
1780 stmt = do_poplevel (stmt);
1781 }
1782
1783 /* ??? See c_end_compound_stmt wrt statement expressions. */
1784 add_stmt (stmt);
1785}
1786
1787/* Finish an asm-statement, whose components are a STRING, some
1788 OUTPUT_OPERANDS, some INPUT_OPERANDS, some CLOBBERS and some
1789 LABELS. Also note whether the asm-statement should be
1790 considered volatile, and whether it is asm inline. */
1791
1792tree
1793finish_asm_stmt (location_t loc, int volatile_p, tree string,
1794 tree output_operands, tree input_operands, tree clobbers,
1795 tree labels, bool inline_p)
1796{
1797 tree r;
1798 tree t;
1799 int ninputs = list_length (input_operands);
1800 int noutputs = list_length (output_operands);
1801
1802 if (!processing_template_declscope_chain->x_processing_template_decl)
1803 {
1804 const char *constraint;
1805 const char **oconstraints;
1806 bool allows_mem, allows_reg, is_inout;
1807 tree operand;
1808 int i;
1809
1810 oconstraints = XALLOCAVEC (const char *, noutputs)((const char * *) __builtin_alloca(sizeof (const char *) * (noutputs
)))
;
1811
1812 string = resolve_asm_operand_names (string, output_operands,
1813 input_operands, labels);
1814
1815 for (i = 0, t = output_operands; t; t = TREE_CHAIN (t)((contains_struct_check ((t), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1815, __FUNCTION__))->common.chain)
, ++i)
1816 {
1817 operand = TREE_VALUE (t)((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1817, __FUNCTION__, (TREE_LIST)))->list.value)
;
1818
1819 /* ??? Really, this should not be here. Users should be using a
1820 proper lvalue, dammit. But there's a long history of using
1821 casts in the output operands. In cases like longlong.h, this
1822 becomes a primitive form of typechecking -- if the cast can be
1823 removed, then the output operand had a type of the proper width;
1824 otherwise we'll get an error. Gross, but ... */
1825 STRIP_NOPS (operand)(operand) = tree_strip_nop_conversions ((const_cast<union tree_node
*> (((operand)))))
;
1826
1827 operand = mark_lvalue_use (operand);
1828
1829 if (!lvalue_or_else (operand, lv_asm, tf_warning_or_error))
1830 operand = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1831
1832 if (operand != error_mark_nodeglobal_trees[TI_ERROR_MARK]
1833 && (TREE_READONLY (operand)((non_type_check ((operand), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1833, __FUNCTION__))->base.readonly_flag)
1834 || CP_TYPE_CONST_P (TREE_TYPE (operand))((cp_type_quals (((contains_struct_check ((operand), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1834, __FUNCTION__))->typed.type)) & TYPE_QUAL_CONST
) != 0)
1835 /* Functions are not modifiable, even though they are
1836 lvalues. */
1837 || FUNC_OR_METHOD_TYPE_P (TREE_TYPE (operand))(((enum tree_code) (((contains_struct_check ((operand), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1837, __FUNCTION__))->typed.type))->base.code) == FUNCTION_TYPE
|| ((enum tree_code) (((contains_struct_check ((operand), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1837, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE
)
1838 /* If it's an aggregate and any field is const, then it is
1839 effectively const. */
1840 || (CLASS_TYPE_P (TREE_TYPE (operand))(((((enum tree_code) (((contains_struct_check ((operand), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1840, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE
|| (((enum tree_code) (((contains_struct_check ((operand), (
TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1840, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE
) && ((tree_class_check ((((contains_struct_check ((operand
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1840, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1840, __FUNCTION__))->type_common.lang_flag_5))
1841 && C_TYPE_FIELDS_READONLY (TREE_TYPE (operand))((((tree_class_check ((((contains_struct_check ((operand), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1841, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1841, __FUNCTION__))->type_with_lang_specific.lang_specific
))->fields_readonly)
)))
1842 cxx_readonly_error (loc, operand, lv_asm);
1843
1844 tree *op = &operand;
1845 while (TREE_CODE (*op)((enum tree_code) (*op)->base.code) == COMPOUND_EXPR)
1846 op = &TREE_OPERAND (*op, 1)(*((const_cast<tree*> (tree_operand_check ((*op), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1846, __FUNCTION__)))))
;
1847 switch (TREE_CODE (*op)((enum tree_code) (*op)->base.code))
1848 {
1849 case PREINCREMENT_EXPR:
1850 case PREDECREMENT_EXPR:
1851 case MODIFY_EXPR:
1852 *op = genericize_compound_lvalue (*op);
1853 op = &TREE_OPERAND (*op, 1)(*((const_cast<tree*> (tree_operand_check ((*op), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1853, __FUNCTION__)))))
;
1854 break;
1855 default:
1856 break;
1857 }
1858
1859 constraint = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t)))((const char *)((tree_check ((((tree_check ((((tree_check ((t
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1859, __FUNCTION__, (TREE_LIST)))->list.purpose)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1859, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1859, __FUNCTION__, (STRING_CST)))->string.str))
;
1860 oconstraints[i] = constraint;
1861
1862 if (parse_output_constraint (&constraint, i, ninputs, noutputs,
1863 &allows_mem, &allows_reg, &is_inout))
1864 {
1865 /* If the operand is going to end up in memory,
1866 mark it addressable. */
1867 if (!allows_reg && !cxx_mark_addressable (*op))
1868 operand = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1869 }
1870 else
1871 operand = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1872
1873 TREE_VALUE (t)((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1873, __FUNCTION__, (TREE_LIST)))->list.value)
= operand;
1874 }
1875
1876 for (i = 0, t = input_operands; t; ++i, t = TREE_CHAIN (t)((contains_struct_check ((t), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1876, __FUNCTION__))->common.chain)
)
1877 {
1878 constraint = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t)))((const char *)((tree_check ((((tree_check ((((tree_check ((t
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1878, __FUNCTION__, (TREE_LIST)))->list.purpose)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1878, __FUNCTION__, (TREE_LIST)))->list.value)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1878, __FUNCTION__, (STRING_CST)))->string.str))
;
1879 bool constraint_parsed
1880 = parse_input_constraint (&constraint, i, ninputs, noutputs, 0,
1881 oconstraints, &allows_mem, &allows_reg);
1882 /* If the operand is going to end up in memory, don't call
1883 decay_conversion. */
1884 if (constraint_parsed && !allows_reg && allows_mem)
1885 operand = mark_lvalue_use (TREE_VALUE (t)((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1885, __FUNCTION__, (TREE_LIST)))->list.value)
);
1886 else
1887 operand = decay_conversion (TREE_VALUE (t)((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1887, __FUNCTION__, (TREE_LIST)))->list.value)
, tf_warning_or_error);
1888
1889 /* If the type of the operand hasn't been determined (e.g.,
1890 because it involves an overloaded function), then issue
1891 an error message. There's no context available to
1892 resolve the overloading. */
1893 if (TREE_TYPE (operand)((contains_struct_check ((operand), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1893, __FUNCTION__))->typed.type)
== unknown_type_nodecp_global_trees[CPTI_UNKNOWN_TYPE])
1894 {
1895 error_at (loc,
1896 "type of %<asm%> operand %qE could not be determined",
1897 TREE_VALUE (t)((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1897, __FUNCTION__, (TREE_LIST)))->list.value)
);
1898 operand = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1899 }
1900
1901 if (constraint_parsed)
1902 {
1903 /* If the operand is going to end up in memory,
1904 mark it addressable. */
1905 if (!allows_reg && allows_mem)
1906 {
1907 /* Strip the nops as we allow this case. FIXME, this really
1908 should be rejected or made deprecated. */
1909 STRIP_NOPS (operand)(operand) = tree_strip_nop_conversions ((const_cast<union tree_node
*> (((operand)))))
;
1910
1911 tree *op = &operand;
1912 while (TREE_CODE (*op)((enum tree_code) (*op)->base.code) == COMPOUND_EXPR)
1913 op = &TREE_OPERAND (*op, 1)(*((const_cast<tree*> (tree_operand_check ((*op), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1913, __FUNCTION__)))))
;
1914 switch (TREE_CODE (*op)((enum tree_code) (*op)->base.code))
1915 {
1916 case PREINCREMENT_EXPR:
1917 case PREDECREMENT_EXPR:
1918 case MODIFY_EXPR:
1919 *op = genericize_compound_lvalue (*op);
1920 op = &TREE_OPERAND (*op, 1)(*((const_cast<tree*> (tree_operand_check ((*op), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1920, __FUNCTION__)))))
;
1921 break;
1922 default:
1923 break;
1924 }
1925
1926 if (!cxx_mark_addressable (*op))
1927 operand = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1928 }
1929 else if (!allows_reg && !allows_mem)
1930 {
1931 /* If constraint allows neither register nor memory,
1932 try harder to get a constant. */
1933 tree constop = maybe_constant_value (operand);
1934 if (TREE_CONSTANT (constop)((non_type_check ((constop), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1934, __FUNCTION__))->base.constant_flag)
)
1935 operand = constop;
1936 }
1937 }
1938 else
1939 operand = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1940
1941 TREE_VALUE (t)((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1941, __FUNCTION__, (TREE_LIST)))->list.value)
= operand;
1942 }
1943 }
1944
1945 r = build_stmt (loc, ASM_EXPR, string,
1946 output_operands, input_operands,
1947 clobbers, labels);
1948 ASM_VOLATILE_P (r)((tree_check ((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1948, __FUNCTION__, (ASM_EXPR)))->base.public_flag)
= volatile_p || noutputs == 0;
1949 ASM_INLINE_P (r)((tree_check ((r), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 1949, __FUNCTION__, (ASM_EXPR)))->base.protected_flag)
= inline_p;
1950 r = maybe_cleanup_point_expr_void (r);
1951 return add_stmt (r);
1952}
1953
1954/* Finish a label with the indicated NAME. Returns the new label. */
1955
1956tree
1957finish_label_stmt (tree name)
1958{
1959 tree decl = define_label (input_location, name);
1960
1961 if (decl == error_mark_nodeglobal_trees[TI_ERROR_MARK])
1962 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1963
1964 add_stmt (build_stmt (input_location, LABEL_EXPR, decl));
1965
1966 return decl;
1967}
1968
1969/* Finish a series of declarations for local labels. G++ allows users
1970 to declare "local" labels, i.e., labels with scope. This extension
1971 is useful when writing code involving statement-expressions. */
1972
1973void
1974finish_label_decl (tree name)
1975{
1976 if (!at_function_scope_p ())
1977 {
1978 error ("%<__label__%> declarations are only allowed in function scopes");
1979 return;
1980 }
1981
1982 add_decl_expr (declare_local_label (name));
1983}
1984
1985/* When DECL goes out of scope, make sure that CLEANUP is executed. */
1986
1987void
1988finish_decl_cleanup (tree decl, tree cleanup)
1989{
1990 push_cleanup (decl, cleanup, false);
1991}
1992
1993/* If the current scope exits with an exception, run CLEANUP. */
1994
1995void
1996finish_eh_cleanup (tree cleanup)
1997{
1998 push_cleanup (NULL__null, cleanup, true);
1999}
2000
2001/* The MEM_INITS is a list of mem-initializers, in reverse of the
2002 order they were written by the user. Each node is as for
2003 emit_mem_initializers. */
2004
2005void
2006finish_mem_initializers (tree mem_inits)
2007{
2008 /* Reorder the MEM_INITS so that they are in the order they appeared
2009 in the source program. */
2010 mem_inits = nreverse (mem_inits);
2011
2012 if (processing_template_declscope_chain->x_processing_template_decl)
2013 {
2014 tree mem;
2015
2016 for (mem = mem_inits; mem; mem = TREE_CHAIN (mem)((contains_struct_check ((mem), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2016, __FUNCTION__))->common.chain)
)
2017 {
2018 /* If the TREE_PURPOSE is a TYPE_PACK_EXPANSION, skip the
2019 check for bare parameter packs in the TREE_VALUE, because
2020 any parameter packs in the TREE_VALUE have already been
2021 bound as part of the TREE_PURPOSE. See
2022 make_pack_expansion for more information. */
2023 if (TREE_CODE (TREE_PURPOSE (mem))((enum tree_code) (((tree_check ((mem), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2023, __FUNCTION__, (TREE_LIST)))->list.purpose))->base
.code)
!= TYPE_PACK_EXPANSION
2024 && check_for_bare_parameter_packs (TREE_VALUE (mem)((tree_check ((mem), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2024, __FUNCTION__, (TREE_LIST)))->list.value)
))
2025 TREE_VALUE (mem)((tree_check ((mem), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2025, __FUNCTION__, (TREE_LIST)))->list.value)
= error_mark_nodeglobal_trees[TI_ERROR_MARK];
2026 }
2027
2028 add_stmt (build_min_nt_loc (UNKNOWN_LOCATION((location_t) 0),
2029 CTOR_INITIALIZER, mem_inits));
2030 }
2031 else
2032 emit_mem_initializers (mem_inits);
2033}
2034
2035/* Obfuscate EXPR if it looks like an id-expression or member access so
2036 that the call to finish_decltype in do_auto_deduction will give the
2037 right result. If EVEN_UNEVAL, do this even in unevaluated context. */
2038
2039tree
2040force_paren_expr (tree expr, bool even_uneval)
2041{
2042 /* This is only needed for decltype(auto) in C++14. */
2043 if (cxx_dialect < cxx14)
2044 return expr;
2045
2046 /* If we're in unevaluated context, we can't be deducing a
2047 return/initializer type, so we don't need to mess with this. */
2048 if (cp_unevaluated_operand && !even_uneval)
2049 return expr;
2050
2051 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == COMPONENT_REF
2052 || TREE_CODE (expr)((enum tree_code) (expr)->base.code) == SCOPE_REF)
2053 REF_PARENTHESIZED_P (expr)((tree_not_check2 (((tree_check5 (((expr)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2053, __FUNCTION__, (COMPONENT_REF), (INDIRECT_REF), (SCOPE_REF
), (VIEW_CONVERT_EXPR), (PAREN_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2053, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)
= true;
2054 else if (DECL_P (tree_strip_any_location_wrapper (expr))(tree_code_type[(int) (((enum tree_code) (tree_strip_any_location_wrapper
(expr))->base.code))] == tcc_declaration)
)
2055 {
2056 location_t loc = cp_expr_location (expr);
2057 const tree_code code = processing_template_declscope_chain->x_processing_template_decl ? PAREN_EXPR
2058 : VIEW_CONVERT_EXPR;
2059 expr = build1_loc (loc, code, TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2059, __FUNCTION__))->typed.type)
, expr);
2060 REF_PARENTHESIZED_P (expr)((tree_not_check2 (((tree_check5 (((expr)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2060, __FUNCTION__, (COMPONENT_REF), (INDIRECT_REF), (SCOPE_REF
), (VIEW_CONVERT_EXPR), (PAREN_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2060, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)
= true;
2061 }
2062 return expr;
2063}
2064
2065/* If T is an id-expression obfuscated by force_paren_expr, undo the
2066 obfuscation and return the underlying id-expression. Otherwise
2067 return T. */
2068
2069tree
2070maybe_undo_parenthesized_ref (tree t)
2071{
2072 if (cxx_dialect < cxx14)
2073 return t;
2074
2075 if (INDIRECT_REF_P (t)(((enum tree_code) (t)->base.code) == INDIRECT_REF) && REF_PARENTHESIZED_P (t)((tree_not_check2 (((tree_check5 (((t)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2075, __FUNCTION__, (COMPONENT_REF), (INDIRECT_REF), (SCOPE_REF
), (VIEW_CONVERT_EXPR), (PAREN_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2075, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)
)
2076 {
2077 t = TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2077, __FUNCTION__)))))
;
2078 while (TREE_CODE (t)((enum tree_code) (t)->base.code) == NON_LVALUE_EXPR
2079 || TREE_CODE (t)((enum tree_code) (t)->base.code) == NOP_EXPR)
2080 t = TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2080, __FUNCTION__)))))
;
2081
2082 gcc_assert (TREE_CODE (t) == ADDR_EXPR((void)(!(((enum tree_code) (t)->base.code) == ADDR_EXPR ||
((enum tree_code) (t)->base.code) == STATIC_CAST_EXPR) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2083, __FUNCTION__), 0 : 0))
2083 || TREE_CODE (t) == STATIC_CAST_EXPR)((void)(!(((enum tree_code) (t)->base.code) == ADDR_EXPR ||
((enum tree_code) (t)->base.code) == STATIC_CAST_EXPR) ? fancy_abort
("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2083, __FUNCTION__), 0 : 0))
;
2084 t = TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2084, __FUNCTION__)))))
;
2085 }
2086 else if ((TREE_CODE (t)((enum tree_code) (t)->base.code) == PAREN_EXPR || TREE_CODE (t)((enum tree_code) (t)->base.code) == VIEW_CONVERT_EXPR)
2087 && REF_PARENTHESIZED_P (t)((tree_not_check2 (((tree_check5 (((t)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2087, __FUNCTION__, (COMPONENT_REF), (INDIRECT_REF), (SCOPE_REF
), (VIEW_CONVERT_EXPR), (PAREN_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2087, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)
)
2088 t = TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2088, __FUNCTION__)))))
;
2089
2090 return t;
2091}
2092
2093/* Finish a parenthesized expression EXPR. */
2094
2095cp_expr
2096finish_parenthesized_expr (cp_expr expr)
2097{
2098 if (EXPR_P (expr)((tree_code_type[(int) (((enum tree_code) (expr)->base.code
))]) >= tcc_reference && (tree_code_type[(int) (((
enum tree_code) (expr)->base.code))]) <= tcc_expression
)
)
2099 /* This inhibits warnings in c_common_truthvalue_conversion. */
2100 suppress_warning (expr, OPT_Wparentheses);
2101
2102 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == OFFSET_REF
2103 || TREE_CODE (expr)((enum tree_code) (expr)->base.code) == SCOPE_REF)
2104 /* [expr.unary.op]/3 The qualified id of a pointer-to-member must not be
2105 enclosed in parentheses. */
2106 PTRMEM_OK_P (expr)((tree_not_check2 (((tree_check3 (((expr)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2106, __FUNCTION__, (ADDR_EXPR), (OFFSET_REF), (SCOPE_REF))
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2106, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= 0;
2107
2108 tree stripped_expr = tree_strip_any_location_wrapper (expr);
2109 if (TREE_CODE (stripped_expr)((enum tree_code) (stripped_expr)->base.code) == STRING_CST)
2110 PAREN_STRING_LITERAL_P (stripped_expr)((tree_not_check2 (((tree_check ((stripped_expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2110, __FUNCTION__, (STRING_CST)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2110, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= 1;
2111
2112 expr = cp_expr (force_paren_expr (expr), expr.get_location ());
2113
2114 return expr;
2115}
2116
2117/* Finish a reference to a non-static data member (DECL) that is not
2118 preceded by `.' or `->'. */
2119
2120tree
2121finish_non_static_data_member (tree decl, tree object, tree qualifying_scope)
2122{
2123 gcc_assert (TREE_CODE (decl) == FIELD_DECL)((void)(!(((enum tree_code) (decl)->base.code) == FIELD_DECL
) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2123, __FUNCTION__), 0 : 0))
;
2124 bool try_omp_private = !object && omp_private_member_map;
2125 tree ret;
2126
2127 if (!object)
2128 {
2129 tree scope = qualifying_scope;
2130 if (scope == NULL_TREE(tree) __null)
2131 {
2132 scope = context_for_name_lookup (decl);
2133 if (!TYPE_P (scope)(tree_code_type[(int) (((enum tree_code) (scope)->base.code
))] == tcc_type)
)
2134 {
2135 /* Can happen during error recovery (c++/85014). */
2136 gcc_assert (seen_error ())((void)(!(seen_error ()) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2136, __FUNCTION__), 0 : 0))
;
2137 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2138 }
2139 }
2140 object = maybe_dummy_object (scope, NULL__null);
2141 }
2142
2143 object = maybe_resolve_dummy (object, true);
2144 if (object == error_mark_nodeglobal_trees[TI_ERROR_MARK])
2145 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2146
2147 /* DR 613/850: Can use non-static data members without an associated
2148 object in sizeof/decltype/alignof. */
2149 if (is_dummy_object (object) && cp_unevaluated_operand == 0
2150 && (!processing_template_declscope_chain->x_processing_template_decl || !current_class_ref(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun
+ 0)->language)->x_current_class_ref : &scope_chain
->x_current_class_ref))
))
2151 {
2152 if (current_function_decl
2153 && DECL_STATIC_FUNCTION_P (current_function_decl)(__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/semantics.c"
, 2153, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2153, __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/semantics.c"
, 2153, __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/semantics.c"
, 2153, __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/semantics.c"
, 2153, __FUNCTION__); &lt->u.fn; })->static_function
)
)
2154 error ("invalid use of member %qD in static member function", decl);
2155 else
2156 error ("invalid use of non-static data member %qD", decl);
2157 inform (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2157, __FUNCTION__))->decl_minimal.locus)
, "declared here");
2158
2159 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2160 }
2161
2162 if (current_class_ptr(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun
+ 0)->language)->x_current_class_ptr : &scope_chain
->x_current_class_ptr))
)
2163 TREE_USED (current_class_ptr)(((*((cfun + 0) && ((cfun + 0)->language) ? &(
(cfun + 0)->language)->x_current_class_ptr : &scope_chain
->x_current_class_ptr)))->base.used_flag)
= 1;
2164 if (processing_template_declscope_chain->x_processing_template_decl)
2165 {
2166 tree type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2166, __FUNCTION__))->typed.type)
;
2167
2168 if (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE))
2169 /* Quals on the object don't matter. */;
2170 else if (PACK_EXPANSION_P (type)(((enum tree_code) (type)->base.code) == TYPE_PACK_EXPANSION
|| ((enum tree_code) (type)->base.code) == EXPR_PACK_EXPANSION
)
)
2171 /* Don't bother trying to represent this. */
2172 type = NULL_TREE(tree) __null;
2173 else
2174 {
2175 /* Set the cv qualifiers. */
2176 int quals = cp_type_quals (TREE_TYPE (object)((contains_struct_check ((object), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2176, __FUNCTION__))->typed.type)
);
2177
2178 if (DECL_MUTABLE_P (decl)(((contains_struct_check (((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2178, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2178, __FUNCTION__))->decl_common.lang_flag_0))
)
2179 quals &= ~TYPE_QUAL_CONST;
2180
2181 quals |= cp_type_quals (TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2181, __FUNCTION__))->typed.type)
);
2182 type = cp_build_qualified_type (type, quals)cp_build_qualified_type_real ((type), (quals), tf_warning_or_error
)
;
2183 }
2184
2185 if (qualifying_scope)
2186 /* Wrap this in a SCOPE_REF for now. */
2187 ret = build_qualified_name (type, qualifying_scope, decl,
2188 /*template_p=*/false);
2189 else
2190 ret = (convert_from_reference
2191 (build_min (COMPONENT_REF, type, object, decl, NULL_TREE(tree) __null)));
2192 }
2193 /* If PROCESSING_TEMPLATE_DECL is nonzero here, then
2194 QUALIFYING_SCOPE is also non-null. */
2195 else
2196 {
2197 tree access_type = TREE_TYPE (object)((contains_struct_check ((object), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2197, __FUNCTION__))->typed.type)
;
2198
2199 perform_or_defer_access_check (TYPE_BINFO (access_type)((tree_check3 ((access_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2199, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
, decl,
2200 decl, tf_warning_or_error);
2201
2202 /* If the data member was named `C::M', convert `*this' to `C'
2203 first. */
2204 if (qualifying_scope)
2205 {
2206 tree binfo = NULL_TREE(tree) __null;
2207 object = build_scoped_ref (object, qualifying_scope,
2208 &binfo);
2209 }
2210
2211 ret = build_class_member_access_expr (object, decl,
2212 /*access_path=*/NULL_TREE(tree) __null,
2213 /*preserve_reference=*/false,
2214 tf_warning_or_error);
2215 }
2216 if (try_omp_private)
2217 {
2218 tree *v = omp_private_member_map->get (decl);
2219 if (v)
2220 ret = convert_from_reference (*v);
2221 }
2222 return ret;
2223}
2224
2225/* DECL was the declaration to which a qualified-id resolved. Issue
2226 an error message if it is not accessible. If OBJECT_TYPE is
2227 non-NULL, we have just seen `x->' or `x.' and OBJECT_TYPE is the
2228 type of `*x', or `x', respectively. If the DECL was named as
2229 `A::B' then NESTED_NAME_SPECIFIER is `A'. Return value is like
2230 perform_access_checks above. */
2231
2232bool
2233check_accessibility_of_qualified_id (tree decl,
2234 tree object_type,
2235 tree nested_name_specifier,
2236 tsubst_flags_t complain)
2237{
2238 /* If we're not checking, return immediately. */
2239 if (deferred_access_no_check)
2240 return true;
2241
2242 /* Determine the SCOPE of DECL. */
2243 tree scope = context_for_name_lookup (decl);
2244 /* If the SCOPE is not a type, then DECL is not a member. */
2245 if (!TYPE_P (scope)(tree_code_type[(int) (((enum tree_code) (scope)->base.code
))] == tcc_type)
2246 /* If SCOPE is dependent then we can't perform this access check now,
2247 and since we'll perform this access check again after substitution
2248 there's no need to explicitly defer it. */
2249 || dependent_type_p (scope))
2250 return true;
2251
2252 tree qualifying_type = NULL_TREE(tree) __null;
2253 /* Compute the scope through which DECL is being accessed. */
2254 if (object_type
2255 /* OBJECT_TYPE might not be a class type; consider:
2256
2257 class A { typedef int I; };
2258 I *p;
2259 p->A::I::~I();
2260
2261 In this case, we will have "A::I" as the DECL, but "I" as the
2262 OBJECT_TYPE. */
2263 && CLASS_TYPE_P (object_type)(((((enum tree_code) (object_type)->base.code)) == RECORD_TYPE
|| (((enum tree_code) (object_type)->base.code)) == UNION_TYPE
) && ((tree_class_check ((object_type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2263, __FUNCTION__))->type_common.lang_flag_5))
2264 && DERIVED_FROM_P (scope, object_type)(lookup_base ((object_type), (scope), ba_any, __null, tf_none
) != (tree) __null)
)
2265 /* If we are processing a `->' or `.' expression, use the type of the
2266 left-hand side. */
2267 qualifying_type = object_type;
2268 else if (nested_name_specifier)
2269 {
2270 /* If the reference is to a non-static member of the
2271 current class, treat it as if it were referenced through
2272 `this'. */
2273 if (DECL_NONSTATIC_MEMBER_P (decl)((((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2273, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE
) || ((enum tree_code) (decl)->base.code) == FIELD_DECL)
2274 && current_class_ptr(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun
+ 0)->language)->x_current_class_ptr : &scope_chain
->x_current_class_ptr))
)
2275 if (tree current = current_nonlambda_class_type ())
2276 {
2277 if (dependent_type_p (current))
2278 /* In general we can't know whether this access goes through
2279 `this' until instantiation time. Punt now, or else we might
2280 create a deferred access check that's not relative to `this'
2281 when it ought to be. We'll check this access again after
2282 substitution, e.g. from tsubst_qualified_id. */
2283 return true;
2284
2285 if (DERIVED_FROM_P (scope, current)(lookup_base ((current), (scope), ba_any, __null, tf_none) !=
(tree) __null)
)
2286 qualifying_type = current;
2287 }
2288 /* Otherwise, use the type indicated by the
2289 nested-name-specifier. */
2290 if (!qualifying_type)
2291 qualifying_type = nested_name_specifier;
2292 }
2293 else
2294 /* Otherwise, the name must be from the current class or one of
2295 its bases. */
2296 qualifying_type = currently_open_derived_class (scope);
2297
2298 if (qualifying_type
2299 /* It is possible for qualifying type to be a TEMPLATE_TYPE_PARM
2300 or similar in a default argument value. */
2301 && CLASS_TYPE_P (qualifying_type)(((((enum tree_code) (qualifying_type)->base.code)) == RECORD_TYPE
|| (((enum tree_code) (qualifying_type)->base.code)) == UNION_TYPE
) && ((tree_class_check ((qualifying_type), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2301, __FUNCTION__))->type_common.lang_flag_5))
)
2302 return perform_or_defer_access_check (TYPE_BINFO (qualifying_type)((tree_check3 ((qualifying_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2302, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
, decl,
2303 decl, complain);
2304
2305 return true;
2306}
2307
2308/* EXPR is the result of a qualified-id. The QUALIFYING_CLASS was the
2309 class named to the left of the "::" operator. DONE is true if this
2310 expression is a complete postfix-expression; it is false if this
2311 expression is followed by '->', '[', '(', etc. ADDRESS_P is true
2312 iff this expression is the operand of '&'. TEMPLATE_P is true iff
2313 the qualified-id was of the form "A::template B". TEMPLATE_ARG_P
2314 is true iff this qualified name appears as a template argument. */
2315
2316tree
2317finish_qualified_id_expr (tree qualifying_class,
2318 tree expr,
2319 bool done,
2320 bool address_p,
2321 bool template_p,
2322 bool template_arg_p,
2323 tsubst_flags_t complain)
2324{
2325 gcc_assert (TYPE_P (qualifying_class))((void)(!((tree_code_type[(int) (((enum tree_code) (qualifying_class
)->base.code))] == tcc_type)) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2325, __FUNCTION__), 0 : 0))
;
2326
2327 if (error_operand_p (expr))
2328 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2329
2330 if ((DECL_P (expr)(tree_code_type[(int) (((enum tree_code) (expr)->base.code
))] == tcc_declaration)
|| BASELINK_P (expr)(((enum tree_code) (expr)->base.code) == BASELINK))
2331 && !mark_used (expr, complain))
2332 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2333
2334 if (template_p)
2335 {
2336 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == UNBOUND_CLASS_TEMPLATE)
2337 {
2338 /* cp_parser_lookup_name thought we were looking for a type,
2339 but we're actually looking for a declaration. */
2340 qualifying_class = TYPE_CONTEXT (expr)((tree_class_check ((expr), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2340, __FUNCTION__))->type_common.context)
;
2341 expr = TYPE_IDENTIFIER (expr)(((tree_class_check ((expr), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2341, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((expr), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2341, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((expr), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2341, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2341, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((expr), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2341, __FUNCTION__))->type_common.name))
;
2342 }
2343 else
2344 check_template_keyword (expr);
2345 }
2346
2347 /* If EXPR occurs as the operand of '&', use special handling that
2348 permits a pointer-to-member. */
2349 if (address_p && done)
2350 {
2351 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == SCOPE_REF)
2352 expr = TREE_OPERAND (expr, 1)(*((const_cast<tree*> (tree_operand_check ((expr), (1),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2352, __FUNCTION__)))))
;
2353 expr = build_offset_ref (qualifying_class, expr,
2354 /*address_p=*/true, complain);
2355 return expr;
2356 }
2357
2358 /* No need to check access within an enum. */
2359 if (TREE_CODE (qualifying_class)((enum tree_code) (qualifying_class)->base.code) == ENUMERAL_TYPE
2360 && TREE_CODE (expr)((enum tree_code) (expr)->base.code) != IDENTIFIER_NODE)
2361 return expr;
2362
2363 /* Within the scope of a class, turn references to non-static
2364 members into expression of the form "this->...". */
2365 if (template_arg_p)
2366 /* But, within a template argument, we do not want make the
2367 transformation, as there is no "this" pointer. */
2368 ;
2369 else if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == FIELD_DECL)
2370 {
2371 push_deferring_access_checks (dk_no_check);
2372 expr = finish_non_static_data_member (expr, NULL_TREE(tree) __null,
2373 qualifying_class);
2374 pop_deferring_access_checks ();
2375 }
2376 else if (BASELINK_P (expr)(((enum tree_code) (expr)->base.code) == BASELINK))
2377 {
2378 /* See if any of the functions are non-static members. */
2379 /* If so, the expression may be relative to 'this'. */
2380 if (!shared_member_p (expr)
2381 && current_class_ptr(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun
+ 0)->language)->x_current_class_ptr : &scope_chain
->x_current_class_ptr))
2382 && DERIVED_FROM_P (qualifying_class,(lookup_base ((current_nonlambda_class_type ()), (qualifying_class
), ba_any, __null, tf_none) != (tree) __null)
2383 current_nonlambda_class_type ())(lookup_base ((current_nonlambda_class_type ()), (qualifying_class
), ba_any, __null, tf_none) != (tree) __null)
)
2384 expr = (build_class_member_access_expr
2385 (maybe_dummy_object (qualifying_class, NULL__null),
2386 expr,
2387 BASELINK_ACCESS_BINFO (expr)(((struct tree_baselink*) (tree_check ((expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2387, __FUNCTION__, (BASELINK))))->access_binfo)
,
2388 /*preserve_reference=*/false,
2389 complain));
2390 else if (done)
2391 /* The expression is a qualified name whose address is not
2392 being taken. */
2393 expr = build_offset_ref (qualifying_class, expr, /*address_p=*/false,
2394 complain);
2395 }
2396 else if (!template_p
2397 && TREE_CODE (expr)((enum tree_code) (expr)->base.code) == TEMPLATE_DECL
2398 && !DECL_FUNCTION_TEMPLATE_P (expr)(((enum tree_code) (expr)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2398, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((expr
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2398, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)
)
2399 {
2400 if (complain & tf_error)
2401 error ("%qE missing template arguments", expr);
2402 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2403 }
2404 else
2405 {
2406 /* In a template, return a SCOPE_REF for most qualified-ids
2407 so that we can check access at instantiation time. But if
2408 we're looking at a member of the current instantiation, we
2409 know we have access and building up the SCOPE_REF confuses
2410 non-type template argument handling. */
2411 if (processing_template_declscope_chain->x_processing_template_decl
2412 && (!currently_open_class (qualifying_class)
2413 || TREE_CODE (expr)((enum tree_code) (expr)->base.code) == IDENTIFIER_NODE
2414 || TREE_CODE (expr)((enum tree_code) (expr)->base.code) == TEMPLATE_ID_EXPR
2415 || TREE_CODE (expr)((enum tree_code) (expr)->base.code) == BIT_NOT_EXPR))
2416 expr = build_qualified_name (TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2416, __FUNCTION__))->typed.type)
,
2417 qualifying_class, expr,
2418 template_p);
2419 else if (tree wrap = maybe_get_tls_wrapper_call (expr))
2420 expr = wrap;
2421
2422 expr = convert_from_reference (expr);
2423 }
2424
2425 return expr;
2426}
2427
2428/* Begin a statement-expression. The value returned must be passed to
2429 finish_stmt_expr. */
2430
2431tree
2432begin_stmt_expr (void)
2433{
2434 return push_stmt_list ();
2435}
2436
2437/* Process the final expression of a statement expression. EXPR can be
2438 NULL, if the final expression is empty. Return a STATEMENT_LIST
2439 containing all the statements in the statement-expression, or
2440 ERROR_MARK_NODE if there was an error. */
2441
2442tree
2443finish_stmt_expr_expr (tree expr, tree stmt_expr)
2444{
2445 if (error_operand_p (expr))
2446 {
2447 /* The type of the statement-expression is the type of the last
2448 expression. */
2449 TREE_TYPE (stmt_expr)((contains_struct_check ((stmt_expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2449, __FUNCTION__))->typed.type)
= error_mark_nodeglobal_trees[TI_ERROR_MARK];
2450 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2451 }
2452
2453 /* If the last statement does not have "void" type, then the value
2454 of the last statement is the value of the entire expression. */
2455 if (expr)
2456 {
2457 tree type = TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2457, __FUNCTION__))->typed.type)
;
2458
2459 if (type && type_unknown_p (type))
2460 {
2461 error ("a statement expression is an insufficient context"
2462 " for overload resolution");
2463 TREE_TYPE (stmt_expr)((contains_struct_check ((stmt_expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2463, __FUNCTION__))->typed.type)
= error_mark_nodeglobal_trees[TI_ERROR_MARK];
2464 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2465 }
2466 else if (processing_template_declscope_chain->x_processing_template_decl)
2467 {
2468 expr = build_stmt (input_location, EXPR_STMT, expr);
2469 expr = add_stmt (expr);
2470 /* Mark the last statement so that we can recognize it as such at
2471 template-instantiation time. */
2472 EXPR_STMT_STMT_EXPR_RESULT (expr)((tree_not_check2 (((tree_check ((expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2472, __FUNCTION__, (EXPR_STMT)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2472, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= 1;
2473 }
2474 else if (VOID_TYPE_P (type)(((enum tree_code) (type)->base.code) == VOID_TYPE))
2475 {
2476 /* Just treat this like an ordinary statement. */
2477 expr = finish_expr_stmt (expr);
2478 }
2479 else
2480 {
2481 /* It actually has a value we need to deal with. First, force it
2482 to be an rvalue so that we won't need to build up a copy
2483 constructor call later when we try to assign it to something. */
2484 expr = force_rvalue (expr, tf_warning_or_error);
2485 if (error_operand_p (expr))
2486 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2487
2488 /* Update for array-to-pointer decay. */
2489 type = TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2489, __FUNCTION__))->typed.type)
;
2490
2491 /* Wrap it in a CLEANUP_POINT_EXPR and add it to the list like a
2492 normal statement, but don't convert to void or actually add
2493 the EXPR_STMT. */
2494 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) != CLEANUP_POINT_EXPR)
2495 expr = maybe_cleanup_point_expr (expr);
2496 add_stmt (expr);
2497 }
2498
2499 /* The type of the statement-expression is the type of the last
2500 expression. */
2501 TREE_TYPE (stmt_expr)((contains_struct_check ((stmt_expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2501, __FUNCTION__))->typed.type)
= type;
2502 }
2503
2504 return stmt_expr;
2505}
2506
2507/* Finish a statement-expression. EXPR should be the value returned
2508 by the previous begin_stmt_expr. Returns an expression
2509 representing the statement-expression. */
2510
2511tree
2512finish_stmt_expr (tree stmt_expr, bool has_no_scope)
2513{
2514 tree type;
2515 tree result;
2516
2517 if (error_operand_p (stmt_expr))
2518 {
2519 pop_stmt_list (stmt_expr);
2520 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2521 }
2522
2523 gcc_assert (TREE_CODE (stmt_expr) == STATEMENT_LIST)((void)(!(((enum tree_code) (stmt_expr)->base.code) == STATEMENT_LIST
) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2523, __FUNCTION__), 0 : 0))
;
2524
2525 type = TREE_TYPE (stmt_expr)((contains_struct_check ((stmt_expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2525, __FUNCTION__))->typed.type)
;
2526 result = pop_stmt_list (stmt_expr);
2527 TREE_TYPE (result)((contains_struct_check ((result), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2527, __FUNCTION__))->typed.type)
= type;
2528
2529 if (processing_template_declscope_chain->x_processing_template_decl)
2530 {
2531 result = build_min (STMT_EXPR, type, result);
2532 TREE_SIDE_EFFECTS (result)((non_type_check ((result), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2532, __FUNCTION__))->base.side_effects_flag)
= 1;
2533 STMT_EXPR_NO_SCOPE (result)((tree_not_check2 (((tree_check ((result), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2533, __FUNCTION__, (STMT_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2533, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= has_no_scope;
2534 }
2535 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/semantics.c"
, 2535, __FUNCTION__))->type_common.lang_flag_5))
)
2536 {
2537 /* Wrap the statement-expression in a TARGET_EXPR so that the
2538 temporary object created by the final expression is destroyed at
2539 the end of the full-expression containing the
2540 statement-expression. */
2541 result = force_target_expr (type, result, tf_warning_or_error);
2542 }
2543
2544 return result;
2545}
2546
2547/* Returns the expression which provides the value of STMT_EXPR. */
2548
2549tree
2550stmt_expr_value_expr (tree stmt_expr)
2551{
2552 tree t = STMT_EXPR_STMT (stmt_expr)(*((const_cast<tree*> (tree_operand_check (((tree_check
((stmt_expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2552, __FUNCTION__, (STMT_EXPR)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2552, __FUNCTION__)))))
;
2553
2554 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == BIND_EXPR)
2555 t = BIND_EXPR_BODY (t)((*((const_cast<tree*> (tree_operand_check (((tree_check
((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2555, __FUNCTION__, (BIND_EXPR)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2555, __FUNCTION__))))))
;
2556
2557 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == STATEMENT_LIST && STATEMENT_LIST_TAIL (t)((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2557, __FUNCTION__, (STATEMENT_LIST)))->stmt_list.tail)
)
2558 t = STATEMENT_LIST_TAIL (t)((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2558, __FUNCTION__, (STATEMENT_LIST)))->stmt_list.tail)
->stmt;
2559
2560 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == EXPR_STMT)
2561 t = EXPR_STMT_EXPR (t)(*((const_cast<tree*> (tree_operand_check (((tree_check
((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2561, __FUNCTION__, (EXPR_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2561, __FUNCTION__)))))
;
2562
2563 return t;
2564}
2565
2566/* Return TRUE iff EXPR_STMT is an empty list of
2567 expression statements. */
2568
2569bool
2570empty_expr_stmt_p (tree expr_stmt)
2571{
2572 tree body = NULL_TREE(tree) __null;
2573
2574 if (expr_stmt == void_nodeglobal_trees[TI_VOID])
2575 return true;
2576
2577 if (expr_stmt)
2578 {
2579 if (TREE_CODE (expr_stmt)((enum tree_code) (expr_stmt)->base.code) == EXPR_STMT)
2580 body = EXPR_STMT_EXPR (expr_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((expr_stmt), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2580, __FUNCTION__, (EXPR_STMT)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2580, __FUNCTION__)))))
;
2581 else if (TREE_CODE (expr_stmt)((enum tree_code) (expr_stmt)->base.code) == STATEMENT_LIST)
2582 body = expr_stmt;
2583 }
2584
2585 if (body)
2586 {
2587 if (TREE_CODE (body)((enum tree_code) (body)->base.code) == STATEMENT_LIST)
2588 return tsi_end_p (tsi_start (body));
2589 else
2590 return empty_expr_stmt_p (body);
2591 }
2592 return false;
2593}
2594
2595/* Perform Koenig lookup. FN_EXPR is the postfix-expression representing
2596 the function (or functions) to call; ARGS are the arguments to the
2597 call. Returns the functions to be considered by overload resolution. */
2598
2599cp_expr
2600perform_koenig_lookup (cp_expr fn_expr, vec<tree, va_gc> *args,
2601 tsubst_flags_t complain)
2602{
2603 tree identifier = NULL_TREE(tree) __null;
2604 tree functions = NULL_TREE(tree) __null;
2605 tree tmpl_args = NULL_TREE(tree) __null;
2606 bool template_id = false;
2607 location_t loc = fn_expr.get_location ();
2608 tree fn = fn_expr.get_value ();
2609
2610 STRIP_ANY_LOCATION_WRAPPER (fn)(fn) = tree_strip_any_location_wrapper ((const_cast<union tree_node
*> (((fn)))))
;
2611
2612 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == TEMPLATE_ID_EXPR)
2613 {
2614 /* Use a separate flag to handle null args. */
2615 template_id = true;
2616 tmpl_args = TREE_OPERAND (fn, 1)(*((const_cast<tree*> (tree_operand_check ((fn), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2616, __FUNCTION__)))))
;
2617 fn = TREE_OPERAND (fn, 0)(*((const_cast<tree*> (tree_operand_check ((fn), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2617, __FUNCTION__)))))
;
2618 }
2619
2620 /* Find the name of the overloaded function. */
2621 if (identifier_p (fn))
2622 identifier = fn;
2623 else
2624 {
2625 functions = fn;
2626 identifier = OVL_NAME (functions)((contains_struct_check ((ovl_first (functions)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2626, __FUNCTION__))->decl_minimal.name)
;
2627 }
2628
2629 /* A call to a namespace-scope function using an unqualified name.
2630
2631 Do Koenig lookup -- unless any of the arguments are
2632 type-dependent. */
2633 if (!any_type_dependent_arguments_p (args)
2634 && !any_dependent_template_arguments_p (tmpl_args))
2635 {
2636 fn = lookup_arg_dependent (identifier, functions, args);
2637 if (!fn)
2638 {
2639 /* The unqualified name could not be resolved. */
2640 if (complain & tf_error)
2641 fn = unqualified_fn_lookup_error (cp_expr (identifier, loc));
2642 else
2643 fn = identifier;
2644 }
2645 }
2646
2647 if (fn && template_id && fn != error_mark_nodeglobal_trees[TI_ERROR_MARK])
2648 fn = build2 (TEMPLATE_ID_EXPR, unknown_type_nodecp_global_trees[CPTI_UNKNOWN_TYPE], fn, tmpl_args);
2649
2650 return cp_expr (fn, loc);
2651}
2652
2653/* Generate an expression for `FN (ARGS)'. This may change the
2654 contents of ARGS.
2655
2656 If DISALLOW_VIRTUAL is true, the call to FN will be not generated
2657 as a virtual call, even if FN is virtual. (This flag is set when
2658 encountering an expression where the function name is explicitly
2659 qualified. For example a call to `X::f' never generates a virtual
2660 call.)
2661
2662 Returns code for the call. */
2663
2664tree
2665finish_call_expr (tree fn, vec<tree, va_gc> **args, bool disallow_virtual,
2666 bool koenig_p, tsubst_flags_t complain)
2667{
2668 tree result;
2669 tree orig_fn;
2670 vec<tree, va_gc> *orig_args = *args;
2671
2672 if (fn == error_mark_nodeglobal_trees[TI_ERROR_MARK])
2673 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2674
2675 gcc_assert (!TYPE_P (fn))((void)(!(!(tree_code_type[(int) (((enum tree_code) (fn)->
base.code))] == tcc_type)) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2675, __FUNCTION__), 0 : 0))
;
2676
2677 /* If FN may be a FUNCTION_DECL obfuscated by force_paren_expr, undo
2678 it so that we can tell this is a call to a known function. */
2679 fn = maybe_undo_parenthesized_ref (fn);
2680
2681 STRIP_ANY_LOCATION_WRAPPER (fn)(fn) = tree_strip_any_location_wrapper ((const_cast<union tree_node
*> (((fn)))))
;
2682
2683 orig_fn = fn;
2684
2685 if (processing_template_declscope_chain->x_processing_template_decl)
2686 {
2687 /* If FN is a local extern declaration or set thereof, look them up
2688 again at instantiation time. */
2689 if (is_overloaded_fn (fn))
2690 {
2691 tree ifn = get_first_fn (fn);
2692 if (TREE_CODE (ifn)((enum tree_code) (ifn)->base.code) == FUNCTION_DECL
2693 && DECL_LOCAL_DECL_P (ifn)((contains_struct_check (((tree_check2 ((ifn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2693, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2693, __FUNCTION__))->decl_common.lang_flag_0)
)
2694 orig_fn = DECL_NAME (ifn)((contains_struct_check ((ifn), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2694, __FUNCTION__))->decl_minimal.name)
;
2695 }
2696
2697 /* If the call expression is dependent, build a CALL_EXPR node
2698 with no type; type_dependent_expression_p recognizes
2699 expressions with no type as being dependent. */
2700 if (type_dependent_expression_p (fn)
2701 || any_type_dependent_arguments_p (*args))
2702 {
2703 result = build_min_nt_call_vec (orig_fn, *args);
2704 SET_EXPR_LOCATION (result, cp_expr_loc_or_input_loc (fn))(expr_check (((result)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2704, __FUNCTION__))->exp.locus = (cp_expr_loc_or_input_loc
(fn))
;
2705 KOENIG_LOOKUP_P (result)((tree_not_check2 (((tree_check ((result), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2705, __FUNCTION__, (CALL_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2705, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= koenig_p;
2706 if (is_overloaded_fn (fn))
2707 fn = get_fns (fn);
2708
2709 if (cfun(cfun + 0))
2710 {
2711 bool abnormal = true;
2712 for (lkp_iterator iter (fn); abnormal && iter; ++iter)
2713 {
2714 tree fndecl = STRIP_TEMPLATE (*iter)(((enum tree_code) (*iter)->base.code) == TEMPLATE_DECL ? (
(struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((*iter), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2714, __FUNCTION__, (TEMPLATE_DECL))))))))->result : *iter
)
;
2715 if (TREE_CODE (fndecl)((enum tree_code) (fndecl)->base.code) != FUNCTION_DECL
2716 || !TREE_THIS_VOLATILE (fndecl)((fndecl)->base.volatile_flag))
2717 abnormal = false;
2718 }
2719 /* FIXME: Stop warning about falling off end of non-void
2720 function. But this is wrong. Even if we only see
2721 no-return fns at this point, we could select a
2722 future-defined return fn during instantiation. Or
2723 vice-versa. */
2724 if (abnormal)
2725 current_function_returns_abnormally((cfun + 0)->language)->returns_abnormally = 1;
2726 }
2727 return result;
2728 }
2729 orig_args = make_tree_vector_copy (*args);
2730 if (!BASELINK_P (fn)(((enum tree_code) (fn)->base.code) == BASELINK)
2731 && TREE_CODE (fn)((enum tree_code) (fn)->base.code) != PSEUDO_DTOR_EXPR
2732 && TREE_TYPE (fn)((contains_struct_check ((fn), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2732, __FUNCTION__))->typed.type)
!= unknown_type_nodecp_global_trees[CPTI_UNKNOWN_TYPE])
2733 fn = build_non_dependent_expr (fn);
2734 make_args_non_dependent (*args);
2735 }
2736
2737 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == COMPONENT_REF)
2738 {
2739 tree member = TREE_OPERAND (fn, 1)(*((const_cast<tree*> (tree_operand_check ((fn), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2739, __FUNCTION__)))))
;
2740 if (BASELINK_P (member)(((enum tree_code) (member)->base.code) == BASELINK))
2741 {
2742 tree object = TREE_OPERAND (fn, 0)(*((const_cast<tree*> (tree_operand_check ((fn), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2742, __FUNCTION__)))))
;
2743 return build_new_method_call (object, member,
2744 args, NULL_TREE(tree) __null,
2745 (disallow_virtual
2746 ? LOOKUP_NORMAL((1 << 0)) | LOOKUP_NONVIRTUAL(1 << 1)
2747 : LOOKUP_NORMAL((1 << 0))),
2748 /*fn_p=*/NULL__null,
2749 complain);
2750 }
2751 }
2752
2753 /* Per 13.3.1.1, '(&f)(...)' is the same as '(f)(...)'. */
2754 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == ADDR_EXPR
2755 && TREE_CODE (TREE_OPERAND (fn, 0))((enum tree_code) ((*((const_cast<tree*> (tree_operand_check
((fn), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2755, __FUNCTION__))))))->base.code)
== OVERLOAD)
2756 fn = TREE_OPERAND (fn, 0)(*((const_cast<tree*> (tree_operand_check ((fn), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2756, __FUNCTION__)))))
;
2757
2758 if (is_overloaded_fn (fn))
2759 fn = baselink_for_fns (fn);
2760
2761 result = NULL_TREE(tree) __null;
2762 if (BASELINK_P (fn)(((enum tree_code) (fn)->base.code) == BASELINK))
2763 {
2764 tree object;
2765
2766 /* A call to a member function. From [over.call.func]:
2767
2768 If the keyword this is in scope and refers to the class of
2769 that member function, or a derived class thereof, then the
2770 function call is transformed into a qualified function call
2771 using (*this) as the postfix-expression to the left of the
2772 . operator.... [Otherwise] a contrived object of type T
2773 becomes the implied object argument.
2774
2775 In this situation:
2776
2777 struct A { void f(); };
2778 struct B : public A {};
2779 struct C : public A { void g() { B::f(); }};
2780
2781 "the class of that member function" refers to `A'. But 11.2
2782 [class.access.base] says that we need to convert 'this' to B* as
2783 part of the access, so we pass 'B' to maybe_dummy_object. */
2784
2785 if (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (get_first_fn (fn))(((contains_struct_check ((get_first_fn (fn)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2785, __FUNCTION__))->decl_minimal.name) == cp_global_trees
[CPTI_CTOR_IDENTIFIER])
)
2786 {
2787 /* A constructor call always uses a dummy object. (This constructor
2788 call which has the form A::A () is actually invalid and we are
2789 going to reject it later in build_new_method_call.) */
2790 object = build_dummy_object (BINFO_TYPE (BASELINK_ACCESS_BINFO (fn))((contains_struct_check (((tree_check (((((struct tree_baselink
*) (tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2790, __FUNCTION__, (BASELINK))))->access_binfo)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2790, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2790, __FUNCTION__))->typed.type)
);
2791 }
2792 else
2793 object = maybe_dummy_object (BINFO_TYPE (BASELINK_ACCESS_BINFO (fn))((contains_struct_check (((tree_check (((((struct tree_baselink
*) (tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2793, __FUNCTION__, (BASELINK))))->access_binfo)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2793, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2793, __FUNCTION__))->typed.type)
,
2794 NULL__null);
2795
2796 result = build_new_method_call (object, fn, args, NULL_TREE(tree) __null,
2797 (disallow_virtual
2798 ? LOOKUP_NORMAL((1 << 0))|LOOKUP_NONVIRTUAL(1 << 1)
2799 : LOOKUP_NORMAL((1 << 0))),
2800 /*fn_p=*/NULL__null,
2801 complain);
2802 }
2803 else if (concept_check_p (fn))
2804 {
2805 /* FN is actually a template-id referring to a concept definition. */
2806 tree id = unpack_concept_check (fn);
2807 tree tmpl = TREE_OPERAND (id, 0)(*((const_cast<tree*> (tree_operand_check ((id), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2807, __FUNCTION__)))))
;
2808 tree args = TREE_OPERAND (id, 1)(*((const_cast<tree*> (tree_operand_check ((id), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2808, __FUNCTION__)))))
;
2809
2810 if (!function_concept_p (tmpl))
2811 {
2812 error_at (EXPR_LOC_OR_LOC (fn, input_location)((((IS_ADHOC_LOC (((((fn)) && ((tree_code_type[(int) (
((enum tree_code) ((fn))->base.code))]) >= tcc_reference
&& (tree_code_type[(int) (((enum tree_code) ((fn))->
base.code))]) <= tcc_expression)) ? (fn)->exp.locus : (
(location_t) 0)))) ? get_location_from_adhoc_loc (line_table,
((((fn)) && ((tree_code_type[(int) (((enum tree_code
) ((fn))->base.code))]) >= tcc_reference && (tree_code_type
[(int) (((enum tree_code) ((fn))->base.code))]) <= tcc_expression
)) ? (fn)->exp.locus : ((location_t) 0))) : (((((fn)) &&
((tree_code_type[(int) (((enum tree_code) ((fn))->base.code
))]) >= tcc_reference && (tree_code_type[(int) (((
enum tree_code) ((fn))->base.code))]) <= tcc_expression
)) ? (fn)->exp.locus : ((location_t) 0)))) != ((location_t
) 0)) ? (fn)->exp.locus : (input_location))
,
2813 "cannot call a concept as a function");
2814 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2815 }
2816
2817 /* Ensure the result is wrapped as a call expression. */
2818 result = build_concept_check (tmpl, args, tf_warning_or_error);
2819 }
2820 else if (is_overloaded_fn (fn))
2821 {
2822 /* If the function is an overloaded builtin, resolve it. */
2823 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == FUNCTION_DECL
2824 && (DECL_BUILT_IN_CLASS (fn)((built_in_class) (tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2824, __FUNCTION__, (FUNCTION_DECL)))->function_decl.built_in_class
)
== BUILT_IN_NORMAL
2825 || DECL_BUILT_IN_CLASS (fn)((built_in_class) (tree_check ((fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2825, __FUNCTION__, (FUNCTION_DECL)))->function_decl.built_in_class
)
== BUILT_IN_MD))
2826 result = resolve_overloaded_builtin (input_location, fn, *args);
2827
2828 if (!result)
2829 {
2830 if (warn_sizeof_pointer_memaccessglobal_options.x_warn_sizeof_pointer_memaccess
2831 && (complain & tf_warning)
2832 && !vec_safe_is_empty (*args)
2833 && !processing_template_declscope_chain->x_processing_template_decl)
2834 {
2835 location_t sizeof_arg_loc[3];
2836 tree sizeof_arg[3];
2837 unsigned int i;
2838 for (i = 0; i < 3; i++)
2839 {
2840 tree t;
2841
2842 sizeof_arg_loc[i] = UNKNOWN_LOCATION((location_t) 0);
2843 sizeof_arg[i] = NULL_TREE(tree) __null;
2844 if (i >= (*args)->length ())
2845 continue;
2846 t = (**args)[i];
2847 if (TREE_CODE (t)((enum tree_code) (t)->base.code) != SIZEOF_EXPR)
2848 continue;
2849 if (SIZEOF_EXPR_TYPE_P (t)((tree_not_check2 (((tree_check ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2849, __FUNCTION__, (SIZEOF_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2849, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
)
2850 sizeof_arg[i] = TREE_TYPE (TREE_OPERAND (t, 0))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
((t), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2850, __FUNCTION__)))))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2850, __FUNCTION__))->typed.type)
;
2851 else
2852 sizeof_arg[i] = TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2852, __FUNCTION__)))))
;
2853 sizeof_arg_loc[i] = EXPR_LOCATION (t)((((t)) && ((tree_code_type[(int) (((enum tree_code) (
(t))->base.code))]) >= tcc_reference && (tree_code_type
[(int) (((enum tree_code) ((t))->base.code))]) <= tcc_expression
)) ? (t)->exp.locus : ((location_t) 0))
;
2854 }
2855 sizeof_pointer_memaccess_warning
2856 (sizeof_arg_loc, fn, *args,
2857 sizeof_arg, same_type_ignoring_top_level_qualifiers_p);
2858 }
2859
2860 if ((complain & tf_warning)
2861 && TREE_CODE (fn)((enum tree_code) (fn)->base.code) == FUNCTION_DECL
2862 && fndecl_built_in_p (fn, BUILT_IN_MEMSET)
2863 && vec_safe_length (*args) == 3
2864 && !any_type_dependent_arguments_p (*args))
2865 {
2866 tree arg0 = (*orig_args)[0];
2867 tree arg1 = (*orig_args)[1];
2868 tree arg2 = (*orig_args)[2];
2869 int literal_mask = ((literal_integer_zerop (arg1) << 1)
2870 | (literal_integer_zerop (arg2) << 2));
2871 warn_for_memset (input_location, arg0, arg2, literal_mask);
2872 }
2873
2874 /* A call to a namespace-scope function. */
2875 result = build_new_function_call (fn, args, complain);
2876 }
2877 }
2878 else if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == PSEUDO_DTOR_EXPR)
2879 {
2880 if (!vec_safe_is_empty (*args))
2881 error ("arguments to destructor are not allowed");
2882 /* C++20/DR: If the postfix-expression names a pseudo-destructor (in
2883 which case the postfix-expression is a possibly-parenthesized class
2884 member access), the function call destroys the object of scalar type
2885 denoted by the object expression of the class member access. */
2886 tree ob = TREE_OPERAND (fn, 0)(*((const_cast<tree*> (tree_operand_check ((fn), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2886, __FUNCTION__)))))
;
2887 if (obvalue_p (ob))
2888 result = build_trivial_dtor_call (ob, true);
2889 else
2890 /* No location to clobber. */
2891 result = convert_to_void (ob, ICV_STATEMENT, complain);
2892 }
2893 else if (CLASS_TYPE_P (TREE_TYPE (fn))(((((enum tree_code) (((contains_struct_check ((fn), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2893, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE
|| (((enum tree_code) (((contains_struct_check ((fn), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2893, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE
) && ((tree_class_check ((((contains_struct_check ((fn
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2893, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2893, __FUNCTION__))->type_common.lang_flag_5))
)
2894 /* If the "function" is really an object of class type, it might
2895 have an overloaded `operator ()'. */
2896 result = build_op_call (fn, args, complain);
2897
2898 if (!result)
2899 /* A call where the function is unknown. */
2900 result = cp_build_function_call_vec (fn, args, complain);
2901
2902 if (processing_template_declscope_chain->x_processing_template_decl && result != error_mark_nodeglobal_trees[TI_ERROR_MARK])
2903 {
2904 if (INDIRECT_REF_P (result)(((enum tree_code) (result)->base.code) == INDIRECT_REF))
2905 result = TREE_OPERAND (result, 0)(*((const_cast<tree*> (tree_operand_check ((result), (0
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2905, __FUNCTION__)))))
;
2906 result = build_call_vec (TREE_TYPE (result)((contains_struct_check ((result), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2906, __FUNCTION__))->typed.type)
, orig_fn, orig_args);
2907 SET_EXPR_LOCATION (result, input_location)(expr_check (((result)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2907, __FUNCTION__))->exp.locus = (input_location)
;
2908 KOENIG_LOOKUP_P (result)((tree_not_check2 (((tree_check ((result), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2908, __FUNCTION__, (CALL_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2908, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= koenig_p;
2909 release_tree_vector (orig_args);
2910 result = convert_from_reference (result);
2911 }
2912
2913 return result;
2914}
2915
2916/* Finish a call to a postfix increment or decrement or EXPR. (Which
2917 is indicated by CODE, which should be POSTINCREMENT_EXPR or
2918 POSTDECREMENT_EXPR.) */
2919
2920cp_expr
2921finish_increment_expr (cp_expr expr, enum tree_code code)
2922{
2923 /* input_location holds the location of the trailing operator token.
2924 Build a location of the form:
2925 expr++
2926 ~~~~^~
2927 with the caret at the operator token, ranging from the start
2928 of EXPR to the end of the operator token. */
2929 location_t combined_loc = make_location (input_location,
2930 expr.get_start (),
2931 get_finish (input_location));
2932 cp_expr result = build_x_unary_op (combined_loc, code, expr,
2933 tf_warning_or_error);
2934 /* TODO: build_x_unary_op doesn't honor the location, so set it here. */
2935 result.set_location (combined_loc);
2936 return result;
2937}
2938
2939/* Finish a use of `this'. Returns an expression for `this'. */
2940
2941tree
2942finish_this_expr (void)
2943{
2944 tree result = NULL_TREE(tree) __null;
2945
2946 if (current_class_ptr(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun
+ 0)->language)->x_current_class_ptr : &scope_chain
->x_current_class_ptr))
)
2947 {
2948 tree type = TREE_TYPE (current_class_ref)((contains_struct_check (((*((cfun + 0) && ((cfun + 0
)->language) ? &((cfun + 0)->language)->x_current_class_ref
: &scope_chain->x_current_class_ref))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2948, __FUNCTION__))->typed.type)
;
2949
2950 /* In a lambda expression, 'this' refers to the captured 'this'. */
2951 if (LAMBDA_TYPE_P (type)(((enum tree_code) (type)->base.code) == RECORD_TYPE &&
((((tree_class_check ((((tree_class_check ((type), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((type), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2951, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))
)
2952 result = lambda_expr_this_capture (CLASSTYPE_LAMBDA_EXPR (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2952, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lambda_expr)
, true);
2953 else
2954 result = current_class_ptr(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun
+ 0)->language)->x_current_class_ptr : &scope_chain
->x_current_class_ptr))
;
2955 }
2956
2957 if (result)
2958 /* The keyword 'this' is a prvalue expression. */
2959 return rvalue (result);
2960
2961 tree fn = current_nonlambda_function ();
2962 if (fn && 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/semantics.c"
, 2962, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2962, __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/semantics.c"
, 2962, __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/semantics.c"
, 2962, __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/semantics.c"
, 2962, __FUNCTION__); &lt->u.fn; })->static_function
)
)
2963 error ("%<this%> is unavailable for static member functions");
2964 else if (fn)
2965 error ("invalid use of %<this%> in non-member function");
2966 else
2967 error ("invalid use of %<this%> at top level");
2968 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2969}
2970
2971/* Finish a pseudo-destructor expression. If SCOPE is NULL, the
2972 expression was of the form `OBJECT.~DESTRUCTOR' where DESTRUCTOR is
2973 the TYPE for the type given. If SCOPE is non-NULL, the expression
2974 was of the form `OBJECT.SCOPE::~DESTRUCTOR'. */
2975
2976tree
2977finish_pseudo_destructor_expr (tree object, tree scope, tree destructor,
2978 location_t loc)
2979{
2980 if (object == error_mark_nodeglobal_trees[TI_ERROR_MARK] || destructor == error_mark_nodeglobal_trees[TI_ERROR_MARK])
2981 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2982
2983 gcc_assert (TYPE_P (destructor))((void)(!((tree_code_type[(int) (((enum tree_code) (destructor
)->base.code))] == tcc_type)) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2983, __FUNCTION__), 0 : 0))
;
2984
2985 if (!processing_template_declscope_chain->x_processing_template_decl)
2986 {
2987 if (scope == error_mark_nodeglobal_trees[TI_ERROR_MARK])
2988 {
2989 error_at (loc, "invalid qualifying scope in pseudo-destructor name");
2990 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2991 }
2992 if (is_auto (destructor))
2993 destructor = TREE_TYPE (object)((contains_struct_check ((object), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 2993, __FUNCTION__))->typed.type)
;
2994 if (scope && TYPE_P (scope)(tree_code_type[(int) (((enum tree_code) (scope)->base.code
))] == tcc_type)
&& !check_dtor_name (scope, destructor))
2995 {
2996 error_at (loc,
2997 "qualified type %qT does not match destructor name ~%qT",
2998 scope, destructor);
2999 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3000 }
3001
3002
3003 /* [expr.pseudo] says both:
3004
3005 The type designated by the pseudo-destructor-name shall be
3006 the same as the object type.
3007
3008 and:
3009
3010 The cv-unqualified versions of the object type and of the
3011 type designated by the pseudo-destructor-name shall be the
3012 same type.
3013
3014 We implement the more generous second sentence, since that is
3015 what most other compilers do. */
3016 if (!same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (object)((contains_struct_check ((object), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3016, __FUNCTION__))->typed.type)
,
3017 destructor))
3018 {
3019 error_at (loc, "%qE is not of type %qT", object, destructor);
3020 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3021 }
3022 }
3023
3024 tree type = (type_dependent_expression_p (object)
3025 ? NULL_TREE(tree) __null : void_type_nodeglobal_trees[TI_VOID_TYPE]);
3026
3027 return build3_loc (loc, PSEUDO_DTOR_EXPR, type, object,
3028 scope, destructor);
3029}
3030
3031/* Finish an expression of the form CODE EXPR. */
3032
3033cp_expr
3034finish_unary_op_expr (location_t op_loc, enum tree_code code, cp_expr expr,
3035 tsubst_flags_t complain)
3036{
3037 /* Build a location of the form:
3038 ++expr
3039 ^~~~~~
3040 with the caret at the operator token, ranging from the start
3041 of the operator token to the end of EXPR. */
3042 location_t combined_loc = make_location (op_loc,
3043 op_loc, expr.get_finish ());
3044 cp_expr result = build_x_unary_op (combined_loc, code, expr, complain);
3045 /* TODO: build_x_unary_op doesn't always honor the location. */
3046 result.set_location (combined_loc);
3047
3048 if (result == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3049 return result;
3050
3051 if (!(complain & tf_warning))
3052 return result;
3053
3054 tree result_ovl = result;
3055 tree expr_ovl = expr;
3056
3057 if (!processing_template_declscope_chain->x_processing_template_decl)
3058 expr_ovl = cp_fully_fold (expr_ovl);
3059
3060 if (!CONSTANT_CLASS_P (expr_ovl)(tree_code_type[(int) (((enum tree_code) (expr_ovl)->base.
code))] == tcc_constant)
3061 || TREE_OVERFLOW_P (expr_ovl)((tree_code_type[(int) (((enum tree_code) (expr_ovl)->base
.code))] == tcc_constant) && ((tree_class_check ((expr_ovl
), (tcc_constant), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3061, __FUNCTION__))->base.public_flag))
)
3062 return result;
3063
3064 if (!processing_template_declscope_chain->x_processing_template_decl)
3065 result_ovl = cp_fully_fold (result_ovl);
3066
3067 if (CONSTANT_CLASS_P (result_ovl)(tree_code_type[(int) (((enum tree_code) (result_ovl)->base
.code))] == tcc_constant)
&& TREE_OVERFLOW_P (result_ovl)((tree_code_type[(int) (((enum tree_code) (result_ovl)->base
.code))] == tcc_constant) && ((tree_class_check ((result_ovl
), (tcc_constant), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3067, __FUNCTION__))->base.public_flag))
)
3068 overflow_warning (combined_loc, result_ovl);
3069
3070 return result;
3071}
3072
3073/* Return true if CONSTRUCTOR EXPR after pack expansion could have no
3074 elements. */
3075
3076static bool
3077maybe_zero_constructor_nelts (tree expr)
3078{
3079 if (CONSTRUCTOR_NELTS (expr)(vec_safe_length (((tree_check ((expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3079, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts)))
== 0)
3080 return true;
3081 if (!processing_template_declscope_chain->x_processing_template_decl)
3082 return false;
3083 for (constructor_elt &elt : CONSTRUCTOR_ELTS (expr)((tree_check ((expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3083, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts)
)
3084 if (!PACK_EXPANSION_P (elt.value)(((enum tree_code) (elt.value)->base.code) == TYPE_PACK_EXPANSION
|| ((enum tree_code) (elt.value)->base.code) == EXPR_PACK_EXPANSION
)
)
3085 return false;
3086 return true;
3087}
3088
3089/* Finish a compound-literal expression or C++11 functional cast with aggregate
3090 initializer. TYPE is the type to which the CONSTRUCTOR in COMPOUND_LITERAL
3091 is being cast. */
3092
3093tree
3094finish_compound_literal (tree type, tree compound_literal,
3095 tsubst_flags_t complain,
3096 fcl_t fcl_context)
3097{
3098 if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3099 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3100
3101 if (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE))
3102 {
3103 compound_literal
3104 = finish_compound_literal (TREE_TYPE (type)((contains_struct_check ((type), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3104, __FUNCTION__))->typed.type)
, compound_literal,
3105 complain, fcl_context);
3106 /* The prvalue is then used to direct-initialize the reference. */
3107 tree r = (perform_implicit_conversion_flags
3108 (type, compound_literal, complain, LOOKUP_NORMAL((1 << 0))));
3109 return convert_from_reference (r);
3110 }
3111
3112 if (!TYPE_OBJ_P (type)(!(((enum tree_code) (type)->base.code) == REFERENCE_TYPE)
&& !(((enum tree_code) (type)->base.code) == VOID_TYPE
) && !(((enum tree_code) (type)->base.code) == FUNCTION_TYPE
|| ((enum tree_code) (type)->base.code) == METHOD_TYPE))
)
3113 {
3114 /* DR2351 */
3115 if (VOID_TYPE_P (type)(((enum tree_code) (type)->base.code) == VOID_TYPE) && CONSTRUCTOR_NELTS (compound_literal)(vec_safe_length (((tree_check ((compound_literal), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3115, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts)))
== 0)
3116 return void_nodeglobal_trees[TI_VOID];
3117 else if (VOID_TYPE_P (type)(((enum tree_code) (type)->base.code) == VOID_TYPE)
3118 && processing_template_declscope_chain->x_processing_template_decl
3119 && maybe_zero_constructor_nelts (compound_literal))
3120 /* If there are only packs in compound_literal, it could
3121 be void{} after pack expansion. */;
3122 else
3123 {
3124 if (complain & tf_error)
3125 error ("compound literal of non-object type %qT", type);
3126 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3127 }
3128 }
3129
3130 if (template_placeholder_p (type))
3131 {
3132 type = do_auto_deduction (type, compound_literal, type, complain,
3133 adc_variable_type);
3134 if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3135 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3136 }
3137 /* C++23 auto{x}. */
3138 else if (is_auto (type)
3139 && !AUTO_IS_DECLTYPE (type)(((tree_class_check (((tree_check ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3139, __FUNCTION__, (TEMPLATE_TYPE_PARM)))), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3139, __FUNCTION__))->type_common.lang_flag_5))
3140 && CONSTRUCTOR_NELTS (compound_literal)(vec_safe_length (((tree_check ((compound_literal), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3140, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts)))
== 1)
3141 {
3142 if (cxx_dialect < cxx23)
3143 pedwarn (input_location, OPT_Wc__23_extensions,
3144 "%<auto{x}%> only available with "
3145 "%<-std=c++2b%> or %<-std=gnu++2b%>");
3146 type = do_auto_deduction (type, compound_literal, type, complain,
3147 adc_variable_type);
3148 if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3149 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3150 }
3151
3152 /* Used to hold a copy of the compound literal in a template. */
3153 tree orig_cl = NULL_TREE(tree) __null;
3154
3155 if (processing_template_declscope_chain->x_processing_template_decl)
3156 {
3157 const bool dependent_p
3158 = (instantiation_dependent_expression_p (compound_literal)
3159 || dependent_type_p (type));
3160 if (dependent_p)
3161 /* We're about to return, no need to copy. */
3162 orig_cl = compound_literal;
3163 else
3164 /* We're going to need a copy. */
3165 orig_cl = unshare_constructor (compound_literal);
3166 TREE_TYPE (orig_cl)((contains_struct_check ((orig_cl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3166, __FUNCTION__))->typed.type)
= type;
3167 /* Mark the expression as a compound literal. */
3168 TREE_HAS_CONSTRUCTOR (orig_cl)(((tree_not_check2 ((orig_cl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3168, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4))
= 1;
3169 /* And as instantiation-dependent. */
3170 CONSTRUCTOR_IS_DEPENDENT (orig_cl)(((tree_not_check2 (((tree_check ((orig_cl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3170, __FUNCTION__, (CONSTRUCTOR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3170, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1))
= dependent_p;
3171 if (fcl_context == fcl_c99)
3172 CONSTRUCTOR_C99_COMPOUND_LITERAL (orig_cl)(((tree_not_check2 (((tree_check ((orig_cl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3172, __FUNCTION__, (CONSTRUCTOR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3172, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3))
= 1;
3173 /* If the compound literal is dependent, we're done for now. */
3174 if (dependent_p)
3175 return orig_cl;
3176 /* Otherwise, do go on to e.g. check narrowing. */
3177 }
3178
3179 type = complete_type (type);
3180
3181 if (TYPE_NON_AGGREGATE_CLASS (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/semantics.c"
, 3181, __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/semantics.c"
, 3181, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_aggregate))
)
3182 {
3183 /* Trying to deal with a CONSTRUCTOR instead of a TREE_LIST
3184 everywhere that deals with function arguments would be a pain, so
3185 just wrap it in a TREE_LIST. The parser set a flag so we know
3186 that it came from T{} rather than T({}). */
3187 CONSTRUCTOR_IS_DIRECT_INIT (compound_literal)(((tree_not_check2 (((tree_check ((compound_literal), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3187, __FUNCTION__, (CONSTRUCTOR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3187, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
= 1;
3188 compound_literal = build_tree_list (NULL_TREE(tree) __null, compound_literal);
3189 return build_functional_cast (input_location, type,
3190 compound_literal, complain);
3191 }
3192
3193 if (TREE_CODE (type)((enum tree_code) (type)->base.code) == ARRAY_TYPE
3194 && check_array_initializer (NULL_TREE(tree) __null, type, compound_literal))
3195 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3196 compound_literal = reshape_init (type, compound_literal, complain);
3197 if (SCALAR_TYPE_P (type)((((enum tree_code) (type)->base.code) == OFFSET_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) || ((enum
tree_code) (type)->base.code) == REAL_TYPE || ((enum tree_code
) (type)->base.code) == COMPLEX_TYPE) || (((enum tree_code
) (type)->base.code) == POINTER_TYPE) || (((enum tree_code
) (type)->base.code) == RECORD_TYPE && (((tree_class_check
(((tree_check ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3197, __FUNCTION__, (RECORD_TYPE)))), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3197, __FUNCTION__))->type_common.lang_flag_2))) || (((enum
tree_code) (type)->base.code) == NULLPTR_TYPE))
3198 && !BRACE_ENCLOSED_INITIALIZER_P (compound_literal)(((enum tree_code) (compound_literal)->base.code) == CONSTRUCTOR
&& ((contains_struct_check ((compound_literal), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3198, __FUNCTION__))->typed.type) == cp_global_trees[CPTI_INIT_LIST_TYPE
])
)
3199 {
3200 tree t = instantiate_non_dependent_expr_sfinae (compound_literal,
3201 complain);
3202 if (!check_narrowing (type, t, complain))
3203 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3204 }
3205 if (TREE_CODE (type)((enum tree_code) (type)->base.code) == ARRAY_TYPE
3206 && TYPE_DOMAIN (type)((tree_check ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3206, __FUNCTION__, (ARRAY_TYPE)))->type_non_common.values
)
== NULL_TREE(tree) __null)
3207 {
3208 cp_complete_array_type_or_error (&type, compound_literal,
3209 false, complain);
3210 if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3211 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3212 }
3213 compound_literal = digest_init_flags (type, compound_literal,
3214 LOOKUP_NORMAL((1 << 0)) | LOOKUP_NO_NARROWING(((1 << 6) << 1) << 1),
3215 complain);
3216 if (compound_literal == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3217 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3218
3219 /* If we're in a template, return the original compound literal. */
3220 if (orig_cl)
3221 return orig_cl;
3222
3223 if (TREE_CODE (compound_literal)((enum tree_code) (compound_literal)->base.code) == CONSTRUCTOR)
3224 {
3225 TREE_HAS_CONSTRUCTOR (compound_literal)(((tree_not_check2 ((compound_literal), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3225, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4))
= true;
3226 if (fcl_context == fcl_c99)
3227 CONSTRUCTOR_C99_COMPOUND_LITERAL (compound_literal)(((tree_not_check2 (((tree_check ((compound_literal), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3227, __FUNCTION__, (CONSTRUCTOR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3227, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3))
= 1;
3228 }
3229
3230 /* Put static/constant array temporaries in static variables. */
3231 /* FIXME all C99 compound literals should be variables rather than C++
3232 temporaries, unless they are used as an aggregate initializer. */
3233 if ((!at_function_scope_p () || CP_TYPE_CONST_P (type)((cp_type_quals (type) & TYPE_QUAL_CONST) != 0))
3234 && fcl_context == fcl_c99
3235 && TREE_CODE (type)((enum tree_code) (type)->base.code) == ARRAY_TYPE
3236 && !TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)(((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3236, __FUNCTION__))->type_common.lang_flag_4))
3237 && initializer_constant_valid_p (compound_literal, type))
3238 {
3239 tree decl = create_temporary_var (type);
3240 DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3240, __FUNCTION__))->decl_minimal.context)
= NULL_TREE(tree) __null;
3241 DECL_INITIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3241, __FUNCTION__))->decl_common.initial)
= compound_literal;
3242 TREE_STATIC (decl)((decl)->base.static_flag) = 1;
3243 if (literal_type_p (type) && CP_TYPE_CONST_NON_VOLATILE_P (type)((cp_type_quals (type) & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE
)) == TYPE_QUAL_CONST)
)
3244 {
3245 /* 5.19 says that a constant expression can include an
3246 lvalue-rvalue conversion applied to "a glvalue of literal type
3247 that refers to a non-volatile temporary object initialized
3248 with a constant expression". Rather than try to communicate
3249 that this VAR_DECL is a temporary, just mark it constexpr. */
3250 DECL_DECLARED_CONSTEXPR_P (decl)((contains_struct_check (((tree_check2 (((((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/semantics.c"
, 3250, __FUNCTION__, (TEMPLATE_DECL))))))))->result : decl
)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3250, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3250, __FUNCTION__))->decl_common.lang_flag_8)
= true;
3251 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl)(((tree_not_check2 (((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3251, __FUNCTION__, (VAR_DECL)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3251, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
= true;
3252 TREE_CONSTANT (decl)((non_type_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3252, __FUNCTION__))->base.constant_flag)
= true;
3253 }
3254 cp_apply_type_quals_to_decl (cp_type_quals (type), decl);
3255 decl = pushdecl_top_level (decl);
3256 DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3256, __FUNCTION__))->decl_minimal.name)
= make_anon_name ();
3257 SET_DECL_ASSEMBLER_NAME (decl, DECL_NAME (decl))overwrite_decl_assembler_name (decl, ((contains_struct_check (
(decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3257, __FUNCTION__))->decl_minimal.name))
;
3258 /* Make sure the destructor is callable. */
3259 tree clean = cxx_maybe_build_cleanup (decl, complain);
3260 if (clean == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3261 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3262 return decl;
3263 }
3264
3265 /* Represent other compound literals with TARGET_EXPR so we produce
3266 a prvalue, and can elide copies. */
3267 if (!VECTOR_TYPE_P (type)(((enum tree_code) (type)->base.code) == VECTOR_TYPE))
3268 {
3269 /* The CONSTRUCTOR is now an initializer, not a compound literal. */
3270 TREE_HAS_CONSTRUCTOR (compound_literal)(((tree_not_check2 ((compound_literal), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3270, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4))
= false;
3271 compound_literal = get_target_expr_sfinae (compound_literal, complain);
3272 }
3273
3274 return compound_literal;
3275}
3276
3277/* Return the declaration for the function-name variable indicated by
3278 ID. */
3279
3280tree
3281finish_fname (tree id)
3282{
3283 tree decl;
3284
3285 decl = fname_decl (input_location, C_RID_CODE (id)((enum rid) (((struct c_common_identifier *) (id))->node.rid_code
))
, id);
3286 if (processing_template_declscope_chain->x_processing_template_decl && current_function_decl
3287 && decl != error_mark_nodeglobal_trees[TI_ERROR_MARK])
3288 decl = DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3288, __FUNCTION__))->decl_minimal.name)
;
3289 return decl;
3290}
3291
3292/* Finish a translation unit. */
3293
3294void
3295finish_translation_unit (void)
3296{
3297 /* In case there were missing closebraces,
3298 get us back to the global binding level. */
3299 pop_everything ();
3300 while (current_namespacescope_chain->old_namespace != global_namespacecp_global_trees[CPTI_GLOBAL])
3301 pop_namespace ();
3302
3303 /* Do file scope __FUNCTION__ et al. */
3304 finish_fname_decls ();
3305
3306 if (vec_safe_length (scope_chain->omp_declare_target_attribute))
3307 {
3308 if (!errorcount(global_dc)->diagnostic_count[(int) (DK_ERROR)])
3309 error ("%<#pragma omp declare target%> without corresponding "
3310 "%<#pragma omp end declare target%>");
3311 vec_safe_truncate (scope_chain->omp_declare_target_attribute, 0);
3312 }
3313}
3314
3315/* Finish a template type parameter, specified as AGGR IDENTIFIER.
3316 Returns the parameter. */
3317
3318tree
3319finish_template_type_parm (tree aggr, tree identifier)
3320{
3321 if (aggr != class_type_nodecp_global_trees[CPTI_CLASS_TYPE])
3322 {
3323 permerror (input_location, "template type parameters must use the keyword %<class%> or %<typename%>");
3324 aggr = class_type_nodecp_global_trees[CPTI_CLASS_TYPE];
3325 }
3326
3327 return build_tree_list (aggr, identifier);
3328}
3329
3330/* Finish a template template parameter, specified as AGGR IDENTIFIER.
3331 Returns the parameter. */
3332
3333tree
3334finish_template_template_parm (tree aggr, tree identifier)
3335{
3336 tree decl = build_decl (input_location,
3337 TYPE_DECL, identifier, NULL_TREE(tree) __null);
3338
3339 tree tmpl = build_lang_decl (TEMPLATE_DECL, identifier, NULL_TREE(tree) __null);
3340 DECL_TEMPLATE_PARMS (tmpl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((tmpl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3340, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments
= current_template_parmsscope_chain->template_parms;
3341 DECL_TEMPLATE_RESULT (tmpl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((tmpl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3341, __FUNCTION__, (TEMPLATE_DECL))))))))->result
= decl;
3342 DECL_ARTIFICIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3342, __FUNCTION__))->decl_common.artificial_flag)
= 1;
3343
3344 /* Associate the constraints with the underlying declaration,
3345 not the template. */
3346 tree reqs = TEMPLATE_PARMS_CONSTRAINTS (current_template_parms)((contains_struct_check (((tree_check ((scope_chain->template_parms
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3346, __FUNCTION__, (TREE_LIST)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3346, __FUNCTION__))->typed.type)
;
3347 tree constr = build_constraints (reqs, NULL_TREE(tree) __null);
3348 set_constraints (decl, constr);
3349
3350 end_template_decl ();
3351
3352 gcc_assert (DECL_TEMPLATE_PARMS (tmpl))((void)(!(((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((tmpl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3352, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments) ?
fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3352, __FUNCTION__), 0 : 0))
;
3353
3354 check_default_tmpl_args (decl, DECL_TEMPLATE_PARMS (tmpl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((tmpl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3354, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments
,
3355 /*is_primary=*/true, /*is_partial=*/false,
3356 /*is_friend=*/0);
3357
3358 return finish_template_type_parm (aggr, tmpl);
3359}
3360
3361/* ARGUMENT is the default-argument value for a template template
3362 parameter. If ARGUMENT is invalid, issue error messages and return
3363 the ERROR_MARK_NODE. Otherwise, ARGUMENT itself is returned. */
3364
3365tree
3366check_template_template_default_arg (tree argument)
3367{
3368 if (TREE_CODE (argument)((enum tree_code) (argument)->base.code) != TEMPLATE_DECL
3369 && TREE_CODE (argument)((enum tree_code) (argument)->base.code) != TEMPLATE_TEMPLATE_PARM
3370 && TREE_CODE (argument)((enum tree_code) (argument)->base.code) != UNBOUND_CLASS_TEMPLATE)
3371 {
3372 if (TREE_CODE (argument)((enum tree_code) (argument)->base.code) == TYPE_DECL)
3373 error ("invalid use of type %qT as a default value for a template "
3374 "template-parameter", TREE_TYPE (argument)((contains_struct_check ((argument), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3374, __FUNCTION__))->typed.type)
);
3375 else
3376 error ("invalid default argument for a template template parameter");
3377 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3378 }
3379
3380 return argument;
3381}
3382
3383/* Begin a class definition, as indicated by T. */
3384
3385tree
3386begin_class_definition (tree t)
3387{
3388 if (error_operand_p (t) || error_operand_p (TYPE_MAIN_DECL (t)((((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/semantics.c"
, 3388, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3388, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3388, __FUNCTION__))->common.chain)))
))
3389 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3390
3391 if (processing_template_parmlist && !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/semantics.c"
, 3391, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3391, __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/semantics.c"
, 3391, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3391, __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/semantics.c"
, 3391, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3391, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3391, __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/semantics.c"
, 3391, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3391, __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/semantics.c"
, 3391, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3391, __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/semantics.c"
, 3391, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3391, __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/semantics.c"
, 3391, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3391, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3391, __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/semantics.c"
, 3391, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3391, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3391, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))
)
3392 {
3393 error ("definition of %q#T inside template parameter list", t);
3394 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3395 }
3396
3397 /* According to the C++ ABI, decimal classes defined in ISO/IEC TR 24733
3398 are passed the same as decimal scalar types. */
3399 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == RECORD_TYPE
3400 && !processing_template_declscope_chain->x_processing_template_decl)
3401 {
3402 tree ns = TYPE_CONTEXT (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3402, __FUNCTION__))->type_common.context)
;
3403 if (ns && TREE_CODE (ns)((enum tree_code) (ns)->base.code) == NAMESPACE_DECL
3404 && DECL_CONTEXT (ns)((contains_struct_check ((ns), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3404, __FUNCTION__))->decl_minimal.context)
== std_nodecp_global_trees[CPTI_STD]
3405 && DECL_NAME (ns)((contains_struct_check ((ns), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3405, __FUNCTION__))->decl_minimal.name)
3406 && id_equal (DECL_NAME (ns)((contains_struct_check ((ns), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3406, __FUNCTION__))->decl_minimal.name)
, "decimal"))
3407 {
3408 const char *n = TYPE_NAME_STRING (t)(((const char *) (tree_check (((((tree_class_check ((t), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3408, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((t), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3408, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3408, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3408, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3408, __FUNCTION__))->type_common.name))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3408, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.str
))
;
3409 if ((strcmp (n, "decimal32") == 0)
3410 || (strcmp (n, "decimal64") == 0)
3411 || (strcmp (n, "decimal128") == 0))
3412 TYPE_TRANSPARENT_AGGR (t)((tree_check3 ((t), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3412, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_common.transparent_aggr_flag)
= 1;
3413 }
3414 }
3415
3416 /* A non-implicit typename comes from code like:
3417
3418 template <typename T> struct A {
3419 template <typename U> struct A<T>::B ...
3420
3421 This is erroneous. */
3422 else if (TREE_CODE (t)((enum tree_code) (t)->base.code) == TYPENAME_TYPE)
3423 {
3424 error ("invalid definition of qualified type %qT", t);
3425 t = error_mark_nodeglobal_trees[TI_ERROR_MARK];
3426 }
3427
3428 if (t == error_mark_nodeglobal_trees[TI_ERROR_MARK] || ! MAYBE_CLASS_TYPE_P (t)((((enum tree_code) (t)->base.code) == TEMPLATE_TYPE_PARM ||
((enum tree_code) (t)->base.code) == TYPENAME_TYPE || ((enum
tree_code) (t)->base.code) == TYPEOF_TYPE || ((enum tree_code
) (t)->base.code) == BOUND_TEMPLATE_TEMPLATE_PARM || ((enum
tree_code) (t)->base.code) == DECLTYPE_TYPE) || (((((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/semantics.c"
, 3428, __FUNCTION__))->type_common.lang_flag_5)))
)
3429 {
3430 t = make_class_type (RECORD_TYPE);
3431 pushtag (make_anon_name (), t);
3432 }
3433
3434 if (TYPE_BEING_DEFINED (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3434, __FUNCTION__))->type_with_lang_specific.lang_specific
))->being_defined)
)
3435 {
3436 t = make_class_type (TREE_CODE (t)((enum tree_code) (t)->base.code));
3437 pushtag (TYPE_IDENTIFIER (t)(((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3437, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((t), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3437, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3437, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3437, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3437, __FUNCTION__))->type_common.name))
, t);
3438 }
3439
3440 if (modules_p ())
3441 {
3442 if (!module_may_redeclare (TYPE_NAME (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3442, __FUNCTION__))->type_common.name)
))
3443 {
3444 error ("cannot declare %qD in a different module", TYPE_NAME (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3444, __FUNCTION__))->type_common.name)
);
3445 inform (DECL_SOURCE_LOCATION (TYPE_NAME (t))((contains_struct_check ((((tree_class_check ((t), (tcc_type)
, "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3445, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3445, __FUNCTION__))->decl_minimal.locus)
, "declared here");
3446 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3447 }
3448 set_instantiating_module (TYPE_NAME (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3448, __FUNCTION__))->type_common.name)
);
3449 set_defining_module (TYPE_NAME (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3449, __FUNCTION__))->type_common.name)
);
3450 }
3451
3452 maybe_process_partial_specialization (t);
3453 pushclass (t);
3454 TYPE_BEING_DEFINED (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3454, __FUNCTION__))->type_with_lang_specific.lang_specific
))->being_defined)
= 1;
3455 class_binding_levelscope_chain->class_bindings->defining_class_p = 1;
3456
3457 if (flag_pack_structglobal_options.x_flag_pack_struct)
3458 {
3459 tree v;
3460 TYPE_PACKED (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3460, __FUNCTION__))->base.u.bits.packed_flag)
= 1;
3461 /* Even though the type is being defined for the first time
3462 here, there might have been a forward declaration, so there
3463 might be cv-qualified variants of T. */
3464 for (v = TYPE_NEXT_VARIANT (t)((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3464, __FUNCTION__))->type_common.next_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/semantics.c"
, 3464, __FUNCTION__))->type_common.next_variant)
)
3465 TYPE_PACKED (v)((tree_class_check ((v), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3465, __FUNCTION__))->base.u.bits.packed_flag)
= 1;
3466 }
3467 /* Reset the interface data, at the earliest possible
3468 moment, as it might have been set via a class foo;
3469 before. */
3470 if (! TYPE_UNNAMED_P (t)((((((tree_class_check ((((tree_class_check ((t), (tcc_type),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __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/semantics.c"
, 3470, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __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/semantics.c"
, 3470, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __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/semantics.c"
, 3470, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __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/semantics.c"
, 3470, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __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/semantics.c"
, 3470, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __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/semantics.c"
, 3470, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __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/semantics.c"
, 3470, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __FUNCTION__, (IDENTIFIER_NODE)))->base.private_flag
)) && !((tree_check ((((((tree_class_check ((((tree_class_check
((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __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/semantics.c"
, 3470, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __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/semantics.c"
, 3470, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __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/semantics.c"
, 3470, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3470, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))
)
3471 {
3472 struct c_fileinfo *finfo = \
3473 get_fileinfo (LOCATION_FILE (input_location)((expand_location (input_location)).file));
3474 CLASSTYPE_INTERFACE_ONLY (t)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3474, __FUNCTION__))->type_with_lang_specific.lang_specific
))->interface_only)
= finfo->interface_only;
3475 SET_CLASSTYPE_INTERFACE_UNKNOWN_X((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3476, __FUNCTION__))->type_with_lang_specific.lang_specific
))->interface_unknown = !!(finfo->interface_unknown))
3476 (t, finfo->interface_unknown)((((tree_class_check ((t), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3476, __FUNCTION__))->type_with_lang_specific.lang_specific
))->interface_unknown = !!(finfo->interface_unknown))
;
3477 }
3478 reset_specialization ();
3479
3480 /* Make a declaration for this class in its own scope. */
3481 build_self_reference ();
3482
3483 return t;
3484}
3485
3486/* Finish the member declaration given by DECL. */
3487
3488void
3489finish_member_declaration (tree decl)
3490{
3491 if (decl == error_mark_nodeglobal_trees[TI_ERROR_MARK] || decl == NULL_TREE(tree) __null)
3492 return;
3493
3494 if (decl == void_type_nodeglobal_trees[TI_VOID_TYPE])
3495 /* The COMPONENT was a friend, not a member, and so there's
3496 nothing for us to do. */
3497 return;
3498
3499 /* We should see only one DECL at a time. */
3500 gcc_assert (DECL_CHAIN (decl) == NULL_TREE)((void)(!((((contains_struct_check (((contains_struct_check (
(decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3500, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3500, __FUNCTION__))->common.chain)) == (tree) __null) ?
fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3500, __FUNCTION__), 0 : 0))
;
3501
3502 /* Don't add decls after definition. */
3503 gcc_assert (TYPE_BEING_DEFINED (current_class_type)((void)(!(((((tree_class_check ((scope_chain->class_type),
(tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3503, __FUNCTION__))->type_with_lang_specific.lang_specific
))->being_defined) || (((enum tree_code) (((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type))->base.code) == RECORD_TYPE
&& ((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__), 0 : 0))
3504 /* We can add lambda types when late parsing default((void)(!(((((tree_class_check ((scope_chain->class_type),
(tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3503, __FUNCTION__))->type_with_lang_specific.lang_specific
))->being_defined) || (((enum tree_code) (((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type))->base.code) == RECORD_TYPE
&& ((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__), 0 : 0))
3505 arguments. */((void)(!(((((tree_class_check ((scope_chain->class_type),
(tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3503, __FUNCTION__))->type_with_lang_specific.lang_specific
))->being_defined) || (((enum tree_code) (((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type))->base.code) == RECORD_TYPE
&& ((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__), 0 : 0))
3506 || LAMBDA_TYPE_P (TREE_TYPE (decl)))((void)(!(((((tree_class_check ((scope_chain->class_type),
(tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3503, __FUNCTION__))->type_with_lang_specific.lang_specific
))->being_defined) || (((enum tree_code) (((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type))->base.code) == RECORD_TYPE
&& ((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
((((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3506, __FUNCTION__), 0 : 0))
;
3507
3508 /* Set up access control for DECL. */
3509 TREE_PRIVATE (decl)((decl)->base.private_flag)
3510 = (current_access_specifierscope_chain->access_specifier == access_private_nodeglobal_trees[TI_PRIVATE]);
3511 TREE_PROTECTED (decl)((decl)->base.protected_flag)
3512 = (current_access_specifierscope_chain->access_specifier == access_protected_nodeglobal_trees[TI_PROTECTED]);
3513 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_DECL)
3514 {
3515 TREE_PRIVATE (DECL_TEMPLATE_RESULT (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/semantics.c"
, 3515, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.private_flag)
= TREE_PRIVATE (decl)((decl)->base.private_flag);
3516 TREE_PROTECTED (DECL_TEMPLATE_RESULT (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/semantics.c"
, 3516, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.protected_flag)
= TREE_PROTECTED (decl)((decl)->base.protected_flag);
3517 }
3518
3519 /* Mark the DECL as a member of the current class, unless it's
3520 a member of an enumeration. */
3521 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) != CONST_DECL)
3522 DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3522, __FUNCTION__))->decl_minimal.context)
= current_class_typescope_chain->class_type;
3523
3524 /* Remember the single FIELD_DECL an anonymous aggregate type is used for. */
3525 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == FIELD_DECL
3526 && ANON_AGGR_TYPE_P (TREE_TYPE (decl))((((((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3526, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE
|| (((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3526, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE
) && ((tree_class_check ((((contains_struct_check ((decl
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3526, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3526, __FUNCTION__))->type_common.lang_flag_5)) &&
(((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3526, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3526, __FUNCTION__))->type_with_lang_specific.lang_specific
))->anon_aggr)
)
3527 {
3528 gcc_assert (!ANON_AGGR_TYPE_FIELD (TYPE_MAIN_VARIANT (TREE_TYPE (decl))))((void)(!(!((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3528, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3528, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3528, __FUNCTION__))->type_with_lang_specific.lang_specific
))->typeinfo_var)) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3528, __FUNCTION__), 0 : 0))
;
3529 ANON_AGGR_TYPE_FIELD (TYPE_MAIN_VARIANT (TREE_TYPE (decl)))((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3529, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3529, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3529, __FUNCTION__))->type_with_lang_specific.lang_specific
))->typeinfo_var)
= decl;
3530 }
3531
3532 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == USING_DECL)
3533 /* For now, ignore class-scope USING_DECLS, so that debugging
3534 backends do not see them. */
3535 DECL_IGNORED_P (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3535, __FUNCTION__))->decl_common.ignored_flag)
= 1;
3536
3537 /* Check for bare parameter packs in the non-static data member
3538 declaration. */
3539 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == FIELD_DECL)
3540 {
3541 if (check_for_bare_parameter_packs (TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3541, __FUNCTION__))->typed.type)
))
3542 TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3542, __FUNCTION__))->typed.type)
= error_mark_nodeglobal_trees[TI_ERROR_MARK];
3543 if (check_for_bare_parameter_packs (DECL_ATTRIBUTES (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3543, __FUNCTION__))->decl_common.attributes)
))
3544 DECL_ATTRIBUTES (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3544, __FUNCTION__))->decl_common.attributes)
= NULL_TREE(tree) __null;
3545 }
3546
3547 /* [dcl.link]
3548
3549 A C language linkage is ignored for the names of class members
3550 and the member function type of class member functions. */
3551 if (DECL_LANG_SPECIFIC (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3551, __FUNCTION__))->decl_common.lang_specific)
)
3552 SET_DECL_LANGUAGE (decl, lang_cplusplus)(((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3552, __FUNCTION__))->decl_common.lang_specific)->u.base
.language = (lang_cplusplus))
;
3553
3554 bool add = false;
3555
3556 /* Functions and non-functions are added differently. */
3557 if (DECL_DECLARES_FUNCTION_P (decl)(((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/semantics.c"
, 3557, __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/semantics.c"
, 3557, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL))
)
3558 add = add_method (current_class_typescope_chain->class_type, decl, false);
3559 /* Enter the DECL into the scope of the class, if the class
3560 isn't a closure (whose fields are supposed to be unnamed). */
3561 else if (CLASSTYPE_LAMBDA_EXPR (current_class_type)((((tree_class_check ((scope_chain->class_type), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3561, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lambda_expr)
3562 || pushdecl_class_level (decl))
3563 add = true;
3564
3565 if (add)
3566 {
3567 /* All TYPE_DECLs go at the end of TYPE_FIELDS. Ordinary fields
3568 go at the beginning. The reason is that
3569 legacy_nonfn_member_lookup searches the list in order, and we
3570 want a field name to override a type name so that the "struct
3571 stat hack" will work. In particular:
3572
3573 struct S { enum E { }; static const int E = 5; int ary[S::E]; } s;
3574
3575 is valid. */
3576
3577 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TYPE_DECL)
3578 TYPE_FIELDS (current_class_type)((tree_check3 ((scope_chain->class_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3578, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
3579 = chainon (TYPE_FIELDS (current_class_type)((tree_check3 ((scope_chain->class_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3579, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
, decl);
3580 else
3581 {
3582 DECL_CHAIN (decl)(((contains_struct_check (((contains_struct_check ((decl), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3582, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3582, __FUNCTION__))->common.chain))
= TYPE_FIELDS (current_class_type)((tree_check3 ((scope_chain->class_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3582, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
;
3583 TYPE_FIELDS (current_class_type)((tree_check3 ((scope_chain->class_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3583, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
= decl;
3584 }
3585
3586 maybe_add_class_template_decl_list (current_class_typescope_chain->class_type, decl,
3587 /*friend_p=*/0);
3588 }
3589}
3590
3591/* Finish processing a complete template declaration. The PARMS are
3592 the template parameters. */
3593
3594void
3595finish_template_decl (tree parms)
3596{
3597 if (parms)
3598 end_template_decl ();
3599 else
3600 end_specialization ();
3601}
3602
3603// Returns the template type of the class scope being entered. If we're
3604// entering a constrained class scope. TYPE is the class template
3605// scope being entered and we may need to match the intended type with
3606// a constrained specialization. For example:
3607//
3608// template<Object T>
3609// struct S { void f(); }; #1
3610//
3611// template<Object T>
3612// void S<T>::f() { } #2
3613//
3614// We check, in #2, that S<T> refers precisely to the type declared by
3615// #1 (i.e., that the constraints match). Note that the following should
3616// be an error since there is no specialization of S<T> that is
3617// unconstrained, but this is not diagnosed here.
3618//
3619// template<typename T>
3620// void S<T>::f() { }
3621//
3622// We cannot diagnose this problem here since this function also matches
3623// qualified template names that are not part of a definition. For example:
3624//
3625// template<Integral T, Floating_point U>
3626// typename pair<T, U>::first_type void f(T, U);
3627//
3628// Here, it is unlikely that there is a partial specialization of
3629// pair constrained for for Integral and Floating_point arguments.
3630//
3631// The general rule is: if a constrained specialization with matching
3632// constraints is found return that type. Also note that if TYPE is not a
3633// class-type (e.g. a typename type), then no fixup is needed.
3634
3635static tree
3636fixup_template_type (tree type)
3637{
3638 // Find the template parameter list at the a depth appropriate to
3639 // the scope we're trying to enter.
3640 tree parms = current_template_parmsscope_chain->template_parms;
3641 int depth = template_class_depth (type);
3642 for (int n = processing_template_declscope_chain->x_processing_template_decl; n > depth && parms; --n)
3643 parms = TREE_CHAIN (parms)((contains_struct_check ((parms), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3643, __FUNCTION__))->common.chain)
;
3644 if (!parms)
3645 return type;
3646 tree cur_reqs = TEMPLATE_PARMS_CONSTRAINTS (parms)((contains_struct_check (((tree_check ((parms), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3646, __FUNCTION__, (TREE_LIST)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3646, __FUNCTION__))->typed.type)
;
3647 tree cur_constr = build_constraints (cur_reqs, NULL_TREE(tree) __null);
3648
3649 // Search for a specialization whose type and constraints match.
3650 tree tmpl = CLASSTYPE_TI_TEMPLATE (type)((struct tree_template_info*)(tree_check (((((tree_class_check
(((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3650, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3650, __FUNCTION__))->type_non_common.lang_1))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3650, __FUNCTION__, (TEMPLATE_INFO))))->tmpl
;
3651 tree specs = DECL_TEMPLATE_SPECIALIZATIONS (tmpl)((contains_struct_check (((tree_check ((tmpl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3651, __FUNCTION__, (TEMPLATE_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3651, __FUNCTION__))->decl_common.size)
;
3652 while (specs)
3653 {
3654 tree spec_constr = get_constraints (TREE_VALUE (specs)((tree_check ((specs), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3654, __FUNCTION__, (TREE_LIST)))->list.value)
);
3655
3656 // If the type and constraints match a specialization, then we
3657 // are entering that type.
3658 if (same_type_p (type, TREE_TYPE (specs))comptypes ((type), (((contains_struct_check ((specs), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3658, __FUNCTION__))->typed.type)), 0)
3659 && equivalent_constraints (cur_constr, spec_constr))
3660 return TREE_TYPE (specs)((contains_struct_check ((specs), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3660, __FUNCTION__))->typed.type)
;
3661 specs = TREE_CHAIN (specs)((contains_struct_check ((specs), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3661, __FUNCTION__))->common.chain)
;
3662 }
3663
3664 // If no specialization matches, then must return the type
3665 // previously found.
3666 return type;
3667}
3668
3669/* Finish processing a template-id (which names a type) of the form
3670 NAME < ARGS >. Return the TYPE_DECL for the type named by the
3671 template-id. If ENTERING_SCOPE is nonzero we are about to enter
3672 the scope of template-id indicated. */
3673
3674tree
3675finish_template_type (tree name, tree args, int entering_scope)
3676{
3677 tree type;
3678
3679 type = lookup_template_class (name, args,
3680 NULL_TREE(tree) __null, NULL_TREE(tree) __null, entering_scope,
3681 tf_warning_or_error | tf_user);
3682
3683 /* If we might be entering the scope of a partial specialization,
3684 find the one with the right constraints. */
3685 if (flag_conceptsglobal_options.x_flag_concepts
3686 && entering_scope
3687 && 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/semantics.c"
, 3687, __FUNCTION__))->type_common.lang_flag_5))
3688 && CLASSTYPE_TEMPLATE_INFO (type)(((tree_class_check (((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3688, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3688, __FUNCTION__))->type_non_common.lang_1))
3689 && dependent_type_p (type)
3690 && PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (type))(((((contains_struct_check ((((tree_check ((((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((((struct
tree_template_info*)(tree_check (((((tree_class_check (((tree_check3
((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3690, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3690, __FUNCTION__))->type_non_common.lang_1))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3690, __FUNCTION__, (TEMPLATE_INFO))))->tmpl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3690, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3690, __FUNCTION__, (TREE_LIST)))->list.value)), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3690, __FUNCTION__))->typed.type))) == (((struct tree_template_info
*)(tree_check (((((tree_class_check (((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3690, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3690, __FUNCTION__))->type_non_common.lang_1))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3690, __FUNCTION__, (TEMPLATE_INFO))))->tmpl))
)
3691 type = fixup_template_type (type);
3692
3693 if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3694 return type;
3695 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/semantics.c"
, 3695, __FUNCTION__))->type_common.lang_flag_5))
&& !alias_type_or_template_p (type))
3696 return TYPE_STUB_DECL (type)(((contains_struct_check (((tree_class_check ((type), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3696, __FUNCTION__))), (TS_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3696, __FUNCTION__))->common.chain))
;
3697 else
3698 return TYPE_NAME (type)((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3698, __FUNCTION__))->type_common.name)
;
3699}
3700
3701/* Finish processing a BASE_CLASS with the indicated ACCESS_SPECIFIER.
3702 Return a TREE_LIST containing the ACCESS_SPECIFIER and the
3703 BASE_CLASS, or NULL_TREE if an error occurred. The
3704 ACCESS_SPECIFIER is one of
3705 access_{default,public,protected_private}_node. For a virtual base
3706 we set TREE_TYPE. */
3707
3708tree
3709finish_base_specifier (tree base, tree access, bool virtual_p)
3710{
3711 tree result;
3712
3713 if (base == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3714 {
3715 error ("invalid base-class specification");
3716 result = NULL_TREE(tree) __null;
3717 }
3718 else if (! MAYBE_CLASS_TYPE_P (base)((((enum tree_code) (base)->base.code) == TEMPLATE_TYPE_PARM
|| ((enum tree_code) (base)->base.code) == TYPENAME_TYPE ||
((enum tree_code) (base)->base.code) == TYPEOF_TYPE || ((
enum tree_code) (base)->base.code) == BOUND_TEMPLATE_TEMPLATE_PARM
|| ((enum tree_code) (base)->base.code) == DECLTYPE_TYPE)
|| (((((enum tree_code) (base)->base.code)) == RECORD_TYPE
|| (((enum tree_code) (base)->base.code)) == UNION_TYPE) &&
((tree_class_check ((base), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3718, __FUNCTION__))->type_common.lang_flag_5)))
)
3719 {
3720 error ("%qT is not a class type", base);
3721 result = NULL_TREE(tree) __null;
3722 }
3723 else
3724 {
3725 if (cp_type_quals (base) != 0)
3726 {
3727 /* DR 484: Can a base-specifier name a cv-qualified
3728 class type? */
3729 base = TYPE_MAIN_VARIANT (base)((tree_class_check ((base), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3729, __FUNCTION__))->type_common.main_variant)
;
3730 }
3731 result = build_tree_list (access, base);
3732 if (virtual_p)
3733 TREE_TYPE (result)((contains_struct_check ((result), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3733, __FUNCTION__))->typed.type)
= integer_type_nodeinteger_types[itk_int];
3734 }
3735
3736 return result;
3737}
3738
3739/* If FNS is a member function, a set of member functions, or a
3740 template-id referring to one or more member functions, return a
3741 BASELINK for FNS, incorporating the current access context.
3742 Otherwise, return FNS unchanged. */
3743
3744tree
3745baselink_for_fns (tree fns)
3746{
3747 tree scope;
3748 tree cl;
3749
3750 if (BASELINK_P (fns)(((enum tree_code) (fns)->base.code) == BASELINK)
3751 || error_operand_p (fns))
3752 return fns;
3753
3754 scope = ovl_scope (fns);
3755 if (!CLASS_TYPE_P (scope)(((((enum tree_code) (scope)->base.code)) == RECORD_TYPE ||
(((enum tree_code) (scope)->base.code)) == UNION_TYPE) &&
((tree_class_check ((scope), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3755, __FUNCTION__))->type_common.lang_flag_5))
)
3756 return fns;
3757
3758 cl = currently_open_derived_class (scope);
3759 if (!cl)
3760 cl = scope;
3761 tree access_path = TYPE_BINFO (cl)((tree_check3 ((cl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3761, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
3762 tree conv_path = (cl == scope ? access_path
3763 : lookup_base (cl, scope, ba_any, NULL__null, tf_none));
3764 return build_baselink (conv_path, access_path, fns, /*optype=*/NULL_TREE(tree) __null);
3765}
3766
3767/* Returns true iff DECL is a variable from a function outside
3768 the current one. */
3769
3770static bool
3771outer_var_p (tree decl)
3772{
3773 return ((VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL) || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == PARM_DECL)
3774 && DECL_FUNCTION_SCOPE_P (decl)(((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3774, __FUNCTION__))->decl_minimal.context) && (
(enum tree_code) (((contains_struct_check ((decl), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3774, __FUNCTION__))->decl_minimal.context))->base.code
) == FUNCTION_DECL)
3775 /* Don't get confused by temporaries. */
3776 && DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3776, __FUNCTION__))->decl_minimal.name)
3777 && (DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3777, __FUNCTION__))->decl_minimal.context)
!= current_function_decl
3778 || parsing_nsdmi ()));
3779}
3780
3781/* As above, but also checks that DECL is automatic. */
3782
3783bool
3784outer_automatic_var_p (tree decl)
3785{
3786 return (outer_var_p (decl)
3787 && !TREE_STATIC (decl)((decl)->base.static_flag));
3788}
3789
3790/* DECL satisfies outer_automatic_var_p. Possibly complain about it or
3791 rewrite it for lambda capture.
3792
3793 If ODR_USE is true, we're being called from mark_use, and we complain about
3794 use of constant variables. If ODR_USE is false, we're being called for the
3795 id-expression, and we do lambda capture. */
3796
3797tree
3798process_outer_var_ref (tree decl, tsubst_flags_t complain, bool odr_use)
3799{
3800 if (cp_unevaluated_operand)
3801 {
3802 tree type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3802, __FUNCTION__))->typed.type)
;
3803 if (!dependent_type_p (type)
3804 && variably_modified_type_p (type, NULL_TREE(tree) __null))
3805 /* VLAs are used even in unevaluated context. */;
3806 else
3807 /* It's not a use (3.2) if we're in an unevaluated context. */
3808 return decl;
3809 }
3810 if (decl == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3811 return decl;
3812
3813 tree context = DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3813, __FUNCTION__))->decl_minimal.context)
;
3814 tree containing_function = current_function_decl;
3815 tree lambda_stack = NULL_TREE(tree) __null;
3816 tree lambda_expr = NULL_TREE(tree) __null;
3817 tree initializer = convert_from_reference (decl);
3818
3819 /* Mark it as used now even if the use is ill-formed. */
3820 if (!mark_used (decl, complain))
3821 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3822
3823 if (parsing_nsdmi ())
3824 containing_function = NULL_TREE(tree) __null;
3825
3826 if (containing_function && LAMBDA_FUNCTION_P (containing_function)((((enum tree_code) (containing_function)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (containing_function)->base.code) ==
TEMPLATE_DECL && ((struct tree_template_decl *)(const_cast
<union tree_node *> ((((tree_check ((containing_function
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((containing_function
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && (((tree_not_check2 (
((tree_check ((((contains_struct_check ((containing_function)
, (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) && ((__extension__ ({ struct lang_decl
*lt = ((contains_struct_check (((((enum tree_code) (containing_function
)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((containing_function
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__, (TEMPLATE_DECL))))))))->result : containing_function
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (containing_function)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (containing_function)->base.code) ==
TEMPLATE_DECL && ((struct tree_template_decl *)(const_cast
<union tree_node *> ((((tree_check ((containing_function
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((containing_function
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __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/semantics.c"
, 3826, __FUNCTION__); &lt->u.fn; })->ovl_op_code) ==
OVL_OP_CALL_EXPR) && (((enum tree_code) ((!(! (((contains_struct_check
((containing_function), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL]))->base.code) == RECORD_TYPE && ((((
tree_class_check ((((tree_class_check (((!(! (((contains_struct_check
((containing_function), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
(((!(! (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check (((!(! (((contains_struct_check
((containing_function), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
(((!(! (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3826, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
)))
)
3827 {
3828 /* Check whether we've already built a proxy. */
3829 tree var = decl;
3830 while (is_normal_capture_proxy (var))
3831 var = DECL_CAPTURED_VARIABLE (var)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
((var), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3831, __FUNCTION__))->decl_common.lang_specific); if (!(
(((enum tree_code) (var)->base.code) == VAR_DECL || ((enum
tree_code) (var)->base.code) == FUNCTION_DECL) || ((enum tree_code
) (var)->base.code) == FIELD_DECL || ((enum tree_code) (var
)->base.code) == CONST_DECL || ((enum tree_code) (var)->
base.code) == TYPE_DECL || ((enum tree_code) (var)->base.code
) == TEMPLATE_DECL || ((enum tree_code) (var)->base.code) ==
USING_DECL || ((enum tree_code) (var)->base.code) == CONCEPT_DECL
)) lang_check_failed ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3831, __FUNCTION__); &lt->u.min; })->access)
;
3832 tree d = retrieve_local_specialization (var);
3833
3834 if (d && d != decl && is_capture_proxy (d))
3835 {
3836 if (DECL_CONTEXT (d)((contains_struct_check ((d), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3836, __FUNCTION__))->decl_minimal.context)
== containing_function)
3837 /* We already have an inner proxy. */
3838 return d;
3839 else
3840 /* We need to capture an outer proxy. */
3841 return process_outer_var_ref (d, complain, odr_use);
3842 }
3843 }
3844
3845 /* If we are in a lambda function, we can move out until we hit
3846 1. the context,
3847 2. a non-lambda function, or
3848 3. a non-default capturing lambda function. */
3849 while (context != containing_function
3850 /* containing_function can be null with invalid generic lambdas. */
3851 && containing_function
3852 && LAMBDA_FUNCTION_P (containing_function)((((enum tree_code) (containing_function)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (containing_function)->base.code) ==
TEMPLATE_DECL && ((struct tree_template_decl *)(const_cast
<union tree_node *> ((((tree_check ((containing_function
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((containing_function
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && (((tree_not_check2 (
((tree_check ((((contains_struct_check ((containing_function)
, (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.name)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) && ((__extension__ ({ struct lang_decl
*lt = ((contains_struct_check (((((enum tree_code) (containing_function
)->base.code) == TEMPLATE_DECL ? ((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((containing_function
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__, (TEMPLATE_DECL))))))))->result : containing_function
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (containing_function)->base.code) == FUNCTION_DECL
|| (((enum tree_code) (containing_function)->base.code) ==
TEMPLATE_DECL && ((struct tree_template_decl *)(const_cast
<union tree_node *> ((((tree_check ((containing_function
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((containing_function
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __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/semantics.c"
, 3852, __FUNCTION__); &lt->u.fn; })->ovl_op_code) ==
OVL_OP_CALL_EXPR) && (((enum tree_code) ((!(! (((contains_struct_check
((containing_function), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL]))->base.code) == RECORD_TYPE && ((((
tree_class_check ((((tree_class_check (((!(! (((contains_struct_check
((containing_function), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
(((!(! (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check (((!(! (((contains_struct_check
((containing_function), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.name) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((((tree_class_check
(((!(! (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__))->type_common.name)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3852, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
)))
)
3853 {
3854 tree closure = DECL_CONTEXT (containing_function)((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3854, __FUNCTION__))->decl_minimal.context)
;
3855 lambda_expr = CLASSTYPE_LAMBDA_EXPR (closure)((((tree_class_check ((closure), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3855, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lambda_expr)
;
3856
3857 if (TYPE_CLASS_SCOPE_P (closure)(((tree_class_check ((closure), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3857, __FUNCTION__))->type_common.context) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((closure), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3857, __FUNCTION__))->type_common.context))->base.code
))] == tcc_type))
)
3858 /* A lambda in an NSDMI (c++/64496). */
3859 break;
3860
3861 if (LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (lambda_expr)(((struct tree_lambda_expr *)(tree_check ((lambda_expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3861, __FUNCTION__, (LAMBDA_EXPR))))->default_capture_mode
)
== CPLD_NONE)
3862 break;
3863
3864 lambda_stack = tree_cons (NULL_TREE(tree) __null, lambda_expr, lambda_stack);
3865
3866 containing_function = decl_function_context (containing_function);
3867 }
3868
3869 /* In a lambda within a template, wait until instantiation time to implicitly
3870 capture a parameter pack. We want to wait because we don't know if we're
3871 capturing the whole pack or a single element, and it's OK to wait because
3872 find_parameter_packs_r walks into the lambda body. */
3873 if (context == containing_function
3874 && DECL_PACK_P (decl)((tree_code_type[(int) (((enum tree_code) (decl)->base.code
))] == tcc_declaration) && (((enum tree_code) (((contains_struct_check
((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3874, __FUNCTION__))->typed.type))->base.code) == TYPE_PACK_EXPANSION
|| ((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3874, __FUNCTION__))->typed.type))->base.code) == EXPR_PACK_EXPANSION
))
)
3875 return decl;
3876
3877 if (lambda_expr && VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL) && DECL_ANON_UNION_VAR_P (decl)(((contains_struct_check (((tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3877, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3877, __FUNCTION__))->decl_common.lang_flag_4))
)
3878 {
3879 if (complain & tf_error)
3880 error ("cannot capture member %qD of anonymous union", decl);
3881 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3882 }
3883 /* Do lambda capture when processing the id-expression, not when
3884 odr-using a variable. */
3885 if (!odr_use && context == containing_function)
3886 decl = add_default_capture (lambda_stack,
3887 /*id=*/DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3887, __FUNCTION__))->decl_minimal.name)
, initializer);
3888 /* Only an odr-use of an outer automatic variable causes an
3889 error, and a constant variable can decay to a prvalue
3890 constant without odr-use. So don't complain yet. */
3891 else if (!odr_use && decl_constant_var_p (decl))
3892 return decl;
3893 else if (lambda_expr)
3894 {
3895 if (complain & tf_error)
3896 {
3897 error ("%qD is not captured", decl);
3898 tree closure = LAMBDA_EXPR_CLOSURE (lambda_expr)(((contains_struct_check (((tree_check ((lambda_expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3898, __FUNCTION__, (LAMBDA_EXPR)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3898, __FUNCTION__))->typed.type))
;
3899 if (LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (lambda_expr)(((struct tree_lambda_expr *)(tree_check ((lambda_expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3899, __FUNCTION__, (LAMBDA_EXPR))))->default_capture_mode
)
== CPLD_NONE)
3900 inform (location_of (closure),
3901 "the lambda has no capture-default");
3902 else if (TYPE_CLASS_SCOPE_P (closure)(((tree_class_check ((closure), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3902, __FUNCTION__))->type_common.context) && (tree_code_type
[(int) (((enum tree_code) (((tree_class_check ((closure), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3902, __FUNCTION__))->type_common.context))->base.code
))] == tcc_type))
)
3903 inform (UNKNOWN_LOCATION((location_t) 0), "lambda in local class %q+T cannot "
3904 "capture variables from the enclosing context",
3905 TYPE_CONTEXT (closure)((tree_class_check ((closure), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3905, __FUNCTION__))->type_common.context)
);
3906 inform (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3906, __FUNCTION__))->decl_minimal.locus)
, "%q#D declared here", decl);
3907 }
3908 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3909 }
3910 else
3911 {
3912 if (complain & tf_error)
3913 {
3914 error (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL)
3915 ? G_("use of local variable with automatic storage from ""use of local variable with automatic storage from " "containing function"
3916 "containing function")"use of local variable with automatic storage from " "containing function"
3917 : G_("use of parameter from containing function")"use of parameter from containing function");
3918 inform (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3918, __FUNCTION__))->decl_minimal.locus)
, "%q#D declared here", decl);
3919 }
3920 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3921 }
3922 return decl;
3923}
3924
3925/* ID_EXPRESSION is a representation of parsed, but unprocessed,
3926 id-expression. (See cp_parser_id_expression for details.) SCOPE,
3927 if non-NULL, is the type or namespace used to explicitly qualify
3928 ID_EXPRESSION. DECL is the entity to which that name has been
3929 resolved.
3930
3931 *CONSTANT_EXPRESSION_P is true if we are presently parsing a
3932 constant-expression. In that case, *NON_CONSTANT_EXPRESSION_P will
3933 be set to true if this expression isn't permitted in a
3934 constant-expression, but it is otherwise not set by this function.
3935 *ALLOW_NON_CONSTANT_EXPRESSION_P is true if we are parsing a
3936 constant-expression, but a non-constant expression is also
3937 permissible.
3938
3939 DONE is true if this expression is a complete postfix-expression;
3940 it is false if this expression is followed by '->', '[', '(', etc.
3941 ADDRESS_P is true iff this expression is the operand of '&'.
3942 TEMPLATE_P is true iff the qualified-id was of the form
3943 "A::template B". TEMPLATE_ARG_P is true iff this qualified name
3944 appears as a template argument.
3945
3946 If an error occurs, and it is the kind of error that might cause
3947 the parser to abort a tentative parse, *ERROR_MSG is filled in. It
3948 is the caller's responsibility to issue the message. *ERROR_MSG
3949 will be a string with static storage duration, so the caller need
3950 not "free" it.
3951
3952 Return an expression for the entity, after issuing appropriate
3953 diagnostics. This function is also responsible for transforming a
3954 reference to a non-static member into a COMPONENT_REF that makes
3955 the use of "this" explicit.
3956
3957 Upon return, *IDK will be filled in appropriately. */
3958static cp_expr
3959finish_id_expression_1 (tree id_expression,
3960 tree decl,
3961 tree scope,
3962 cp_id_kind *idk,
3963 bool integral_constant_expression_p,
3964 bool allow_non_integral_constant_expression_p,
3965 bool *non_integral_constant_expression_p,
3966 bool template_p,
3967 bool done,
3968 bool address_p,
3969 bool template_arg_p,
3970 const char **error_msg,
3971 location_t location)
3972{
3973 decl = strip_using_decl (decl);
3974
3975 /* Initialize the output parameters. */
3976 *idk = CP_ID_KIND_NONE;
3977 *error_msg = NULL__null;
3978
3979 if (id_expression == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3980 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3981 /* If we have a template-id, then no further lookup is
3982 required. If the template-id was for a template-class, we
3983 will sometimes have a TYPE_DECL at this point. */
3984 else if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_ID_EXPR
3985 || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TYPE_DECL)
3986 ;
3987 /* Look up the name. */
3988 else
3989 {
3990 if (decl == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3991 {
3992 /* Name lookup failed. */
3993 if (scope
3994 && (!TYPE_P (scope)(tree_code_type[(int) (((enum tree_code) (scope)->base.code
))] == tcc_type)
3995 || (!dependent_type_p (scope)
3996 && !(identifier_p (id_expression)
3997 && IDENTIFIER_CONV_OP_P (id_expression)((((tree_not_check2 (((tree_check ((id_expression), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3997, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3997, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) & ((tree_not_check2 (((tree_check ((id_expression
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3997, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3997, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1) & (!((tree_not_check2 (((tree_check ((id_expression
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3997, __FUNCTION__, (IDENTIFIER_NODE)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3997, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))
3998 && dependent_type_p (TREE_TYPE (id_expression)((contains_struct_check ((id_expression), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 3998, __FUNCTION__))->typed.type)
)))))
3999 {
4000 /* If the qualifying type is non-dependent (and the name
4001 does not name a conversion operator to a dependent
4002 type), issue an error. */
4003 qualified_name_lookup_error (scope, id_expression, decl, location);
4004 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4005 }
4006 else if (!scope)
4007 {
4008 /* It may be resolved via Koenig lookup. */
4009 *idk = CP_ID_KIND_UNQUALIFIED;
4010 return id_expression;
4011 }
4012 else
4013 decl = id_expression;
4014 }
4015
4016 /* Remember that the name was used in the definition of
4017 the current class so that we can check later to see if
4018 the meaning would have been different after the class
4019 was entirely defined. */
4020 if (!scope && decl != error_mark_nodeglobal_trees[TI_ERROR_MARK] && identifier_p (id_expression))
4021 maybe_note_name_used_in_class (id_expression, decl);
4022
4023 /* A use in unevaluated operand might not be instantiated appropriately
4024 if tsubst_copy builds a dummy parm, or if we never instantiate a
4025 generic lambda, so mark it now. */
4026 if (processing_template_declscope_chain->x_processing_template_decl && cp_unevaluated_operand)
4027 mark_type_use (decl);
4028
4029 /* Disallow uses of local variables from containing functions, except
4030 within lambda-expressions. */
4031 if (outer_automatic_var_p (decl))
4032 {
4033 decl = process_outer_var_ref (decl, tf_warning_or_error);
4034 if (decl == error_mark_nodeglobal_trees[TI_ERROR_MARK])
4035 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4036 }
4037
4038 /* Also disallow uses of function parameters outside the function
4039 body, except inside an unevaluated context (i.e. decltype). */
4040 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == PARM_DECL
4041 && DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4041, __FUNCTION__))->decl_minimal.context)
== NULL_TREE(tree) __null
4042 && !cp_unevaluated_operand)
4043 {
4044 *error_msg = G_("use of parameter outside function body")"use of parameter outside function body";
4045 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4046 }
4047 }
4048
4049 /* If we didn't find anything, or what we found was a type,
4050 then this wasn't really an id-expression. */
4051 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_DECL
4052 && !DECL_FUNCTION_TEMPLATE_P (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/semantics.c"
, 4052, __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/semantics.c"
, 4052, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)
)
4053 {
4054 *error_msg = G_("missing template arguments")"missing template arguments";
4055 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4056 }
4057 else if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TYPE_DECL
4058 || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == NAMESPACE_DECL)
4059 {
4060 *error_msg = G_("expected primary-expression")"expected primary-expression";
4061 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4062 }
4063
4064 /* If the name resolved to a template parameter, there is no
4065 need to look it up again later. */
4066 if ((TREE_CODE (decl)((enum tree_code) (decl)->base.code) == CONST_DECL && DECL_TEMPLATE_PARM_P (decl)(((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4066, __FUNCTION__))->decl_common.lang_flag_0) &&
(((enum tree_code) (decl)->base.code) == CONST_DECL || ((
enum tree_code) (decl)->base.code) == PARM_DECL || ((enum tree_code
) (decl)->base.code) == TYPE_DECL || ((enum tree_code) (decl
)->base.code) == TEMPLATE_DECL))
)
4067 || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_PARM_INDEX)
4068 {
4069 tree r;
4070
4071 *idk = CP_ID_KIND_NONE;
4072 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_PARM_INDEX)
4073 decl = TEMPLATE_PARM_DECL (decl)(((template_parm_index*)(tree_check ((decl), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4073, __FUNCTION__, (TEMPLATE_PARM_INDEX))))->decl)
;
4074 r = DECL_INITIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4074, __FUNCTION__))->decl_common.initial)
;
4075 if (CLASS_TYPE_P (TREE_TYPE (r))(((((enum tree_code) (((contains_struct_check ((r), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4075, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE
|| (((enum tree_code) (((contains_struct_check ((r), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4075, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE
) && ((tree_class_check ((((contains_struct_check ((r
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4075, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4075, __FUNCTION__))->type_common.lang_flag_5))
&& !CP_TYPE_CONST_P (TREE_TYPE (r))((cp_type_quals (((contains_struct_check ((r), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4075, __FUNCTION__))->typed.type)) & TYPE_QUAL_CONST
) != 0)
)
4076 {
4077 /* If the entity is a template parameter object for a template
4078 parameter of type T, the type of the expression is const T. */
4079 tree ctype = TREE_TYPE (r)((contains_struct_check ((r), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4079, __FUNCTION__))->typed.type)
;
4080 ctype = cp_build_qualified_type (ctype, (cp_type_quals (ctype)cp_build_qualified_type_real ((ctype), ((cp_type_quals (ctype
) | TYPE_QUAL_CONST)), tf_warning_or_error)
4081 | TYPE_QUAL_CONST))cp_build_qualified_type_real ((ctype), ((cp_type_quals (ctype
) | TYPE_QUAL_CONST)), tf_warning_or_error)
;
4082 r = build1 (VIEW_CONVERT_EXPR, ctype, r);
4083 }
4084 r = convert_from_reference (r);
4085 if (integral_constant_expression_p
4086 && !dependent_type_p (TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4086, __FUNCTION__))->typed.type)
)
4087 && !(INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (r))(((enum tree_code) (((contains_struct_check ((r), (TS_TYPED),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4087, __FUNCTION__))->typed.type))->base.code) == ENUMERAL_TYPE
|| (((enum tree_code) (((contains_struct_check ((r), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4087, __FUNCTION__))->typed.type))->base.code) == BOOLEAN_TYPE
|| ((enum tree_code) (((contains_struct_check ((r), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4087, __FUNCTION__))->typed.type))->base.code) == INTEGER_TYPE
))
))
4088 {
4089 if (!allow_non_integral_constant_expression_p)
4090 error ("template parameter %qD of type %qT is not allowed in "
4091 "an integral constant expression because it is not of "
4092 "integral or enumeration type", decl, TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4092, __FUNCTION__))->typed.type)
);
4093 *non_integral_constant_expression_p = true;
4094 }
4095 return r;
4096 }
4097 else
4098 {
4099 bool dependent_p = type_dependent_expression_p (decl);
4100
4101 /* If the declaration was explicitly qualified indicate
4102 that. The semantics of `A::f(3)' are different than
4103 `f(3)' if `f' is virtual. */
4104 *idk = (scope
4105 ? CP_ID_KIND_QUALIFIED
4106 : (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_ID_EXPR
4107 ? CP_ID_KIND_TEMPLATE_ID
4108 : (dependent_p
4109 ? CP_ID_KIND_UNQUALIFIED_DEPENDENT
4110 : CP_ID_KIND_UNQUALIFIED)));
4111
4112 if (dependent_p
4113 && DECL_P (decl)(tree_code_type[(int) (((enum tree_code) (decl)->base.code
))] == tcc_declaration)
4114 && any_dependent_type_attributes_p (DECL_ATTRIBUTES (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4114, __FUNCTION__))->decl_common.attributes)
))
4115 /* Dependent type attributes on the decl mean that the TREE_TYPE is
4116 wrong, so just return the identifier. */
4117 return id_expression;
4118
4119 if (DECL_CLASS_TEMPLATE_P (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/semantics.c"
, 4119, __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/semantics.c"
, 4119, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == TYPE_DECL) && (((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/semantics.c"
, 4119, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == TYPE_DECL && ((contains_struct_check ((
((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/semantics.c"
, 4119, __FUNCTION__, (TEMPLATE_DECL))))))))->result), (TS_DECL_COMMON
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4119, __FUNCTION__))->decl_common.lang_flag_2)))
)
4120 {
4121 error ("use of class template %qT as expression", decl);
4122 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4123 }
4124
4125 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TREE_LIST)
4126 {
4127 /* Ambiguous reference to base members. */
4128 error ("request for member %qD is ambiguous in "
4129 "multiple inheritance lattice", id_expression);
4130 print_candidates (decl);
4131 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4132 }
4133
4134 /* Mark variable-like entities as used. Functions are similarly
4135 marked either below or after overload resolution. */
4136 if ((VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL)
4137 || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == PARM_DECL
4138 || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == CONST_DECL
4139 || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == RESULT_DECL)
4140 && !mark_used (decl))
4141 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4142
4143 /* Only certain kinds of names are allowed in constant
4144 expression. Template parameters have already
4145 been handled above. */
4146 if (! error_operand_p (decl)
4147 && !dependent_p
4148 && integral_constant_expression_p
4149 && !decl_constant_var_p (decl)
4150 && TREE_CODE (decl)((enum tree_code) (decl)->base.code) != CONST_DECL
4151 && !builtin_valid_in_constant_expr_p (decl)
4152 && !concept_check_p (decl))
4153 {
4154 if (!allow_non_integral_constant_expression_p)
4155 {
4156 error ("%qD cannot appear in a constant-expression", decl);
4157 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4158 }
4159 *non_integral_constant_expression_p = true;
4160 }
4161
4162 if (tree wrap = maybe_get_tls_wrapper_call (decl))
4163 /* Replace an evaluated use of the thread_local variable with
4164 a call to its wrapper. */
4165 decl = wrap;
4166 else if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_ID_EXPR
4167 && !dependent_p
4168 && variable_template_p (TREE_OPERAND (decl, 0)(*((const_cast<tree*> (tree_operand_check ((decl), (0),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4168, __FUNCTION__)))))
)
4169 && !concept_check_p (decl))
4170 {
4171 decl = finish_template_variable (decl);
4172 mark_used (decl);
4173 decl = convert_from_reference (decl);
4174 }
4175 else if (concept_check_p (decl))
4176 {
4177 /* Nothing more to do. All of the analysis for concept checks
4178 is done by build_conept_id, called from the parser. */
4179 }
4180 else if (scope)
4181 {
4182 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == SCOPE_REF)
4183 {
4184 gcc_assert (same_type_p (scope, TREE_OPERAND (decl, 0)))((void)(!(comptypes ((scope), ((*((const_cast<tree*> (tree_operand_check
((decl), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4184, __FUNCTION__)))))), 0)) ? fancy_abort ("/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4184, __FUNCTION__), 0 : 0))
;
4185 decl = TREE_OPERAND (decl, 1)(*((const_cast<tree*> (tree_operand_check ((decl), (1),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4185, __FUNCTION__)))))
;
4186 }
4187
4188 decl = (adjust_result_of_qualified_name_lookup
4189 (decl, scope, current_nonlambda_class_type()));
4190
4191 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == FUNCTION_DECL)
4192 mark_used (decl);
4193
4194 cp_warn_deprecated_use_scopes (scope);
4195
4196 if (TYPE_P (scope)(tree_code_type[(int) (((enum tree_code) (scope)->base.code
))] == tcc_type)
)
4197 decl = finish_qualified_id_expr (scope,
4198 decl,
4199 done,
4200 address_p,
4201 template_p,
4202 template_arg_p,
4203 tf_warning_or_error);
4204 else
4205 decl = convert_from_reference (decl);
4206 }
4207 else if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == FIELD_DECL)
4208 {
4209 /* Since SCOPE is NULL here, this is an unqualified name.
4210 Access checking has been performed during name lookup
4211 already. Turn off checking to avoid duplicate errors. */
4212 push_deferring_access_checks (dk_no_check);
4213 decl = finish_non_static_data_member (decl, NULL_TREE(tree) __null,
4214 /*qualifying_scope=*/NULL_TREE(tree) __null);
4215 pop_deferring_access_checks ();
4216 }
4217 else if (is_overloaded_fn (decl))
4218 {
4219 /* We only need to look at the first function,
4220 because all the fns share the attribute we're
4221 concerned with (all member fns or all non-members). */
4222 tree first_fn = get_first_fn (decl);
4223 first_fn = STRIP_TEMPLATE (first_fn)(((enum tree_code) (first_fn)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((first_fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4223, __FUNCTION__, (TEMPLATE_DECL))))))))->result : first_fn
)
;
4224
4225 /* [basic.def.odr]: "A function whose name appears as a
4226 potentially-evaluated expression is odr-used if it is the unique
4227 lookup result".
4228
4229 But only mark it if it's a complete postfix-expression; in a call,
4230 ADL might select a different function, and we'll call mark_used in
4231 build_over_call. */
4232 if (done
4233 && !really_overloaded_fn (decl)
4234 && !mark_used (first_fn))
4235 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4236
4237 if (!template_arg_p
4238 && (TREE_CODE (first_fn)((enum tree_code) (first_fn)->base.code) == USING_DECL
4239 || (TREE_CODE (first_fn)((enum tree_code) (first_fn)->base.code) == FUNCTION_DECL
4240 && DECL_FUNCTION_MEMBER_P (first_fn)((((enum tree_code) (((contains_struct_check ((first_fn), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4240, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE
) || (__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (first_fn)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((first_fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4240, __FUNCTION__, (TEMPLATE_DECL))))))))->result : first_fn
)), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4240, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (first_fn)->base.code) == FUNCTION_DECL ||
(((enum tree_code) (first_fn)->base.code) == TEMPLATE_DECL
&& ((struct tree_template_decl *)(const_cast<union
tree_node *> ((((tree_check ((first_fn), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4240, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((first_fn
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4240, __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/semantics.c"
, 4240, __FUNCTION__); &lt->u.fn; })->static_function
))
4241 && !shared_member_p (decl))))
4242 {
4243 /* A set of member functions. */
4244 decl = maybe_dummy_object (DECL_CONTEXT (first_fn)((contains_struct_check ((first_fn), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4244, __FUNCTION__))->decl_minimal.context)
, 0);
4245 return finish_class_member_access_expr (decl, id_expression,
4246 /*template_p=*/false,
4247 tf_warning_or_error);
4248 }
4249
4250 decl = baselink_for_fns (decl);
4251 }
4252 else
4253 {
4254 if (DECL_P (decl)(tree_code_type[(int) (((enum tree_code) (decl)->base.code
))] == tcc_declaration)
&& DECL_NONLOCAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4254, __FUNCTION__))->decl_common.nonlocal_flag)
4255 && DECL_CLASS_SCOPE_P (decl)(((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4255, __FUNCTION__))->decl_minimal.context) && (
tree_code_type[(int) (((enum tree_code) (((contains_struct_check
((decl), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4255, __FUNCTION__))->decl_minimal.context))->base.code
))] == tcc_type))
)
4256 {
4257 tree context = context_for_name_lookup (decl);
4258 if (context != current_class_typescope_chain->class_type)
4259 {
4260 tree path = currently_open_derived_class (context);
4261 if (!path)
4262 /* PATH can be null for using an enum of an unrelated
4263 class; we checked its access in lookup_using_decl.
4264
4265 ??? Should this case make a clone instead, like
4266 handle_using_decl? */
4267 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/semantics.c"
, 4267, __FUNCTION__), 0 : 0))
;
4268 else
4269 perform_or_defer_access_check (TYPE_BINFO (path)((tree_check3 ((path), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4269, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
,
4270 decl, decl,
4271 tf_warning_or_error);
4272 }
4273 }
4274
4275 decl = convert_from_reference (decl);
4276 }
4277 }
4278
4279 return cp_expr (decl, location);
4280}
4281
4282/* As per finish_id_expression_1, but adding a wrapper node
4283 around the result if needed to express LOCATION. */
4284
4285cp_expr
4286finish_id_expression (tree id_expression,
4287 tree decl,
4288 tree scope,
4289 cp_id_kind *idk,
4290 bool integral_constant_expression_p,
4291 bool allow_non_integral_constant_expression_p,
4292 bool *non_integral_constant_expression_p,
4293 bool template_p,
4294 bool done,
4295 bool address_p,
4296 bool template_arg_p,
4297 const char **error_msg,
4298 location_t location)
4299{
4300 cp_expr result
4301 = finish_id_expression_1 (id_expression, decl, scope, idk,
4302 integral_constant_expression_p,
4303 allow_non_integral_constant_expression_p,
4304 non_integral_constant_expression_p,
4305 template_p, done, address_p, template_arg_p,
4306 error_msg, location);
4307 return result.maybe_add_location_wrapper ();
4308}
4309
4310/* Implement the __typeof keyword: Return the type of EXPR, suitable for
4311 use as a type-specifier. */
4312
4313tree
4314finish_typeof (tree expr)
4315{
4316 tree type;
4317
4318 if (type_dependent_expression_p (expr))
4319 {
4320 type = cxx_make_type (TYPEOF_TYPE);
4321 TYPEOF_TYPE_EXPR (type)(((tree_class_check (((tree_check ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4321, __FUNCTION__, (TYPEOF_TYPE)))), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4321, __FUNCTION__))->type_non_common.values))
= expr;
4322 SET_TYPE_STRUCTURAL_EQUALITY (type)(((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4322, __FUNCTION__))->type_common.canonical) = (tree) __null
)
;
4323
4324 return type;
4325 }
4326
4327 expr = mark_type_use (expr);
4328
4329 type = unlowered_expr_type (expr);
4330
4331 if (!type || type == unknown_type_nodecp_global_trees[CPTI_UNKNOWN_TYPE])
4332 {
4333 error ("type of %qE is unknown", expr);
4334 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4335 }
4336
4337 return type;
4338}
4339
4340/* Implement the __underlying_type keyword: Return the underlying
4341 type of TYPE, suitable for use as a type-specifier. */
4342
4343tree
4344finish_underlying_type (tree type)
4345{
4346 tree underlying_type;
4347
4348 if (processing_template_declscope_chain->x_processing_template_decl)
4349 {
4350 underlying_type = cxx_make_type (UNDERLYING_TYPE);
4351 UNDERLYING_TYPE_TYPE (underlying_type)(((tree_class_check (((tree_check ((underlying_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4351, __FUNCTION__, (UNDERLYING_TYPE)))), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4351, __FUNCTION__))->type_non_common.values))
= type;
4352 SET_TYPE_STRUCTURAL_EQUALITY (underlying_type)(((tree_class_check ((underlying_type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4352, __FUNCTION__))->type_common.canonical) = (tree) __null
)
;
4353
4354 return underlying_type;
4355 }
4356
4357 if (!complete_type_or_else (type, NULL_TREE(tree) __null))
4358 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4359
4360 if (TREE_CODE (type)((enum tree_code) (type)->base.code) != ENUMERAL_TYPE)
4361 {
4362 error ("%qT is not an enumeration type", type);
4363 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4364 }
4365
4366 underlying_type = ENUM_UNDERLYING_TYPE (type)((contains_struct_check (((tree_check ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4366, __FUNCTION__, (ENUMERAL_TYPE)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4366, __FUNCTION__))->typed.type)
;
4367
4368 /* Fixup necessary in this case because ENUM_UNDERLYING_TYPE
4369 includes TYPE_MIN_VALUE and TYPE_MAX_VALUE information.
4370 See finish_enum_value_list for details. */
4371 if (!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/semantics.c"
, 4371, __FUNCTION__))->type_common.lang_flag_5))
)
4372 underlying_type
4373 = c_common_type_for_mode (TYPE_MODE (underlying_type)((((enum tree_code) ((tree_class_check ((underlying_type), (tcc_type
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4373, __FUNCTION__)))->base.code) == VECTOR_TYPE) ? vector_type_mode
(underlying_type) : (underlying_type)->type_common.mode)
,
4374 TYPE_UNSIGNED (underlying_type)((tree_class_check ((underlying_type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4374, __FUNCTION__))->base.u.bits.unsigned_flag)
);
4375
4376 return underlying_type;
4377}
4378
4379/* Implement the __direct_bases keyword: Return the direct base classes
4380 of type. */
4381
4382tree
4383calculate_direct_bases (tree type, tsubst_flags_t complain)
4384{
4385 if (!complete_type_or_maybe_complain (type, NULL_TREE(tree) __null, complain)
4386 || !NON_UNION_CLASS_TYPE_P (type)(((enum tree_code) (type)->base.code) == RECORD_TYPE &&
((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4386, __FUNCTION__))->type_common.lang_flag_5))
)
4387 return make_tree_vec (0);
4388
4389 releasing_vec vector;
4390 vec<tree, va_gc> *base_binfos = BINFO_BASE_BINFOS (TYPE_BINFO (type))(&(tree_check ((((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4390, __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/semantics.c"
, 4390, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)
;
4391 tree binfo;
4392 unsigned i;
4393
4394 /* Virtual bases are initialized first */
4395 for (i = 0; base_binfos->iterate (i, &binfo); i++)
4396 if (BINFO_VIRTUAL_P (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4396, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
4397 vec_safe_push (vector, binfo);
4398
4399 /* Now non-virtuals */
4400 for (i = 0; base_binfos->iterate (i, &binfo); i++)
4401 if (!BINFO_VIRTUAL_P (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4401, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
4402 vec_safe_push (vector, binfo);
4403
4404 tree bases_vec = make_tree_vec (vector->length ());
4405
4406 for (i = 0; i < vector->length (); ++i)
4407 TREE_VEC_ELT (bases_vec, i)(*((const_cast<tree *> (tree_vec_elt_check ((bases_vec)
, (i), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4407, __FUNCTION__)))))
= BINFO_TYPE ((*vector)[i])((contains_struct_check (((tree_check (((*vector)[i]), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4407, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4407, __FUNCTION__))->typed.type)
;
4408
4409 return bases_vec;
4410}
4411
4412/* Implement the __bases keyword: Return the base classes
4413 of type */
4414
4415/* Find morally non-virtual base classes by walking binfo hierarchy */
4416/* Virtual base classes are handled separately in finish_bases */
4417
4418static tree
4419dfs_calculate_bases_pre (tree binfo, void * /*data_*/)
4420{
4421 /* Don't walk bases of virtual bases */
4422 return BINFO_VIRTUAL_P (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4422, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
? dfs_skip_bases((tree)1) : NULL_TREE(tree) __null;
4423}
4424
4425static tree
4426dfs_calculate_bases_post (tree binfo, void *data_)
4427{
4428 vec<tree, va_gc> **data = ((vec<tree, va_gc> **) data_);
4429 if (!BINFO_VIRTUAL_P (binfo)((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4429, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
4430 vec_safe_push (*data, BINFO_TYPE (binfo)((contains_struct_check (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4430, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4430, __FUNCTION__))->typed.type)
);
4431 return NULL_TREE(tree) __null;
4432}
4433
4434/* Calculates the morally non-virtual base classes of a class */
4435static vec<tree, va_gc> *
4436calculate_bases_helper (tree type)
4437{
4438 vec<tree, va_gc> *vector = make_tree_vector ();
4439
4440 /* Now add non-virtual base classes in order of construction */
4441 if (TYPE_BINFO (type)((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4441, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
)
4442 dfs_walk_all (TYPE_BINFO (type)((tree_check3 ((type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4442, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
,
4443 dfs_calculate_bases_pre, dfs_calculate_bases_post, &vector);
4444 return vector;
4445}
4446
4447tree
4448calculate_bases (tree type, tsubst_flags_t complain)
4449{
4450 if (!complete_type_or_maybe_complain (type, NULL_TREE(tree) __null, complain)
4451 || !NON_UNION_CLASS_TYPE_P (type)(((enum tree_code) (type)->base.code) == RECORD_TYPE &&
((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4451, __FUNCTION__))->type_common.lang_flag_5))
)
4452 return make_tree_vec (0);
4453
4454 releasing_vec vector;
4455 tree bases_vec = NULL_TREE(tree) __null;
4456 unsigned i;
4457 vec<tree, va_gc> *vbases;
4458 tree binfo;
4459
4460 /* First go through virtual base classes */
4461 for (vbases = CLASSTYPE_VBASECLASSES (type)((((tree_class_check ((type), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4461, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vbases)
, i = 0;
4462 vec_safe_iterate (vbases, i, &binfo); i++)
4463 {
4464 releasing_vec vbase_bases
4465 = calculate_bases_helper (BINFO_TYPE (binfo)((contains_struct_check (((tree_check ((binfo), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4465, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4465, __FUNCTION__))->typed.type)
);
4466 vec_safe_splice (vector, vbase_bases);
4467 }
4468
4469 /* Now for the non-virtual bases */
4470 releasing_vec nonvbases = calculate_bases_helper (type);
4471 vec_safe_splice (vector, nonvbases);
4472
4473 /* Note that during error recovery vector->length can even be zero. */
4474 if (vector->length () > 1)
4475 {
4476 /* Last element is entire class, so don't copy */
4477 bases_vec = make_tree_vec (vector->length () - 1);
4478
4479 for (i = 0; i < vector->length () - 1; ++i)
4480 TREE_VEC_ELT (bases_vec, i)(*((const_cast<tree *> (tree_vec_elt_check ((bases_vec)
, (i), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4480, __FUNCTION__)))))
= (*vector)[i];
4481 }
4482 else
4483 bases_vec = make_tree_vec (0);
4484
4485 return bases_vec;
4486}
4487
4488tree
4489finish_bases (tree type, bool direct)
4490{
4491 tree bases = NULL_TREE(tree) __null;
4492
4493 if (!processing_template_declscope_chain->x_processing_template_decl)
4494 {
4495 /* Parameter packs can only be used in templates */
4496 error ("parameter pack %<__bases%> only valid in template declaration");
4497 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4498 }
4499
4500 bases = cxx_make_type (BASES);
4501 BASES_TYPE (bases)(((tree_class_check (((tree_check ((bases), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4501, __FUNCTION__, (BASES)))), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4501, __FUNCTION__))->type_non_common.values))
= type;
4502 BASES_DIRECT (bases)((tree_not_check2 (((tree_check ((bases), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4502, __FUNCTION__, (BASES)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4502, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= direct;
4503 SET_TYPE_STRUCTURAL_EQUALITY (bases)(((tree_class_check ((bases), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4503, __FUNCTION__))->type_common.canonical) = (tree) __null
)
;
4504
4505 return bases;
4506}
4507
4508/* Perform C++-specific checks for __builtin_offsetof before calling
4509 fold_offsetof. */
4510
4511tree
4512finish_offsetof (tree object_ptr, tree expr, location_t loc)
4513{
4514 /* If we're processing a template, we can't finish the semantics yet.
4515 Otherwise we can fold the entire expression now. */
4516 if (processing_template_declscope_chain->x_processing_template_decl)
4517 {
4518 expr = build2 (OFFSETOF_EXPR, size_type_nodeglobal_trees[TI_SIZE_TYPE], expr, object_ptr);
4519 SET_EXPR_LOCATION (expr, loc)(expr_check (((expr)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4519, __FUNCTION__))->exp.locus = (loc)
;
4520 return expr;
4521 }
4522
4523 if (expr == error_mark_nodeglobal_trees[TI_ERROR_MARK])
4524 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4525
4526 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == PSEUDO_DTOR_EXPR)
4527 {
4528 error ("cannot apply %<offsetof%> to destructor %<~%T%>",
4529 TREE_OPERAND (expr, 2)(*((const_cast<tree*> (tree_operand_check ((expr), (2),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4529, __FUNCTION__)))))
);
4530 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4531 }
4532 if (FUNC_OR_METHOD_TYPE_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/semantics.c"
, 4532, __FUNCTION__))->typed.type))->base.code) == FUNCTION_TYPE
|| ((enum tree_code) (((contains_struct_check ((expr), (TS_TYPED
), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4532, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE
)
4533 || TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4533, __FUNCTION__))->typed.type)
== unknown_type_nodecp_global_trees[CPTI_UNKNOWN_TYPE])
4534 {
4535 while (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == COMPONENT_REF
4536 || TREE_CODE (expr)((enum tree_code) (expr)->base.code) == COMPOUND_EXPR)
4537 expr = TREE_OPERAND (expr, 1)(*((const_cast<tree*> (tree_operand_check ((expr), (1),
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4537, __FUNCTION__)))))
;
4538
4539 if (DECL_P (expr)(tree_code_type[(int) (((enum tree_code) (expr)->base.code
))] == tcc_declaration)
)
4540 {
4541 error ("cannot apply %<offsetof%> to member function %qD", expr);
4542 inform (DECL_SOURCE_LOCATION (expr)((contains_struct_check ((expr), (TS_DECL_MINIMAL), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4542, __FUNCTION__))->decl_minimal.locus)
, "declared here");
4543 }
4544 else
4545 error ("cannot apply %<offsetof%> to member function");
4546 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4547 }
4548 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == CONST_DECL)
4549 {
4550 error ("cannot apply %<offsetof%> to an enumerator %qD", expr);
4551 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4552 }
4553 if (REFERENCE_REF_P (expr)((((enum tree_code) (expr)->base.code) == INDIRECT_REF) &&
((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
((expr), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4553, __FUNCTION__)))))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4553, __FUNCTION__))->typed.type) && (((enum tree_code
) (((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
(((expr)), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4553, __FUNCTION__)))))), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4553, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE
))
)
4554 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/semantics.c"
, 4554, __FUNCTION__)))))
;
4555 if (!complete_type_or_else (TREE_TYPE (TREE_TYPE (object_ptr))((contains_struct_check ((((contains_struct_check ((object_ptr
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4555, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4555, __FUNCTION__))->typed.type)
, object_ptr))
4556 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4557 if (warn_invalid_offsetofglobal_options.x_warn_invalid_offsetof
4558 && CLASS_TYPE_P (TREE_TYPE (TREE_TYPE (object_ptr)))(((((enum tree_code) (((contains_struct_check ((((contains_struct_check
((object_ptr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4558, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4558, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE
|| (((enum tree_code) (((contains_struct_check ((((contains_struct_check
((object_ptr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4558, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4558, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE
) && ((tree_class_check ((((contains_struct_check (((
(contains_struct_check ((object_ptr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4558, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4558, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4558, __FUNCTION__))->type_common.lang_flag_5))
4559 && CLASSTYPE_NON_STD_LAYOUT (TREE_TYPE (TREE_TYPE (object_ptr)))((((tree_class_check ((((contains_struct_check ((((contains_struct_check
((object_ptr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4559, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4559, __FUNCTION__))->typed.type)), (tcc_type), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4559, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
4560 && cp_unevaluated_operand == 0)
4561 warning_at (loc, OPT_Winvalid_offsetof, "%<offsetof%> within "
4562 "non-standard-layout type %qT is conditionally-supported",
4563 TREE_TYPE (TREE_TYPE (object_ptr))((contains_struct_check ((((contains_struct_check ((object_ptr
), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4563, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4563, __FUNCTION__))->typed.type)
);
4564 return fold_offsetof (expr);
4565}
4566
4567/* Replace the AGGR_INIT_EXPR at *TP with an equivalent CALL_EXPR. This
4568 function is broken out from the above for the benefit of the tree-ssa
4569 project. */
4570
4571void
4572simplify_aggr_init_expr (tree *tp)
4573{
4574 tree aggr_init_expr = *tp;
4575
4576 /* Form an appropriate CALL_EXPR. */
4577 tree fn = AGGR_INIT_EXPR_FN (aggr_init_expr)(*((const_cast<tree*> (tree_operand_check (((tree_check
((aggr_init_expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4577, __FUNCTION__, (AGGR_INIT_EXPR)))), (1), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4577, __FUNCTION__)))))
;
4578 tree slot = AGGR_INIT_EXPR_SLOT (aggr_init_expr)(*((const_cast<tree*> (tree_operand_check (((tree_check
((aggr_init_expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4578, __FUNCTION__, (AGGR_INIT_EXPR)))), (2), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4578, __FUNCTION__)))))
;
4579 tree type = TREE_TYPE (slot)((contains_struct_check ((slot), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4579, __FUNCTION__))->typed.type)
;
4580
4581 tree call_expr;
4582 enum style_t { ctor, arg, pcc } style;
4583
4584 if (AGGR_INIT_VIA_CTOR_P (aggr_init_expr)((tree_not_check2 (((tree_check ((aggr_init_expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4584, __FUNCTION__, (AGGR_INIT_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4584, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
)
4585 style = ctor;
4586#ifdef PCC_STATIC_STRUCT_RETURN
4587 else if (1)
4588 style = pcc;
4589#endif
4590 else
4591 {
4592 gcc_assert (TREE_ADDRESSABLE (type))((void)(!(((type)->base.addressable_flag)) ? fancy_abort (
"/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4592, __FUNCTION__), 0 : 0))
;
4593 style = arg;
4594 }
4595
4596 call_expr = build_call_array_loc (input_location,
4597 TREE_TYPE (TREE_TYPE (TREE_TYPE (fn)))((contains_struct_check ((((contains_struct_check ((((contains_struct_check
((fn), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4597, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4597, __FUNCTION__))->typed.type)), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4597, __FUNCTION__))->typed.type)
,
4598 fn,
4599 aggr_init_expr_nargs (aggr_init_expr)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check
((aggr_init_expr), (tcc_vl_exp), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4599, __FUNCTION__))->exp.operands[0]), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4599, __FUNCTION__)))) - 3)
,
4600 AGGR_INIT_EXPR_ARGP (aggr_init_expr)(&((*((const_cast<tree*> (tree_operand_check (((tree_check
((aggr_init_expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4600, __FUNCTION__, (AGGR_INIT_EXPR)))), (0), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4600, __FUNCTION__)))))) + 3)
);
4601 TREE_NOTHROW (call_expr)((call_expr)->base.nothrow_flag) = TREE_NOTHROW (aggr_init_expr)((aggr_init_expr)->base.nothrow_flag);
4602 CALL_FROM_THUNK_P (call_expr)((tree_check ((call_expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4602, __FUNCTION__, (CALL_EXPR)))->base.protected_flag)
= AGGR_INIT_FROM_THUNK_P (aggr_init_expr)((tree_check ((aggr_init_expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4602, __FUNCTION__, (AGGR_INIT_EXPR)))->base.protected_flag
)
;
4603 CALL_EXPR_OPERATOR_SYNTAX (call_expr)((tree_not_check2 (((tree_check2 (((call_expr)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4603, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4603, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_6)
4604 = CALL_EXPR_OPERATOR_SYNTAX (aggr_init_expr)((tree_not_check2 (((tree_check2 (((aggr_init_expr)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4604, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4604, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_6)
;
4605 CALL_EXPR_ORDERED_ARGS (call_expr)((tree_not_check2 (((tree_check2 (((call_expr)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4605, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4605, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3)
= CALL_EXPR_ORDERED_ARGS (aggr_init_expr)((tree_not_check2 (((tree_check2 (((aggr_init_expr)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4605, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4605, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3)
;
4606 CALL_EXPR_REVERSE_ARGS (call_expr)((tree_not_check2 (((tree_check2 (((call_expr)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4606, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4606, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
= CALL_EXPR_REVERSE_ARGS (aggr_init_expr)((tree_not_check2 (((tree_check2 (((aggr_init_expr)), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4606, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4606, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
;
4607
4608 if (style == ctor)
4609 {
4610 /* Replace the first argument to the ctor with the address of the
4611 slot. */
4612 cxx_mark_addressable (slot);
4613 CALL_EXPR_ARG (call_expr, 0)(*((const_cast<tree*> (tree_operand_check (((tree_check
((call_expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4613, __FUNCTION__, (CALL_EXPR)))), ((0) + 3), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4613, __FUNCTION__)))))
=
4614 build1 (ADDR_EXPR, build_pointer_type (type), slot);
4615 }
4616 else if (style == arg)
4617 {
4618 /* Just mark it addressable here, and leave the rest to
4619 expand_call{,_inline}. */
4620 cxx_mark_addressable (slot);
4621 CALL_EXPR_RETURN_SLOT_OPT (call_expr)((tree_check ((call_expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4621, __FUNCTION__, (CALL_EXPR)))->base.private_flag)
= true;
4622 call_expr = build2 (INIT_EXPR, TREE_TYPE (call_expr)((contains_struct_check ((call_expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4622, __FUNCTION__))->typed.type)
, slot, call_expr);
4623 }
4624 else if (style == pcc)
4625 {
4626 /* If we're using the non-reentrant PCC calling convention, then we
4627 need to copy the returned value out of the static buffer into the
4628 SLOT. */
4629 push_deferring_access_checks (dk_no_check);
4630 call_expr = build_aggr_init (slot, call_expr,
4631 DIRECT_BIND(1 << 3) | LOOKUP_ONLYCONVERTING(1 << 2),
4632 tf_warning_or_error);
4633 pop_deferring_access_checks ();
4634 call_expr = build2 (COMPOUND_EXPR, TREE_TYPE (slot)((contains_struct_check ((slot), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4634, __FUNCTION__))->typed.type)
, call_expr, slot);
4635 }
4636
4637 if (AGGR_INIT_ZERO_FIRST (aggr_init_expr)((tree_not_check2 (((tree_check ((aggr_init_expr), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4637, __FUNCTION__, (AGGR_INIT_EXPR)))), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4637, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)
)
4638 {
4639 tree init = build_zero_init (type, NULL_TREE(tree) __null,
4640 /*static_storage_p=*/false);
4641 init = build2 (INIT_EXPR, void_type_nodeglobal_trees[TI_VOID_TYPE], slot, init);
4642 call_expr = build2 (COMPOUND_EXPR, TREE_TYPE (call_expr)((contains_struct_check ((call_expr), (TS_TYPED), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4642, __FUNCTION__))->typed.type)
,
4643 init, call_expr);
4644 }
4645
4646 *tp = call_expr;
4647}
4648
4649/* Emit all thunks to FN that should be emitted when FN is emitted. */
4650
4651void
4652emit_associated_thunks (tree fn)
4653{
4654 /* When we use vcall offsets, we emit thunks with the virtual
4655 functions to which they thunk. The whole point of vcall offsets
4656 is so that you can know statically the entire set of thunks that
4657 will ever be needed for a given virtual function, thereby
4658 enabling you to output all the thunks with the function itself. */
4659 if (DECL_VIRTUAL_P (fn)((contains_struct_check ((fn), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4659, __FUNCTION__))->decl_common.virtual_flag)
4660 /* Do not emit thunks for extern template instantiations. */
4661 && ! DECL_REALLY_EXTERN (fn)(((contains_struct_check ((fn), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4661, __FUNCTION__))->decl_common.decl_flag_1) &&
(!((contains_struct_check ((fn), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4661, __FUNCTION__))->decl_common.lang_specific) || !(((
contains_struct_check ((fn), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4661, __FUNCTION__))->decl_common.lang_specific)->u.base
.not_really_extern)))
)
4662 {
4663 tree thunk;
4664
4665 for (thunk = DECL_THUNKS (fn)(((contains_struct_check ((fn), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4665, __FUNCTION__))->decl_common.virtual_flag) ? __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/semantics.c"
, 4665, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/home/marxin/BIG/buildbot/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.c"
, 4665, __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/semantics.c"
, 4665, __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/semantics.c"
, 4665, __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/semantics.c"
, 4665, __FUNCTION__); &lt->u.fn; })->context : (tree
) __null)
; thunk; thunk =