Bug Summary

File:build/gcc/cp/semantics.cc
Warning:line 9180, column 20
Although the value stored to 'type' is used in the enclosing expression, the value is never actually read from 'type'

Annotated Source Code

Press '?' to see keyboard shortcuts

clang -cc1 -cc1 -triple x86_64-suse-linux -analyze -disable-free -clear-ast-before-backend -disable-llvm-verifier -discard-value-names -main-file-name semantics.cc -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 -ffp-contract=on -fno-rounding-math -mconstructor-aliases -funwind-tables=2 -target-cpu x86-64 -tune-cpu generic -debugger-tuning=gdb -fcoverage-compilation-dir=/buildworker/marxinbox-gcc-clang-static-analyzer/objdir/gcc -resource-dir /usr/lib64/clang/15.0.7 -D IN_GCC_FRONTEND -D IN_GCC -D HAVE_CONFIG_H -I . -I cp -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../include -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libcpp/include -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libcody -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libdecnumber -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libdecnumber/bid -I ../libdecnumber -I /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/../libbacktrace -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13/x86_64-suse-linux -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../include/c++/13/backward -internal-isystem /usr/lib64/clang/15.0.7/include -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/13/../../../../x86_64-suse-linux/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -O2 -Wno-narrowing -Wwrite-strings -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fdeprecated-macro -fdebug-compilation-dir=/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 /buildworker/marxinbox-gcc-clang-static-analyzer/objdir/clang-static-analyzer/2023-03-27-141847-20772-1/report-lQNEjG.plist -x c++ /buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc
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-2023 Free Software Foundation, Inc.
7 Written by Mark Mitchell (mmitchell@usa.net) based on code found
8 formerly in parse.y and pt.cc.
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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 283, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 283, __FUNCTION__))->typed.type)))
283 BINFO_TYPE (parent_binfo))((context_for_name_lookup (decl)) == (((contains_struct_check
(((tree_check ((parent_binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 283, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 294, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 294, __FUNCTION__))->typed.type)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 296, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 322, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 322, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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 ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 338, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 338, __FUNCTION__, (TEMPLATE_DECL))))))))->result : decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 338, __FUNCTION__, (TEMPLATE_DECL))))))))->result : decl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 338, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 338, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->base
.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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 ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 368, __FUNCTION__))->decl_minimal.context))) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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 ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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_tmpl <0>::tree_code_type[(int) (((enum
tree_code) (t)->base.code))]) >= tcc_reference &&
(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum
tree_code) (t)->base.code))]) <= tcc_expression)
&& code != LABEL_EXPR)
537 {
538 if (!EXPR_HAS_LOCATION (t)(((IS_ADHOC_LOC (((((t)) && ((tree_code_type_tmpl <
0>::tree_code_type[(int) (((enum tree_code) ((t))->base
.code))]) >= tcc_reference && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) ((t))->
base.code))]) <= tcc_expression)) ? (t)->exp.locus : ((
location_t) 0)))) ? get_location_from_adhoc_loc (line_table, (
(((t)) && ((tree_code_type_tmpl <0>::tree_code_type
[(int) (((enum tree_code) ((t))->base.code))]) >= tcc_reference
&& (tree_code_type_tmpl <0>::tree_code_type[(int
) (((enum tree_code) ((t))->base.code))]) <= tcc_expression
)) ? (t)->exp.locus : ((location_t) 0))) : (((((t)) &&
((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum
tree_code) ((t))->base.code))]) >= tcc_reference &&
(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum
tree_code) ((t))->base.code))]) <= tcc_expression)) ? (
t)->exp.locus : ((location_t) 0)))) != ((location_t) 0))
)
539 SET_EXPR_LOCATION (t, input_location)(expr_check (((t)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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 ())), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 548, __FUNCTION__, (STATEMENT_LIST)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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 ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 598, __FUNCTION__))->decl_minimal.locus)
, DECL_EXPR, decl);
599 if (DECL_INITIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 599, __FUNCTION__))->decl_common.initial)
600 || (DECL_SIZE (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 600, __FUNCTION__))->decl_common.size)
&& TREE_SIDE_EFFECTS (DECL_SIZE (decl))((non_type_check ((((contains_struct_check ((decl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 600, __FUNCTION__))->decl_common.size)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 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 tree t = CLEANUP_EXPR (stmts)(*((const_cast<tree*> (tree_operand_check (((tree_check
((stmts), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 612, __FUNCTION__, (CLEANUP_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 612, __FUNCTION__)))))
;
613 if (t && TREE_CODE (t)((enum tree_code) (t)->base.code) != POSTCONDITION_STMT)
614 protected_set_expr_location (t, loc);
615 /* Avoid locus differences for C++ cdtor calls depending on whether
616 cdtor_returns_this: a conversion to void is added to discard the return
617 value, and this conversion ends up carrying the location, and when it
618 gets discarded, the location is lost. So hold it in the call as
619 well. */
620 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == NOP_EXPR
621 && TREE_TYPE (t)((contains_struct_check ((t), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 621, __FUNCTION__))->typed.type)
== void_type_nodeglobal_trees[TI_VOID_TYPE]
622 && TREE_CODE (TREE_OPERAND (t, 0))((enum tree_code) ((*((const_cast<tree*> (tree_operand_check
((t), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 622, __FUNCTION__))))))->base.code)
== CALL_EXPR)
623 protected_set_expr_location (TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 623, __FUNCTION__)))))
, loc);
624 set_cleanup_locs (CLEANUP_BODY (stmts)(*((const_cast<tree*> (tree_operand_check (((tree_check
((stmts), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 624, __FUNCTION__, (CLEANUP_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 624, __FUNCTION__)))))
, loc);
625 }
626 else if (TREE_CODE (stmts)((enum tree_code) (stmts)->base.code) == STATEMENT_LIST)
627 for (tree stmt : tsi_range (stmts))
628 set_cleanup_locs (stmt, loc);
629}
630
631/* Finish a scope. */
632
633tree
634do_poplevel (tree stmt_list)
635{
636 tree block = NULL__null;
637
638 maybe_splice_retval_cleanup (stmt_list);
639
640 if (stmts_are_full_exprs_p ())
641 block = poplevel (kept_level_p (), 1, 0);
642
643 stmt_list = pop_stmt_list (stmt_list);
644
645 /* input_location is the last token of the scope, usually a }. */
646 set_cleanup_locs (stmt_list, input_location);
647
648 if (!processing_template_declscope_chain->x_processing_template_decl)
649 {
650 stmt_list = c_build_bind_expr (input_location, block, stmt_list);
651 /* ??? See c_end_compound_stmt re statement expressions. */
652 }
653
654 return stmt_list;
655}
656
657/* Begin a new scope. */
658
659static tree
660do_pushlevel (scope_kind sk)
661{
662 tree ret = push_stmt_list ();
663 if (stmts_are_full_exprs_p ())
664 begin_scope (sk, NULL__null);
665 return ret;
666}
667
668/* Queue a cleanup. CLEANUP is an expression/statement to be executed
669 when the current scope is exited. EH_ONLY is true when this is not
670 meant to apply to normal control flow transfer. DECL is the VAR_DECL
671 being cleaned up, if any, or null for temporaries or subobjects. */
672
673void
674push_cleanup (tree decl, tree cleanup, bool eh_only)
675{
676 tree stmt = build_stmt (input_location, CLEANUP_STMT, NULL__null, cleanup, decl);
677 CLEANUP_EH_ONLY (stmt)((stmt)->base.static_flag) = eh_only;
678 add_stmt (stmt);
679 CLEANUP_BODY (stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 679, __FUNCTION__, (CLEANUP_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 679, __FUNCTION__)))))
= push_stmt_list ();
680}
681
682/* Simple infinite loop tracking for -Wreturn-type. We keep a stack of all
683 the current loops, represented by 'NULL_TREE' if we've seen a possible
684 exit, and 'error_mark_node' if not. This is currently used only to
685 suppress the warning about a function with no return statements, and
686 therefore we don't bother noting returns as possible exits. We also
687 don't bother with gotos. */
688
689static void
690begin_maybe_infinite_loop (tree cond)
691{
692 /* Only track this while parsing a function, not during instantiation. */
693 if (!cfun(cfun + 0) || (DECL_TEMPLATE_INSTANTIATION (current_function_decl)((((contains_struct_check ((current_function_decl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 693, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) & 1)
694 && !processing_template_declscope_chain->x_processing_template_decl))
695 return;
696 bool maybe_infinite = true;
697 if (cond)
698 {
699 cond = fold_non_dependent_expr (cond);
700 maybe_infinite = integer_nonzerop (cond);
701 }
702 vec_safe_push (cp_function_chain((cfun + 0)->language)->infinite_loops,
703 maybe_infinite ? error_mark_nodeglobal_trees[TI_ERROR_MARK] : NULL_TREE(tree) __null);
704
705}
706
707/* A break is a possible exit for the current loop. */
708
709void
710break_maybe_infinite_loop (void)
711{
712 if (!cfun(cfun + 0))
713 return;
714 cp_function_chain((cfun + 0)->language)->infinite_loops->last() = NULL_TREE(tree) __null;
715}
716
717/* If we reach the end of the loop without seeing a possible exit, we have
718 an infinite loop. */
719
720static void
721end_maybe_infinite_loop (tree cond)
722{
723 if (!cfun(cfun + 0) || (DECL_TEMPLATE_INSTANTIATION (current_function_decl)((((contains_struct_check ((current_function_decl), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 723, __FUNCTION__))->decl_common.lang_specific)->u.base
.use_template) & 1)
724 && !processing_template_declscope_chain->x_processing_template_decl))
725 return;
726 tree current = cp_function_chain((cfun + 0)->language)->infinite_loops->pop();
727 if (current != NULL_TREE(tree) __null)
728 {
729 cond = fold_non_dependent_expr (cond);
730 if (integer_nonzerop (cond))
731 current_function_infinite_loop((cfun + 0)->language)->infinite_loop = 1;
732 }
733}
734
735/* Begin a conditional that might contain a declaration. When generating
736 normal code, we want the declaration to appear before the statement
737 containing the conditional. When generating template code, we want the
738 conditional to be rendered as the raw DECL_EXPR. */
739
740static void
741begin_cond (tree *cond_p)
742{
743 if (processing_template_declscope_chain->x_processing_template_decl)
744 *cond_p = push_stmt_list ();
745}
746
747/* Finish such a conditional. */
748
749static void
750finish_cond (tree *cond_p, tree expr)
751{
752 if (processing_template_declscope_chain->x_processing_template_decl)
753 {
754 tree cond = pop_stmt_list (*cond_p);
755
756 if (expr == NULL_TREE(tree) __null)
757 /* Empty condition in 'for'. */
758 gcc_assert (empty_expr_stmt_p (cond))((void)(!(empty_expr_stmt_p (cond)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 758, __FUNCTION__), 0 : 0))
;
759 else if (check_for_bare_parameter_packs (expr))
760 expr = error_mark_nodeglobal_trees[TI_ERROR_MARK];
761 else if (!empty_expr_stmt_p (cond))
762 expr = build2 (COMPOUND_EXPR, TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 762, __FUNCTION__))->typed.type)
, cond, expr);
763 }
764 *cond_p = expr;
765}
766
767/* If *COND_P specifies a conditional with a declaration, transform the
768 loop such that
769 while (A x = 42) { }
770 for (; A x = 42;) { }
771 becomes
772 while (true) { A x = 42; if (!x) break; }
773 for (;;) { A x = 42; if (!x) break; }
774 The statement list for BODY will be empty if the conditional did
775 not declare anything. */
776
777static void
778simplify_loop_decl_cond (tree *cond_p, tree body)
779{
780 tree cond, if_stmt;
781
782 if (!TREE_SIDE_EFFECTS (body)((non_type_check ((body), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 782, __FUNCTION__))->base.side_effects_flag)
)
783 return;
784
785 cond = *cond_p;
786 *cond_p = boolean_true_nodeglobal_trees[TI_BOOLEAN_TRUE];
787
788 if_stmt = begin_if_stmt ();
789 cond = cp_build_unary_op (TRUTH_NOT_EXPR, cond, false, tf_warning_or_error);
790 finish_if_stmt_cond (cond, if_stmt);
791 finish_break_stmt ();
792 finish_then_clause (if_stmt);
793 finish_if_stmt (if_stmt);
794}
795
796/* Finish a goto-statement. */
797
798tree
799finish_goto_stmt (tree destination)
800{
801 if (identifier_p (destination))
802 destination = lookup_label (destination);
803
804 /* We warn about unused labels with -Wunused. That means we have to
805 mark the used labels as used. */
806 if (TREE_CODE (destination)((enum tree_code) (destination)->base.code) == LABEL_DECL)
807 TREE_USED (destination)((destination)->base.used_flag) = 1;
808 else
809 {
810 destination = mark_rvalue_use (destination);
811 if (!processing_template_declscope_chain->x_processing_template_decl)
812 {
813 destination = cp_convert (ptr_type_nodeglobal_trees[TI_PTR_TYPE], destination,
814 tf_warning_or_error);
815 if (error_operand_p (destination))
816 return NULL_TREE(tree) __null;
817 destination
818 = fold_build_cleanup_point_expr (TREE_TYPE (destination)((contains_struct_check ((destination), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 818, __FUNCTION__))->typed.type)
,
819 destination);
820 }
821 }
822
823 check_goto (destination);
824
825 add_stmt (build_predict_expr (PRED_GOTO, NOT_TAKEN));
826 return add_stmt (build_stmt (input_location, GOTO_EXPR, destination));
827}
828
829/* Returns true if CALL is a (possibly wrapped) CALL_EXPR or AGGR_INIT_EXPR
830 to operator= () that is written as an operator expression. */
831static bool
832is_assignment_op_expr_p (tree call)
833{
834 if (call == NULL_TREE(tree) __null)
835 return false;
836
837 call = extract_call_expr (call);
838 if (call == NULL_TREE(tree) __null
839 || call == error_mark_nodeglobal_trees[TI_ERROR_MARK]
840 || !CALL_EXPR_OPERATOR_SYNTAX (call)((tree_not_check2 (((tree_check2 (((call)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 840, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 840, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_6)
)
841 return false;
842
843 tree fndecl = cp_get_callee_fndecl_nofold (call);
844 return fndecl != NULL_TREE(tree) __null
845 && DECL_ASSIGNMENT_OPERATOR_P (fndecl)(((((tree_not_check2 (((tree_check ((((contains_struct_check (
(fndecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 845, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 845, __FUNCTION__, (IDENTIFIER_NODE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 845, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) & (!((tree_not_check2 (((tree_check ((((contains_struct_check
((fndecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 845, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 845, __FUNCTION__, (IDENTIFIER_NODE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 845, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1))) & ((tree_not_check2 (((tree_check ((((contains_struct_check
((fndecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 845, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 845, __FUNCTION__, (IDENTIFIER_NODE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 845, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
846 && DECL_OVERLOADED_OPERATOR_IS (fndecl, NOP_EXPR)((__extension__ ({ struct lang_decl *lt = ((contains_struct_check
(((((enum tree_code) (fndecl)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 846, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fndecl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 846, __FUNCTION__))->decl_common.lang_specific); if (!((
(enum tree_code) (fndecl)->base.code) == FUNCTION_DECL || (
((enum tree_code) (fndecl)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((fndecl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 846, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fndecl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 846, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->base
.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 846, __FUNCTION__); &lt->u.fn; })->ovl_op_code) ==
OVL_OP_NOP_EXPR)
;
847}
848
849/* COND is the condition-expression for an if, while, etc.,
850 statement. Convert it to a boolean value, if appropriate.
851 In addition, verify sequence points if -Wsequence-point is enabled. */
852
853static tree
854maybe_convert_cond (tree cond)
855{
856 /* Empty conditions remain empty. */
857 if (!cond)
858 return NULL_TREE(tree) __null;
859
860 /* Wait until we instantiate templates before doing conversion. */
861 if (type_dependent_expression_p (cond))
862 return cond;
863
864 if (warn_sequence_pointglobal_options.x_warn_sequence_point && !processing_template_declscope_chain->x_processing_template_decl)
865 verify_sequence_points (cond);
866
867 /* Do the conversion. */
868 cond = convert_from_reference (cond);
869
870 if ((TREE_CODE (cond)((enum tree_code) (cond)->base.code) == MODIFY_EXPR || is_assignment_op_expr_p (cond))
871 && warn_parenthesesglobal_options.x_warn_parentheses
872 && !warning_suppressed_p (cond, OPT_Wparentheses)
873 && warning_at (cp_expr_loc_or_input_loc (cond),
874 OPT_Wparentheses, "suggest parentheses around "
875 "assignment used as truth value"))
876 suppress_warning (cond, OPT_Wparentheses);
877
878 return condition_conversion (cond);
879}
880
881/* Finish an expression-statement, whose EXPRESSION is as indicated. */
882
883tree
884finish_expr_stmt (tree expr)
885{
886 tree r = NULL_TREE(tree) __null;
887 location_t loc = EXPR_LOCATION (expr)((((expr)) && ((tree_code_type_tmpl <0>::tree_code_type
[(int) (((enum tree_code) ((expr))->base.code))]) >= tcc_reference
&& (tree_code_type_tmpl <0>::tree_code_type[(int
) (((enum tree_code) ((expr))->base.code))]) <= tcc_expression
)) ? (expr)->exp.locus : ((location_t) 0))
;
888
889 if (expr != NULL_TREE(tree) __null)
890 {
891 /* If we ran into a problem, make sure we complained. */
892 gcc_assert (expr != error_mark_node || seen_error ())((void)(!(expr != global_trees[TI_ERROR_MARK] || seen_error (
)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 892, __FUNCTION__), 0 : 0))
;
893
894 if (!processing_template_declscope_chain->x_processing_template_decl)
895 {
896 if (warn_sequence_pointglobal_options.x_warn_sequence_point)
897 verify_sequence_points (expr);
898 expr = convert_to_void (expr, ICV_STATEMENT, tf_warning_or_error);
899 }
900 else if (!type_dependent_expression_p (expr))
901 convert_to_void (build_non_dependent_expr (expr), ICV_STATEMENT,
902 tf_warning_or_error);
903
904 if (check_for_bare_parameter_packs (expr))
905 expr = error_mark_nodeglobal_trees[TI_ERROR_MARK];
906
907 /* Simplification of inner statement expressions, compound exprs,
908 etc can result in us already having an EXPR_STMT. */
909 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) != CLEANUP_POINT_EXPR)
910 {
911 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) != EXPR_STMT)
912 expr = build_stmt (loc, EXPR_STMT, expr);
913 expr = maybe_cleanup_point_expr_void (expr);
914 }
915
916 r = add_stmt (expr);
917 }
918
919 return r;
920}
921
922
923/* Begin an if-statement. Returns a newly created IF_STMT if
924 appropriate. */
925
926tree
927begin_if_stmt (void)
928{
929 tree r, scope;
930 scope = do_pushlevel (sk_cond);
931 r = build_stmt (input_location, IF_STMT, NULL_TREE(tree) __null,
932 NULL_TREE(tree) __null, NULL_TREE(tree) __null, scope);
933 current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
->this_entity = r;
934 begin_cond (&IF_COND (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 934, __FUNCTION__, (IF_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 934, __FUNCTION__)))))
);
935 return r;
936}
937
938/* Returns true if FN, a CALL_EXPR, is a call to
939 std::is_constant_evaluated or __builtin_is_constant_evaluated. */
940
941static bool
942is_std_constant_evaluated_p (tree fn)
943{
944 /* std::is_constant_evaluated takes no arguments. */
945 if (call_expr_nargs (fn)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check
((fn), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 945, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 945, __FUNCTION__)))) - 3)
!= 0)
946 return false;
947
948 tree fndecl = cp_get_callee_fndecl_nofold (fn);
949 if (fndecl == NULL_TREE(tree) __null)
950 return false;
951
952 if (fndecl_built_in_p (fndecl, CP_BUILT_IN_IS_CONSTANT_EVALUATED,
953 BUILT_IN_FRONTEND))
954 return true;
955
956 if (!decl_in_std_namespace_p (fndecl))
957 return false;
958
959 tree name = DECL_NAME (fndecl)((contains_struct_check ((fndecl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 959, __FUNCTION__))->decl_minimal.name)
;
960 return name && id_equal (name, "is_constant_evaluated");
961}
962
963/* Callback function for maybe_warn_for_constant_evaluated that looks
964 for calls to std::is_constant_evaluated in TP. */
965
966static tree
967find_std_constant_evaluated_r (tree *tp, int *walk_subtrees, void *)
968{
969 tree t = *tp;
970
971 if (TYPE_P (t)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (t)->base.code))] == tcc_type)
|| TREE_CONSTANT (t)((non_type_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 971, __FUNCTION__))->base.constant_flag)
)
972 {
973 *walk_subtrees = false;
974 return NULL_TREE(tree) __null;
975 }
976
977 switch (TREE_CODE (t)((enum tree_code) (t)->base.code))
978 {
979 case CALL_EXPR:
980 if (is_std_constant_evaluated_p (t))
981 return t;
982 break;
983 case EXPR_STMT:
984 /* Don't warn in statement expressions. */
985 *walk_subtrees = false;
986 return NULL_TREE(tree) __null;
987 default:
988 break;
989 }
990
991 return NULL_TREE(tree) __null;
992}
993
994/* In certain contexts, std::is_constant_evaluated() is always true (for
995 instance, in a consteval function or in a constexpr if), or always false
996 (e.g., in a non-constexpr non-consteval function) so give the user a clue. */
997
998static void
999maybe_warn_for_constant_evaluated (tree cond, bool constexpr_if)
1000{
1001 if (!warn_tautological_compareglobal_options.x_warn_tautological_compare)
1002 return;
1003
1004 /* Suppress warning for std::is_constant_evaluated if the conditional
1005 comes from a macro. */
1006 if (from_macro_expansion_at (EXPR_LOCATION (cond)((((cond)) && ((tree_code_type_tmpl <0>::tree_code_type
[(int) (((enum tree_code) ((cond))->base.code))]) >= tcc_reference
&& (tree_code_type_tmpl <0>::tree_code_type[(int
) (((enum tree_code) ((cond))->base.code))]) <= tcc_expression
)) ? (cond)->exp.locus : ((location_t) 0))
))
1007 return;
1008
1009 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)
1010 NULL)walk_tree_without_duplicates_1 (&cond, find_std_constant_evaluated_r
, __null, cp_walk_subtrees)
;
1011 if (cond)
1012 {
1013 if (constexpr_if)
1014 warning_at (EXPR_LOCATION (cond)((((cond)) && ((tree_code_type_tmpl <0>::tree_code_type
[(int) (((enum tree_code) ((cond))->base.code))]) >= tcc_reference
&& (tree_code_type_tmpl <0>::tree_code_type[(int
) (((enum tree_code) ((cond))->base.code))]) <= tcc_expression
)) ? (cond)->exp.locus : ((location_t) 0))
, OPT_Wtautological_compare,
1015 "%<std::is_constant_evaluated%> always evaluates to "
1016 "true in %<if constexpr%>");
1017 else if (!maybe_constexpr_fn (current_function_decl))
1018 warning_at (EXPR_LOCATION (cond)((((cond)) && ((tree_code_type_tmpl <0>::tree_code_type
[(int) (((enum tree_code) ((cond))->base.code))]) >= tcc_reference
&& (tree_code_type_tmpl <0>::tree_code_type[(int
) (((enum tree_code) ((cond))->base.code))]) <= tcc_expression
)) ? (cond)->exp.locus : ((location_t) 0))
, OPT_Wtautological_compare,
1019 "%<std::is_constant_evaluated%> always evaluates to "
1020 "false in a non-%<constexpr%> function");
1021 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1021, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1021, __FUNCTION__, (FUNCTION_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1021, __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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1021, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1021, __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
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1021, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((current_function_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1021, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1021, __FUNCTION__); &lt->u.fn; })->immediate_fn_p
: false)
)
1022 warning_at (EXPR_LOCATION (cond)((((cond)) && ((tree_code_type_tmpl <0>::tree_code_type
[(int) (((enum tree_code) ((cond))->base.code))]) >= tcc_reference
&& (tree_code_type_tmpl <0>::tree_code_type[(int
) (((enum tree_code) ((cond))->base.code))]) <= tcc_expression
)) ? (cond)->exp.locus : ((location_t) 0))
, OPT_Wtautological_compare,
1023 "%<std::is_constant_evaluated%> always evaluates to "
1024 "true in a %<consteval%> function");
1025 }
1026}
1027
1028/* Process the COND of an if-statement, which may be given by
1029 IF_STMT. */
1030
1031tree
1032finish_if_stmt_cond (tree orig_cond, tree if_stmt)
1033{
1034 tree cond = maybe_convert_cond (orig_cond);
1035 if (IF_STMT_CONSTEXPR_P (if_stmt)((tree_not_check2 (((tree_check ((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1035, __FUNCTION__, (IF_STMT)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1035, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
1036 && !type_dependent_expression_p (cond)
1037 && require_constant_expression (cond)
1038 && !instantiation_dependent_expression_p (cond)
1039 /* Wait until instantiation time, since only then COND has been
1040 converted to bool. */
1041 && TYPE_MAIN_VARIANT (TREE_TYPE (cond))((tree_class_check ((((contains_struct_check ((cond), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1041, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1041, __FUNCTION__))->type_common.main_variant)
== boolean_type_nodeglobal_trees[TI_BOOLEAN_TYPE])
1042 {
1043 maybe_warn_for_constant_evaluated (cond, /*constexpr_if=*/true);
1044 cond = instantiate_non_dependent_expr (cond);
1045 cond = cxx_constant_value (cond);
1046 }
1047 else
1048 {
1049 maybe_warn_for_constant_evaluated (cond, /*constexpr_if=*/false);
1050 if (processing_template_declscope_chain->x_processing_template_decl)
1051 cond = orig_cond;
1052 }
1053 finish_cond (&IF_COND (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1053, __FUNCTION__, (IF_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1053, __FUNCTION__)))))
, cond);
1054 add_stmt (if_stmt);
1055 THEN_CLAUSE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1055, __FUNCTION__, (IF_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1055, __FUNCTION__)))))
= push_stmt_list ();
1056 return cond;
1057}
1058
1059/* Finish the then-clause of an if-statement, which may be given by
1060 IF_STMT. */
1061
1062tree
1063finish_then_clause (tree if_stmt)
1064{
1065 THEN_CLAUSE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1065, __FUNCTION__, (IF_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1065, __FUNCTION__)))))
= pop_stmt_list (THEN_CLAUSE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1065, __FUNCTION__, (IF_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1065, __FUNCTION__)))))
);
1066 return if_stmt;
1067}
1068
1069/* Begin the else-clause of an if-statement. */
1070
1071void
1072begin_else_clause (tree if_stmt)
1073{
1074 ELSE_CLAUSE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1074, __FUNCTION__, (IF_STMT)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1074, __FUNCTION__)))))
= push_stmt_list ();
1075}
1076
1077/* Finish the else-clause of an if-statement, which may be given by
1078 IF_STMT. */
1079
1080void
1081finish_else_clause (tree if_stmt)
1082{
1083 ELSE_CLAUSE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1083, __FUNCTION__, (IF_STMT)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1083, __FUNCTION__)))))
= pop_stmt_list (ELSE_CLAUSE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1083, __FUNCTION__, (IF_STMT)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1083, __FUNCTION__)))))
);
1084}
1085
1086/* Callback for cp_walk_tree to mark all {VAR,PARM}_DECLs in a tree as
1087 read. */
1088
1089static tree
1090maybe_mark_exp_read_r (tree *tp, int *, void *)
1091{
1092 tree t = *tp;
1093 if (VAR_P (t)(((enum tree_code) (t)->base.code) == VAR_DECL) || TREE_CODE (t)((enum tree_code) (t)->base.code) == PARM_DECL)
1094 mark_exp_read (t);
1095 return NULL_TREE(tree) __null;
1096}
1097
1098/* Finish an if-statement. */
1099
1100void
1101finish_if_stmt (tree if_stmt)
1102{
1103 tree scope = IF_SCOPE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1103, __FUNCTION__, (IF_STMT)))), (3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1103, __FUNCTION__)))))
;
1104 IF_SCOPE (if_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1104, __FUNCTION__, (IF_STMT)))), (3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1104, __FUNCTION__)))))
= NULL__null;
1105 if (IF_STMT_CONSTEXPR_P (if_stmt)((tree_not_check2 (((tree_check ((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1105, __FUNCTION__, (IF_STMT)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1105, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
)
1106 {
1107 /* Prevent various -Wunused warnings. We might not instantiate
1108 either of these branches, so we would not mark the variables
1109 used in that branch as read. */
1110 cp_walk_tree_without_duplicates (&THEN_CLAUSE (if_stmt),walk_tree_without_duplicates_1 (&(*((const_cast<tree*>
(tree_operand_check (((tree_check ((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1110, __FUNCTION__, (IF_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1110, __FUNCTION__))))), maybe_mark_exp_read_r, __null, cp_walk_subtrees
)
1111 maybe_mark_exp_read_r, NULL)walk_tree_without_duplicates_1 (&(*((const_cast<tree*>
(tree_operand_check (((tree_check ((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1110, __FUNCTION__, (IF_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1110, __FUNCTION__))))), maybe_mark_exp_read_r, __null, cp_walk_subtrees
)
;
1112 cp_walk_tree_without_duplicates (&ELSE_CLAUSE (if_stmt),walk_tree_without_duplicates_1 (&(*((const_cast<tree*>
(tree_operand_check (((tree_check ((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1112, __FUNCTION__, (IF_STMT)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1112, __FUNCTION__))))), maybe_mark_exp_read_r, __null, cp_walk_subtrees
)
1113 maybe_mark_exp_read_r, NULL)walk_tree_without_duplicates_1 (&(*((const_cast<tree*>
(tree_operand_check (((tree_check ((if_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1112, __FUNCTION__, (IF_STMT)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1112, __FUNCTION__))))), maybe_mark_exp_read_r, __null, cp_walk_subtrees
)
;
1114 }
1115 add_stmt (do_poplevel (scope));
1116}
1117
1118/* Begin a while-statement. Returns a newly created WHILE_STMT if
1119 appropriate. */
1120
1121tree
1122begin_while_stmt (void)
1123{
1124 tree r;
1125 r = build_stmt (input_location, WHILE_STMT, NULL_TREE(tree) __null, NULL_TREE(tree) __null);
1126 add_stmt (r);
1127 WHILE_BODY (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1127, __FUNCTION__, (WHILE_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1127, __FUNCTION__)))))
= do_pushlevel (sk_block);
1128 begin_cond (&WHILE_COND (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1128, __FUNCTION__, (WHILE_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1128, __FUNCTION__)))))
);
1129 return r;
1130}
1131
1132/* Process the COND of a while-statement, which may be given by
1133 WHILE_STMT. */
1134
1135void
1136finish_while_stmt_cond (tree cond, tree while_stmt, bool ivdep,
1137 unsigned short unroll)
1138{
1139 cond = maybe_convert_cond (cond);
1140 finish_cond (&WHILE_COND (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1140, __FUNCTION__, (WHILE_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1140, __FUNCTION__)))))
, cond);
1141 begin_maybe_infinite_loop (cond);
1142 if (ivdep && cond != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1143 WHILE_COND (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1143, __FUNCTION__, (WHILE_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1143, __FUNCTION__)))))
= build3 (ANNOTATE_EXPR,
1144 TREE_TYPE (WHILE_COND (while_stmt))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
(((tree_check ((while_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1144, __FUNCTION__, (WHILE_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1144, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1144, __FUNCTION__))->typed.type)
,
1145 WHILE_COND (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1145, __FUNCTION__, (WHILE_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1145, __FUNCTION__)))))
,
1146 build_int_cst (integer_type_nodeinteger_types[itk_int],
1147 annot_expr_ivdep_kind),
1148 integer_zero_nodeglobal_trees[TI_INTEGER_ZERO]);
1149 if (unroll && cond != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1150 WHILE_COND (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1150, __FUNCTION__, (WHILE_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1150, __FUNCTION__)))))
= build3 (ANNOTATE_EXPR,
1151 TREE_TYPE (WHILE_COND (while_stmt))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
(((tree_check ((while_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1151, __FUNCTION__, (WHILE_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1151, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1151, __FUNCTION__))->typed.type)
,
1152 WHILE_COND (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1152, __FUNCTION__, (WHILE_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1152, __FUNCTION__)))))
,
1153 build_int_cst (integer_type_nodeinteger_types[itk_int],
1154 annot_expr_unroll_kind),
1155 build_int_cst (integer_type_nodeinteger_types[itk_int],
1156 unroll));
1157 simplify_loop_decl_cond (&WHILE_COND (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1157, __FUNCTION__, (WHILE_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1157, __FUNCTION__)))))
, WHILE_BODY (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1157, __FUNCTION__, (WHILE_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1157, __FUNCTION__)))))
);
1158}
1159
1160/* Finish a while-statement, which may be given by WHILE_STMT. */
1161
1162void
1163finish_while_stmt (tree while_stmt)
1164{
1165 end_maybe_infinite_loop (boolean_true_nodeglobal_trees[TI_BOOLEAN_TRUE]);
1166 WHILE_BODY (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1166, __FUNCTION__, (WHILE_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1166, __FUNCTION__)))))
= do_poplevel (WHILE_BODY (while_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((while_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1166, __FUNCTION__, (WHILE_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1166, __FUNCTION__)))))
);
1167}
1168
1169/* Begin a do-statement. Returns a newly created DO_STMT if
1170 appropriate. */
1171
1172tree
1173begin_do_stmt (void)
1174{
1175 tree r = build_stmt (input_location, DO_STMT, NULL_TREE(tree) __null, NULL_TREE(tree) __null);
1176 begin_maybe_infinite_loop (boolean_true_nodeglobal_trees[TI_BOOLEAN_TRUE]);
1177 add_stmt (r);
1178 DO_BODY (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1178, __FUNCTION__, (DO_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1178, __FUNCTION__)))))
= push_stmt_list ();
1179 return r;
1180}
1181
1182/* Finish the body of a do-statement, which may be given by DO_STMT. */
1183
1184void
1185finish_do_body (tree do_stmt)
1186{
1187 tree body = DO_BODY (do_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((do_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1187, __FUNCTION__, (DO_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1187, __FUNCTION__)))))
= pop_stmt_list (DO_BODY (do_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((do_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1187, __FUNCTION__, (DO_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1187, __FUNCTION__)))))
);
1188
1189 if (TREE_CODE (body)((enum tree_code) (body)->base.code) == STATEMENT_LIST && STATEMENT_LIST_TAIL (body)((tree_check ((body), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1189, __FUNCTION__, (STATEMENT_LIST)))->stmt_list.tail)
)
1190 body = STATEMENT_LIST_TAIL (body)((tree_check ((body), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1190, __FUNCTION__, (STATEMENT_LIST)))->stmt_list.tail)
->stmt;
1191
1192 if (IS_EMPTY_STMT (body)(((enum tree_code) (body)->base.code) == NOP_EXPR &&
(((enum tree_code) (((contains_struct_check ((body), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1192, __FUNCTION__))->typed.type))->base.code) == VOID_TYPE
) && integer_zerop ((*((const_cast<tree*> (tree_operand_check
((body), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1192, __FUNCTION__)))))))
)
1193 warning (OPT_Wempty_body,
1194 "suggest explicit braces around empty body in %<do%> statement");
1195}
1196
1197/* Finish a do-statement, which may be given by DO_STMT, and whose
1198 COND is as indicated. */
1199
1200void
1201finish_do_stmt (tree cond, tree do_stmt, bool ivdep, unsigned short unroll)
1202{
1203 cond = maybe_convert_cond (cond);
1204 end_maybe_infinite_loop (cond);
1205 /* Unlike other iteration statements, the condition may not contain
1206 a declaration, so we don't call finish_cond which checks for
1207 unexpanded parameter packs. */
1208 if (check_for_bare_parameter_packs (cond))
1209 cond = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1210 if (ivdep && cond != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1211 cond = build3 (ANNOTATE_EXPR, TREE_TYPE (cond)((contains_struct_check ((cond), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1211, __FUNCTION__))->typed.type)
, cond,
1212 build_int_cst (integer_type_nodeinteger_types[itk_int], annot_expr_ivdep_kind),
1213 integer_zero_nodeglobal_trees[TI_INTEGER_ZERO]);
1214 if (unroll && cond != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1215 cond = build3 (ANNOTATE_EXPR, TREE_TYPE (cond)((contains_struct_check ((cond), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1215, __FUNCTION__))->typed.type)
, cond,
1216 build_int_cst (integer_type_nodeinteger_types[itk_int], annot_expr_unroll_kind),
1217 build_int_cst (integer_type_nodeinteger_types[itk_int], unroll));
1218 DO_COND (do_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((do_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1218, __FUNCTION__, (DO_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1218, __FUNCTION__)))))
= cond;
1219}
1220
1221/* Finish a return-statement. The EXPRESSION returned, if any, is as
1222 indicated. */
1223
1224tree
1225finish_return_stmt (tree expr)
1226{
1227 tree r;
1228 bool no_warning;
1229
1230 expr = check_return_expr (expr, &no_warning);
1231
1232 if (error_operand_p (expr)
1233 || (flag_openmpglobal_options.x_flag_openmp && !check_omp_return ()))
1234 {
1235 /* Suppress -Wreturn-type for this function. */
1236 if (warn_return_typeglobal_options.x_warn_return_type)
1237 suppress_warning (current_function_decl, OPT_Wreturn_type);
1238 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1239 }
1240
1241 if (!processing_template_declscope_chain->x_processing_template_decl)
1242 {
1243 if (warn_sequence_pointglobal_options.x_warn_sequence_point)
1244 verify_sequence_points (expr);
1245 }
1246
1247 r = build_stmt (input_location, RETURN_EXPR, expr);
1248 if (no_warning)
1249 suppress_warning (r, OPT_Wreturn_type);
1250 r = maybe_cleanup_point_expr_void (r);
1251 r = add_stmt (r);
1252
1253 return r;
1254}
1255
1256/* Begin the scope of a for-statement or a range-for-statement.
1257 Both the returned trees are to be used in a call to
1258 begin_for_stmt or begin_range_for_stmt. */
1259
1260tree
1261begin_for_scope (tree *init)
1262{
1263 tree scope = do_pushlevel (sk_for);
1264
1265 if (processing_template_declscope_chain->x_processing_template_decl)
1266 *init = push_stmt_list ();
1267 else
1268 *init = NULL_TREE(tree) __null;
1269
1270 return scope;
1271}
1272
1273/* Begin a for-statement. Returns a new FOR_STMT.
1274 SCOPE and INIT should be the return of begin_for_scope,
1275 or both NULL_TREE */
1276
1277tree
1278begin_for_stmt (tree scope, tree init)
1279{
1280 tree r;
1281
1282 r = build_stmt (input_location, FOR_STMT, NULL_TREE(tree) __null, NULL_TREE(tree) __null,
1283 NULL_TREE(tree) __null, NULL_TREE(tree) __null, NULL_TREE(tree) __null);
1284
1285 if (scope == NULL_TREE(tree) __null)
1286 {
1287 gcc_assert (!init)((void)(!(!init) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1287, __FUNCTION__), 0 : 0))
;
1288 scope = begin_for_scope (&init);
1289 }
1290
1291 FOR_INIT_STMT (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1291, __FUNCTION__, (FOR_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1291, __FUNCTION__)))))
= init;
1292 FOR_SCOPE (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1292, __FUNCTION__, (FOR_STMT)))), (4), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1292, __FUNCTION__)))))
= scope;
1293
1294 return r;
1295}
1296
1297/* Finish the init-statement of a for-statement, which may be
1298 given by FOR_STMT. */
1299
1300void
1301finish_init_stmt (tree for_stmt)
1302{
1303 if (processing_template_declscope_chain->x_processing_template_decl)
1304 FOR_INIT_STMT (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1304, __FUNCTION__, (FOR_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1304, __FUNCTION__)))))
= pop_stmt_list (FOR_INIT_STMT (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1304, __FUNCTION__, (FOR_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1304, __FUNCTION__)))))
);
1305 add_stmt (for_stmt);
1306 FOR_BODY (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1306, __FUNCTION__, (FOR_STMT)))), (3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1306, __FUNCTION__)))))
= do_pushlevel (sk_block);
1307 begin_cond (&FOR_COND (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1307, __FUNCTION__, (FOR_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1307, __FUNCTION__)))))
);
1308}
1309
1310/* Finish the COND of a for-statement, which may be given by
1311 FOR_STMT. */
1312
1313void
1314finish_for_cond (tree cond, tree for_stmt, bool ivdep, unsigned short unroll)
1315{
1316 cond = maybe_convert_cond (cond);
1317 finish_cond (&FOR_COND (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1317, __FUNCTION__, (FOR_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1317, __FUNCTION__)))))
, cond);
1318 begin_maybe_infinite_loop (cond);
1319 if (ivdep && cond != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1320 FOR_COND (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1320, __FUNCTION__, (FOR_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1320, __FUNCTION__)))))
= build3 (ANNOTATE_EXPR,
1321 TREE_TYPE (FOR_COND (for_stmt))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
(((tree_check ((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1321, __FUNCTION__, (FOR_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1321, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1321, __FUNCTION__))->typed.type)
,
1322 FOR_COND (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1322, __FUNCTION__, (FOR_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1322, __FUNCTION__)))))
,
1323 build_int_cst (integer_type_nodeinteger_types[itk_int],
1324 annot_expr_ivdep_kind),
1325 integer_zero_nodeglobal_trees[TI_INTEGER_ZERO]);
1326 if (unroll && cond != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1327 FOR_COND (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1327, __FUNCTION__, (FOR_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1327, __FUNCTION__)))))
= build3 (ANNOTATE_EXPR,
1328 TREE_TYPE (FOR_COND (for_stmt))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
(((tree_check ((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1328, __FUNCTION__, (FOR_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1328, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1328, __FUNCTION__))->typed.type)
,
1329 FOR_COND (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1329, __FUNCTION__, (FOR_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1329, __FUNCTION__)))))
,
1330 build_int_cst (integer_type_nodeinteger_types[itk_int],
1331 annot_expr_unroll_kind),
1332 build_int_cst (integer_type_nodeinteger_types[itk_int],
1333 unroll));
1334 simplify_loop_decl_cond (&FOR_COND (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1334, __FUNCTION__, (FOR_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1334, __FUNCTION__)))))
, FOR_BODY (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1334, __FUNCTION__, (FOR_STMT)))), (3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1334, __FUNCTION__)))))
);
1335}
1336
1337/* Finish the increment-EXPRESSION in a for-statement, which may be
1338 given by FOR_STMT. */
1339
1340void
1341finish_for_expr (tree expr, tree for_stmt)
1342{
1343 if (!expr)
1344 return;
1345 /* If EXPR is an overloaded function, issue an error; there is no
1346 context available to use to perform overload resolution. */
1347 if (type_unknown_p (expr))
1348 {
1349 cxx_incomplete_type_error (expr, TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1349, __FUNCTION__))->typed.type)
);
1350 expr = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1351 }
1352 if (!processing_template_declscope_chain->x_processing_template_decl)
1353 {
1354 if (warn_sequence_pointglobal_options.x_warn_sequence_point)
1355 verify_sequence_points (expr);
1356 expr = convert_to_void (expr, ICV_THIRD_IN_FOR,
1357 tf_warning_or_error);
1358 }
1359 else if (!type_dependent_expression_p (expr))
1360 convert_to_void (build_non_dependent_expr (expr), ICV_THIRD_IN_FOR,
1361 tf_warning_or_error);
1362 expr = maybe_cleanup_point_expr_void (expr);
1363 if (check_for_bare_parameter_packs (expr))
1364 expr = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1365 FOR_EXPR (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1365, __FUNCTION__, (FOR_STMT)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1365, __FUNCTION__)))))
= expr;
1366}
1367
1368/* Finish the body of a for-statement, which may be given by
1369 FOR_STMT. The increment-EXPR for the loop must be
1370 provided.
1371 It can also finish RANGE_FOR_STMT. */
1372
1373void
1374finish_for_stmt (tree for_stmt)
1375{
1376 end_maybe_infinite_loop (boolean_true_nodeglobal_trees[TI_BOOLEAN_TRUE]);
1377
1378 if (TREE_CODE (for_stmt)((enum tree_code) (for_stmt)->base.code) == RANGE_FOR_STMT)
1379 RANGE_FOR_BODY (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1379, __FUNCTION__, (RANGE_FOR_STMT)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1379, __FUNCTION__)))))
= do_poplevel (RANGE_FOR_BODY (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1379, __FUNCTION__, (RANGE_FOR_STMT)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1379, __FUNCTION__)))))
);
1380 else
1381 FOR_BODY (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1381, __FUNCTION__, (FOR_STMT)))), (3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1381, __FUNCTION__)))))
= do_poplevel (FOR_BODY (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1381, __FUNCTION__, (FOR_STMT)))), (3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1381, __FUNCTION__)))))
);
1382
1383 /* Pop the scope for the body of the loop. */
1384 tree *scope_ptr = (TREE_CODE (for_stmt)((enum tree_code) (for_stmt)->base.code) == RANGE_FOR_STMT
1385 ? &RANGE_FOR_SCOPE (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1385, __FUNCTION__, (RANGE_FOR_STMT)))), (3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1385, __FUNCTION__)))))
1386 : &FOR_SCOPE (for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1386, __FUNCTION__, (FOR_STMT)))), (4), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1386, __FUNCTION__)))))
);
1387 tree scope = *scope_ptr;
1388 *scope_ptr = NULL__null;
1389
1390 /* During parsing of the body, range for uses "__for_{range,begin,end} "
1391 decl names to make those unaccessible by code in the body.
1392 Change it to ones with underscore instead of space, so that it can
1393 be inspected in the debugger. */
1394 tree range_for_decl[3] = { NULL_TREE(tree) __null, NULL_TREE(tree) __null, NULL_TREE(tree) __null };
1395 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 ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1399, __FUNCTION__), 0 : 0))
1396 && 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 ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1399, __FUNCTION__), 0 : 0))
1397 && 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 ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1399, __FUNCTION__), 0 : 0))
1398 && 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 ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1399, __FUNCTION__), 0 : 0))
1399 && 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 ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1399, __FUNCTION__), 0 : 0))
;
1400 for (int i = 0; i < 3; i++)
1401 {
1402 tree id = cp_global_trees[CPTI_FOR_RANGE__IDENTIFIER + i];
1403 if (IDENTIFIER_BINDING (id)(((struct lang_identifier*)(tree_check ((id), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1403, __FUNCTION__, (IDENTIFIER_NODE))))->bindings)
1404 && IDENTIFIER_BINDING (id)(((struct lang_identifier*)(tree_check ((id), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1404, __FUNCTION__, (IDENTIFIER_NODE))))->bindings)
->scope == current_binding_level(*((cfun + 0) && ((cfun + 0)->language) &&
((cfun + 0)->language)->bindings ? &((cfun + 0)->
language)->bindings : &scope_chain->bindings))
)
1405 {
1406 range_for_decl[i] = IDENTIFIER_BINDING (id)(((struct lang_identifier*)(tree_check ((id), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1406, __FUNCTION__, (IDENTIFIER_NODE))))->bindings)
->value;
1407 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1408, __FUNCTION__))->decl_common.artificial_flag)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1408, __FUNCTION__), 0 : 0))
1408 && 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1408, __FUNCTION__))->decl_common.artificial_flag)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1408, __FUNCTION__), 0 : 0))
;
1409 }
1410 }
1411
1412 add_stmt (do_poplevel (scope));
1413
1414 /* If we're being called from build_vec_init, don't mess with the names of
1415 the variables for an enclosing range-for. */
1416 if (!stmts_are_full_exprs_p ())
1417 return;
1418
1419 for (int i = 0; i < 3; i++)
1420 if (range_for_decl[i])
1421 DECL_NAME (range_for_decl[i])((contains_struct_check ((range_for_decl[i]), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1421, __FUNCTION__))->decl_minimal.name)
1422 = cp_global_trees[CPTI_FOR_RANGE_IDENTIFIER + i];
1423}
1424
1425/* Begin a range-for-statement. Returns a new RANGE_FOR_STMT.
1426 SCOPE and INIT should be the return of begin_for_scope,
1427 or both NULL_TREE .
1428 To finish it call finish_for_stmt(). */
1429
1430tree
1431begin_range_for_stmt (tree scope, tree init)
1432{
1433 begin_maybe_infinite_loop (boolean_false_nodeglobal_trees[TI_BOOLEAN_FALSE]);
1434
1435 tree r = build_stmt (input_location, RANGE_FOR_STMT, NULL_TREE(tree) __null, NULL_TREE(tree) __null,
1436 NULL_TREE(tree) __null, NULL_TREE(tree) __null, NULL_TREE(tree) __null, NULL_TREE(tree) __null);
1437
1438 if (scope == NULL_TREE(tree) __null)
1439 {
1440 gcc_assert (!init)((void)(!(!init) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1440, __FUNCTION__), 0 : 0))
;
1441 scope = begin_for_scope (&init);
1442 }
1443
1444 /* Since C++20, RANGE_FOR_STMTs can use the init tree, so save it. */
1445 RANGE_FOR_INIT_STMT (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1445, __FUNCTION__, (RANGE_FOR_STMT)))), (5), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1445, __FUNCTION__)))))
= init;
1446 RANGE_FOR_SCOPE (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1446, __FUNCTION__, (RANGE_FOR_STMT)))), (3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1446, __FUNCTION__)))))
= scope;
1447
1448 return r;
1449}
1450
1451/* Finish the head of a range-based for statement, which may
1452 be given by RANGE_FOR_STMT. DECL must be the declaration
1453 and EXPR must be the loop expression. */
1454
1455void
1456finish_range_for_decl (tree range_for_stmt, tree decl, tree expr)
1457{
1458 if (processing_template_declscope_chain->x_processing_template_decl)
1459 RANGE_FOR_INIT_STMT (range_for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((range_for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1459, __FUNCTION__, (RANGE_FOR_STMT)))), (5), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1459, __FUNCTION__)))))
1460 = pop_stmt_list (RANGE_FOR_INIT_STMT (range_for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((range_for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1460, __FUNCTION__, (RANGE_FOR_STMT)))), (5), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1460, __FUNCTION__)))))
);
1461 RANGE_FOR_DECL (range_for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((range_for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1461, __FUNCTION__, (RANGE_FOR_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1461, __FUNCTION__)))))
= decl;
1462 RANGE_FOR_EXPR (range_for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((range_for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1462, __FUNCTION__, (RANGE_FOR_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1462, __FUNCTION__)))))
= expr;
1463 add_stmt (range_for_stmt);
1464 RANGE_FOR_BODY (range_for_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((range_for_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1464, __FUNCTION__, (RANGE_FOR_STMT)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1464, __FUNCTION__)))))
= do_pushlevel (sk_block);
1465}
1466
1467/* Finish a break-statement. */
1468
1469tree
1470finish_break_stmt (void)
1471{
1472 /* In switch statements break is sometimes stylistically used after
1473 a return statement. This can lead to spurious warnings about
1474 control reaching the end of a non-void function when it is
1475 inlined. Note that we are calling block_may_fallthru with
1476 language specific tree nodes; this works because
1477 block_may_fallthru returns true when given something it does not
1478 understand. */
1479 if (!block_may_fallthru (cur_stmt_list((current_stmt_tree ()->x_cur_stmt_list)->last ())))
1480 return void_nodeglobal_trees[TI_VOID];
1481 note_break_stmt ();
1482 return add_stmt (build_stmt (input_location, BREAK_STMT));
1483}
1484
1485/* Finish a continue-statement. */
1486
1487tree
1488finish_continue_stmt (void)
1489{
1490 return add_stmt (build_stmt (input_location, CONTINUE_STMT));
1491}
1492
1493/* Begin a switch-statement. Returns a new SWITCH_STMT if
1494 appropriate. */
1495
1496tree
1497begin_switch_stmt (void)
1498{
1499 tree r, scope;
1500
1501 scope = do_pushlevel (sk_cond);
1502 r = build_stmt (input_location, SWITCH_STMT, NULL_TREE(tree) __null, NULL_TREE(tree) __null, NULL_TREE(tree) __null, scope);
1503
1504 begin_cond (&SWITCH_STMT_COND (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1504, __FUNCTION__, (SWITCH_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1504, __FUNCTION__)))))
);
1505
1506 return r;
1507}
1508
1509/* Finish the cond of a switch-statement. */
1510
1511void
1512finish_switch_cond (tree cond, tree switch_stmt)
1513{
1514 tree orig_type = NULL__null;
1515
1516 if (!processing_template_declscope_chain->x_processing_template_decl)
1517 {
1518 /* Convert the condition to an integer or enumeration type. */
1519 tree orig_cond = cond;
1520 cond = build_expr_type_conversion (WANT_INT1 | WANT_ENUM4, cond, true);
1521 if (cond == NULL_TREE(tree) __null)
1522 {
1523 error_at (cp_expr_loc_or_input_loc (orig_cond),
1524 "switch quantity not an integer");
1525 cond = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1526 }
1527 /* We want unlowered type here to handle enum bit-fields. */
1528 orig_type = unlowered_expr_type (cond);
1529 if (TREE_CODE (orig_type)((enum tree_code) (orig_type)->base.code) != ENUMERAL_TYPE)
1530 orig_type = TREE_TYPE (cond)((contains_struct_check ((cond), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1530, __FUNCTION__))->typed.type)
;
1531 if (cond != error_mark_nodeglobal_trees[TI_ERROR_MARK])
1532 {
1533 /* [stmt.switch]
1534
1535 Integral promotions are performed. */
1536 cond = perform_integral_promotions (cond);
1537 cond = maybe_cleanup_point_expr (cond);
1538 }
1539 }
1540 if (check_for_bare_parameter_packs (cond))
1541 cond = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1542 else if (!processing_template_declscope_chain->x_processing_template_decl && warn_sequence_pointglobal_options.x_warn_sequence_point)
1543 verify_sequence_points (cond);
1544
1545 finish_cond (&SWITCH_STMT_COND (switch_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((switch_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1545, __FUNCTION__, (SWITCH_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1545, __FUNCTION__)))))
, cond);
1546 SWITCH_STMT_TYPE (switch_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((switch_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1546, __FUNCTION__, (SWITCH_STMT)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1546, __FUNCTION__)))))
= orig_type;
1547 add_stmt (switch_stmt);
1548 push_switch (switch_stmt);
1549 SWITCH_STMT_BODY (switch_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((switch_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1549, __FUNCTION__, (SWITCH_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1549, __FUNCTION__)))))
= push_stmt_list ();
1550}
1551
1552/* Finish the body of a switch-statement, which may be given by
1553 SWITCH_STMT. The COND to switch on is indicated. */
1554
1555void
1556finish_switch_stmt (tree switch_stmt)
1557{
1558 tree scope;
1559
1560 SWITCH_STMT_BODY (switch_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((switch_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1560, __FUNCTION__, (SWITCH_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1560, __FUNCTION__)))))
=
1561 pop_stmt_list (SWITCH_STMT_BODY (switch_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((switch_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1561, __FUNCTION__, (SWITCH_STMT)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1561, __FUNCTION__)))))
);
1562 pop_switch ();
1563
1564 scope = SWITCH_STMT_SCOPE (switch_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((switch_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1564, __FUNCTION__, (SWITCH_STMT)))), (3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1564, __FUNCTION__)))))
;
1565 SWITCH_STMT_SCOPE (switch_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((switch_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1565, __FUNCTION__, (SWITCH_STMT)))), (3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1565, __FUNCTION__)))))
= NULL__null;
1566 add_stmt (do_poplevel (scope));
1567}
1568
1569/* Begin a try-block. Returns a newly-created TRY_BLOCK if
1570 appropriate. */
1571
1572tree
1573begin_try_block (void)
1574{
1575 tree r = build_stmt (input_location, TRY_BLOCK, NULL_TREE(tree) __null, NULL_TREE(tree) __null);
1576 add_stmt (r);
1577 TRY_STMTS (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1577, __FUNCTION__, (TRY_BLOCK)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1577, __FUNCTION__)))))
= push_stmt_list ();
1578 return r;
1579}
1580
1581/* Likewise, for a function-try-block. The block returned in
1582 *COMPOUND_STMT is an artificial outer scope, containing the
1583 function-try-block. */
1584
1585tree
1586begin_function_try_block (tree *compound_stmt)
1587{
1588 tree r;
1589 /* This outer scope does not exist in the C++ standard, but we need
1590 a place to put __FUNCTION__ and similar variables. */
1591 *compound_stmt = begin_compound_stmt (0);
1592 r = begin_try_block ();
1593 FN_TRY_BLOCK_P (r)((tree_not_check2 (((tree_check ((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1593, __FUNCTION__, (TRY_BLOCK)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1593, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3)
= 1;
1594 return r;
1595}
1596
1597/* Finish a try-block, which may be given by TRY_BLOCK. */
1598
1599void
1600finish_try_block (tree try_block)
1601{
1602 TRY_STMTS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1602, __FUNCTION__, (TRY_BLOCK)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1602, __FUNCTION__)))))
= pop_stmt_list (TRY_STMTS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1602, __FUNCTION__, (TRY_BLOCK)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1602, __FUNCTION__)))))
);
1603 TRY_HANDLERS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1603, __FUNCTION__, (TRY_BLOCK)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1603, __FUNCTION__)))))
= push_stmt_list ();
1604}
1605
1606/* Finish the body of a cleanup try-block, which may be given by
1607 TRY_BLOCK. */
1608
1609void
1610finish_cleanup_try_block (tree try_block)
1611{
1612 TRY_STMTS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1612, __FUNCTION__, (TRY_BLOCK)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1612, __FUNCTION__)))))
= pop_stmt_list (TRY_STMTS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1612, __FUNCTION__, (TRY_BLOCK)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1612, __FUNCTION__)))))
);
1613}
1614
1615/* Finish an implicitly generated try-block, with a cleanup is given
1616 by CLEANUP. */
1617
1618void
1619finish_cleanup (tree cleanup, tree try_block)
1620{
1621 TRY_HANDLERS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1621, __FUNCTION__, (TRY_BLOCK)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1621, __FUNCTION__)))))
= cleanup;
1622 CLEANUP_P (try_block)((tree_not_check2 (((tree_check ((try_block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1622, __FUNCTION__, (TRY_BLOCK)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1622, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= 1;
1623}
1624
1625/* Likewise, for a function-try-block. */
1626
1627void
1628finish_function_try_block (tree try_block)
1629{
1630 finish_try_block (try_block);
1631 /* FIXME : something queer about CTOR_INITIALIZER somehow following
1632 the try block, but moving it inside. */
1633 in_function_try_handler((cfun + 0)->language)->x_in_function_try_handler = 1;
1634}
1635
1636/* Finish a handler-sequence for a try-block, which may be given by
1637 TRY_BLOCK. */
1638
1639void
1640finish_handler_sequence (tree try_block)
1641{
1642 TRY_HANDLERS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1642, __FUNCTION__, (TRY_BLOCK)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1642, __FUNCTION__)))))
= pop_stmt_list (TRY_HANDLERS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1642, __FUNCTION__, (TRY_BLOCK)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1642, __FUNCTION__)))))
);
1643 check_handlers (TRY_HANDLERS (try_block)(*((const_cast<tree*> (tree_operand_check (((tree_check
((try_block), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1643, __FUNCTION__, (TRY_BLOCK)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1643, __FUNCTION__)))))
);
1644}
1645
1646/* Finish the handler-seq for a function-try-block, given by
1647 TRY_BLOCK. COMPOUND_STMT is the outer block created by
1648 begin_function_try_block. */
1649
1650void
1651finish_function_handler_sequence (tree try_block, tree compound_stmt)
1652{
1653 in_function_try_handler((cfun + 0)->language)->x_in_function_try_handler = 0;
1654 finish_handler_sequence (try_block);
1655 finish_compound_stmt (compound_stmt);
1656}
1657
1658/* Begin a handler. Returns a HANDLER if appropriate. */
1659
1660tree
1661begin_handler (void)
1662{
1663 tree r;
1664
1665 r = build_stmt (input_location, HANDLER, NULL_TREE(tree) __null, NULL_TREE(tree) __null);
1666 add_stmt (r);
1667
1668 /* Create a binding level for the eh_info and the exception object
1669 cleanup. */
1670 HANDLER_BODY (r)(*((const_cast<tree*> (tree_operand_check (((tree_check
((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1670, __FUNCTION__, (HANDLER)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1670, __FUNCTION__)))))
= do_pushlevel (sk_catch);
1671
1672 return r;
1673}
1674
1675/* Finish the handler-parameters for a handler, which may be given by
1676 HANDLER. DECL is the declaration for the catch parameter, or NULL
1677 if this is a `catch (...)' clause. */
1678
1679void
1680finish_handler_parms (tree decl, tree handler)
1681{
1682 tree type = NULL_TREE(tree) __null;
1683 if (processing_template_declscope_chain->x_processing_template_decl)
1684 {
1685 if (decl)
1686 {
1687 decl = pushdecl (decl);
1688 decl = push_template_decl (decl);
1689 HANDLER_PARMS (handler)(*((const_cast<tree*> (tree_operand_check (((tree_check
((handler), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1689, __FUNCTION__, (HANDLER)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1689, __FUNCTION__)))))
= decl;
1690 type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1690, __FUNCTION__))->typed.type)
;
1691 }
1692 }
1693 else
1694 {
1695 type = expand_start_catch_block (decl);
1696 if (warn_catch_valueglobal_options.x_warn_catch_value
1697 && type != NULL_TREE(tree) __null
1698 && type != error_mark_nodeglobal_trees[TI_ERROR_MARK]
1699 && !TYPE_REF_P (TREE_TYPE (decl))(((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1699, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE
)
)
1700 {
1701 tree orig_type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1701, __FUNCTION__))->typed.type)
;
1702 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1702, __FUNCTION__))->type_common.lang_flag_5))
)
1703 {
1704 if (TYPE_POLYMORPHIC_P (orig_type)(((tree_not_check2 ((orig_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1704, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
)
1705 warning_at (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1705, __FUNCTION__))->decl_minimal.locus)
,
1706 OPT_Wcatch_value_,
1707 "catching polymorphic type %q#T by value",
1708 orig_type);
1709 else if (warn_catch_valueglobal_options.x_warn_catch_value > 1)
1710 warning_at (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1710, __FUNCTION__))->decl_minimal.locus)
,
1711 OPT_Wcatch_value_,
1712 "catching type %q#T by value", orig_type);
1713 }
1714 else if (warn_catch_valueglobal_options.x_warn_catch_value > 2)
1715 warning_at (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1715, __FUNCTION__))->decl_minimal.locus)
,
1716 OPT_Wcatch_value_,
1717 "catching non-reference type %q#T", orig_type);
1718 }
1719 }
1720 HANDLER_TYPE (handler)((contains_struct_check (((tree_check ((handler), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1720, __FUNCTION__, (HANDLER)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1720, __FUNCTION__))->typed.type)
= type;
1721}
1722
1723/* Finish a handler, which may be given by HANDLER. The BLOCKs are
1724 the return value from the matching call to finish_handler_parms. */
1725
1726void
1727finish_handler (tree handler)
1728{
1729 if (!processing_template_declscope_chain->x_processing_template_decl)
1730 expand_end_catch_block ();
1731 HANDLER_BODY (handler)(*((const_cast<tree*> (tree_operand_check (((tree_check
((handler), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1731, __FUNCTION__, (HANDLER)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1731, __FUNCTION__)))))
= do_poplevel (HANDLER_BODY (handler)(*((const_cast<tree*> (tree_operand_check (((tree_check
((handler), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1731, __FUNCTION__, (HANDLER)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1731, __FUNCTION__)))))
);
1732}
1733
1734/* Begin a compound statement. FLAGS contains some bits that control the
1735 behavior and context. If BCS_NO_SCOPE is set, the compound statement
1736 does not define a scope. If BCS_FN_BODY is set, this is the outermost
1737 block of a function. If BCS_TRY_BLOCK is set, this is the block
1738 created on behalf of a TRY statement. Returns a token to be passed to
1739 finish_compound_stmt. */
1740
1741tree
1742begin_compound_stmt (unsigned int flags)
1743{
1744 tree r;
1745
1746 if (flags & BCS_NO_SCOPE)
1747 {
1748 r = push_stmt_list ();
1749 STATEMENT_LIST_NO_SCOPE (r)((tree_not_check2 (((tree_check ((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1749, __FUNCTION__, (STATEMENT_LIST)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1749, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= 1;
1750
1751 /* Normally, we try hard to keep the BLOCK for a statement-expression.
1752 But, if it's a statement-expression with a scopeless block, there's
1753 nothing to keep, and we don't want to accidentally keep a block
1754 *inside* the scopeless block. */
1755 keep_next_level (false);
1756 }
1757 else
1758 {
1759 scope_kind sk = sk_block;
1760 if (flags & BCS_TRY_BLOCK)
1761 sk = sk_try;
1762 else if (flags & BCS_TRANSACTION)
1763 sk = sk_transaction;
1764 else if (flags & BCS_STMT_EXPR)
1765 sk = sk_stmt_expr;
1766 r = do_pushlevel (sk);
1767 }
1768
1769 /* When processing a template, we need to remember where the braces were,
1770 so that we can set up identical scopes when instantiating the template
1771 later. BIND_EXPR is a handy candidate for this.
1772 Note that do_poplevel won't create a BIND_EXPR itself here (and thus
1773 result in nested BIND_EXPRs), since we don't build BLOCK nodes when
1774 processing templates. */
1775 if (processing_template_declscope_chain->x_processing_template_decl)
1776 {
1777 r = build3 (BIND_EXPR, NULL__null, NULL__null, r, NULL__null);
1778 BIND_EXPR_TRY_BLOCK (r)((tree_not_check2 (((tree_check ((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1778, __FUNCTION__, (BIND_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1778, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= (flags & BCS_TRY_BLOCK) != 0;
1779 BIND_EXPR_BODY_BLOCK (r)((tree_not_check2 (((tree_check ((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1779, __FUNCTION__, (BIND_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1779, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3)
= (flags & BCS_FN_BODY) != 0;
1780 TREE_SIDE_EFFECTS (r)((non_type_check ((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1780, __FUNCTION__))->base.side_effects_flag)
= 1;
1781 }
1782
1783 return r;
1784}
1785
1786/* Finish a compound-statement, which is given by STMT. */
1787
1788void
1789finish_compound_stmt (tree stmt)
1790{
1791 if (TREE_CODE (stmt)((enum tree_code) (stmt)->base.code) == BIND_EXPR)
1792 {
1793 tree body = do_poplevel (BIND_EXPR_BODY (stmt)((*((const_cast<tree*> (tree_operand_check (((tree_check
((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1793, __FUNCTION__, (BIND_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1793, __FUNCTION__))))))
);
1794 /* If the STATEMENT_LIST is empty and this BIND_EXPR isn't special,
1795 discard the BIND_EXPR so it can be merged with the containing
1796 STATEMENT_LIST. */
1797 if (TREE_CODE (body)((enum tree_code) (body)->base.code) == STATEMENT_LIST
1798 && STATEMENT_LIST_HEAD (body)((tree_check ((body), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1798, __FUNCTION__, (STATEMENT_LIST)))->stmt_list.head)
== NULL__null
1799 && !BIND_EXPR_BODY_BLOCK (stmt)((tree_not_check2 (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1799, __FUNCTION__, (BIND_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1799, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3)
1800 && !BIND_EXPR_TRY_BLOCK (stmt)((tree_not_check2 (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1800, __FUNCTION__, (BIND_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1800, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
)
1801 stmt = body;
1802 else
1803 BIND_EXPR_BODY (stmt)((*((const_cast<tree*> (tree_operand_check (((tree_check
((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1803, __FUNCTION__, (BIND_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1803, __FUNCTION__))))))
= body;
1804 }
1805 else if (STATEMENT_LIST_NO_SCOPE (stmt)((tree_not_check2 (((tree_check ((stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1805, __FUNCTION__, (STATEMENT_LIST)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1805, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
)
1806 stmt = pop_stmt_list (stmt);
1807 else
1808 {
1809 /* Destroy any ObjC "super" receivers that may have been
1810 created. */
1811 objc_clear_super_receiver ();
1812
1813 stmt = do_poplevel (stmt);
1814 }
1815
1816 /* ??? See c_end_compound_stmt wrt statement expressions. */
1817 add_stmt (stmt);
1818}
1819
1820/* Finish an asm-statement, whose components are a STRING, some
1821 OUTPUT_OPERANDS, some INPUT_OPERANDS, some CLOBBERS and some
1822 LABELS. Also note whether the asm-statement should be
1823 considered volatile, and whether it is asm inline. */
1824
1825tree
1826finish_asm_stmt (location_t loc, int volatile_p, tree string,
1827 tree output_operands, tree input_operands, tree clobbers,
1828 tree labels, bool inline_p)
1829{
1830 tree r;
1831 tree t;
1832 int ninputs = list_length (input_operands);
1833 int noutputs = list_length (output_operands);
1834
1835 if (!processing_template_declscope_chain->x_processing_template_decl)
1836 {
1837 const char *constraint;
1838 const char **oconstraints;
1839 bool allows_mem, allows_reg, is_inout;
1840 tree operand;
1841 int i;
1842
1843 oconstraints = XALLOCAVEC (const char *, noutputs)((const char * *) __builtin_alloca(sizeof (const char *) * (noutputs
)))
;
1844
1845 string = resolve_asm_operand_names (string, output_operands,
1846 input_operands, labels);
1847
1848 for (i = 0, t = output_operands; t; t = TREE_CHAIN (t)((contains_struct_check ((t), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1848, __FUNCTION__))->common.chain)
, ++i)
1849 {
1850 operand = TREE_VALUE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1850, __FUNCTION__, (TREE_LIST)))->list.value)
;
1851
1852 /* ??? Really, this should not be here. Users should be using a
1853 proper lvalue, dammit. But there's a long history of using
1854 casts in the output operands. In cases like longlong.h, this
1855 becomes a primitive form of typechecking -- if the cast can be
1856 removed, then the output operand had a type of the proper width;
1857 otherwise we'll get an error. Gross, but ... */
1858 STRIP_NOPS (operand)(operand) = tree_strip_nop_conversions ((const_cast<union tree_node
*> (((operand)))))
;
1859
1860 operand = mark_lvalue_use (operand);
1861
1862 if (!lvalue_or_else (operand, lv_asm, tf_warning_or_error))
1863 operand = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1864
1865 if (operand != error_mark_nodeglobal_trees[TI_ERROR_MARK]
1866 && (TREE_READONLY (operand)((non_type_check ((operand), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1866, __FUNCTION__))->base.readonly_flag)
1867 || CP_TYPE_CONST_P (TREE_TYPE (operand))((cp_type_quals (((contains_struct_check ((operand), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1867, __FUNCTION__))->typed.type)) & TYPE_QUAL_CONST
) != 0)
1868 /* Functions are not modifiable, even though they are
1869 lvalues. */
1870 || FUNC_OR_METHOD_TYPE_P (TREE_TYPE (operand))(((enum tree_code) (((contains_struct_check ((operand), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1870, __FUNCTION__))->typed.type))->base.code) == FUNCTION_TYPE
|| ((enum tree_code) (((contains_struct_check ((operand), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1870, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE
)
1871 /* If it's an aggregate and any field is const, then it is
1872 effectively const. */
1873 || (CLASS_TYPE_P (TREE_TYPE (operand))(((((enum tree_code) (((contains_struct_check ((operand), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1873, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE
|| (((enum tree_code) (((contains_struct_check ((operand), (
TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1873, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE
) && ((tree_class_check ((((contains_struct_check ((operand
), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1873, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1873, __FUNCTION__))->type_common.lang_flag_5))
1874 && C_TYPE_FIELDS_READONLY (TREE_TYPE (operand))((((tree_class_check ((((contains_struct_check ((operand), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1874, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1874, __FUNCTION__))->type_with_lang_specific.lang_specific
))->fields_readonly)
)))
1875 cxx_readonly_error (loc, operand, lv_asm);
1876
1877 tree *op = &operand;
1878 while (TREE_CODE (*op)((enum tree_code) (*op)->base.code) == COMPOUND_EXPR)
1879 op = &TREE_OPERAND (*op, 1)(*((const_cast<tree*> (tree_operand_check ((*op), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1879, __FUNCTION__)))))
;
1880 switch (TREE_CODE (*op)((enum tree_code) (*op)->base.code))
1881 {
1882 case PREINCREMENT_EXPR:
1883 case PREDECREMENT_EXPR:
1884 case MODIFY_EXPR:
1885 *op = genericize_compound_lvalue (*op);
1886 op = &TREE_OPERAND (*op, 1)(*((const_cast<tree*> (tree_operand_check ((*op), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1886, __FUNCTION__)))))
;
1887 break;
1888 default:
1889 break;
1890 }
1891
1892 constraint = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t)))((const char *)((tree_check ((((tree_check ((((tree_check ((t
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1892, __FUNCTION__, (TREE_LIST)))->list.purpose)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1892, __FUNCTION__, (TREE_LIST)))->list.value)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1892, __FUNCTION__, (STRING_CST)))->string.str))
;
1893 oconstraints[i] = constraint;
1894
1895 if (parse_output_constraint (&constraint, i, ninputs, noutputs,
1896 &allows_mem, &allows_reg, &is_inout))
1897 {
1898 /* If the operand is going to end up in memory,
1899 mark it addressable. */
1900 if (!allows_reg && !cxx_mark_addressable (*op))
1901 operand = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1902 }
1903 else
1904 operand = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1905
1906 TREE_VALUE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1906, __FUNCTION__, (TREE_LIST)))->list.value)
= operand;
1907 }
1908
1909 for (i = 0, t = input_operands; t; ++i, t = TREE_CHAIN (t)((contains_struct_check ((t), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1909, __FUNCTION__))->common.chain)
)
1910 {
1911 constraint = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t)))((const char *)((tree_check ((((tree_check ((((tree_check ((t
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1911, __FUNCTION__, (TREE_LIST)))->list.purpose)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1911, __FUNCTION__, (TREE_LIST)))->list.value)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1911, __FUNCTION__, (STRING_CST)))->string.str))
;
1912 bool constraint_parsed
1913 = parse_input_constraint (&constraint, i, ninputs, noutputs, 0,
1914 oconstraints, &allows_mem, &allows_reg);
1915 /* If the operand is going to end up in memory, don't call
1916 decay_conversion. */
1917 if (constraint_parsed && !allows_reg && allows_mem)
1918 operand = mark_lvalue_use (TREE_VALUE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1918, __FUNCTION__, (TREE_LIST)))->list.value)
);
1919 else
1920 operand = decay_conversion (TREE_VALUE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1920, __FUNCTION__, (TREE_LIST)))->list.value)
, tf_warning_or_error);
1921
1922 /* If the type of the operand hasn't been determined (e.g.,
1923 because it involves an overloaded function), then issue
1924 an error message. There's no context available to
1925 resolve the overloading. */
1926 if (TREE_TYPE (operand)((contains_struct_check ((operand), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1926, __FUNCTION__))->typed.type)
== unknown_type_nodecp_global_trees[CPTI_UNKNOWN_TYPE])
1927 {
1928 error_at (loc,
1929 "type of %<asm%> operand %qE could not be determined",
1930 TREE_VALUE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1930, __FUNCTION__, (TREE_LIST)))->list.value)
);
1931 operand = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1932 }
1933
1934 if (constraint_parsed)
1935 {
1936 /* If the operand is going to end up in memory,
1937 mark it addressable. */
1938 if (!allows_reg && allows_mem)
1939 {
1940 /* Strip the nops as we allow this case. FIXME, this really
1941 should be rejected or made deprecated. */
1942 STRIP_NOPS (operand)(operand) = tree_strip_nop_conversions ((const_cast<union tree_node
*> (((operand)))))
;
1943
1944 tree *op = &operand;
1945 while (TREE_CODE (*op)((enum tree_code) (*op)->base.code) == COMPOUND_EXPR)
1946 op = &TREE_OPERAND (*op, 1)(*((const_cast<tree*> (tree_operand_check ((*op), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1946, __FUNCTION__)))))
;
1947 switch (TREE_CODE (*op)((enum tree_code) (*op)->base.code))
1948 {
1949 case PREINCREMENT_EXPR:
1950 case PREDECREMENT_EXPR:
1951 case MODIFY_EXPR:
1952 *op = genericize_compound_lvalue (*op);
1953 op = &TREE_OPERAND (*op, 1)(*((const_cast<tree*> (tree_operand_check ((*op), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1953, __FUNCTION__)))))
;
1954 break;
1955 default:
1956 break;
1957 }
1958
1959 if (!cxx_mark_addressable (*op))
1960 operand = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1961 }
1962 else if (!allows_reg && !allows_mem)
1963 {
1964 /* If constraint allows neither register nor memory,
1965 try harder to get a constant. */
1966 tree constop = maybe_constant_value (operand);
1967 if (TREE_CONSTANT (constop)((non_type_check ((constop), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1967, __FUNCTION__))->base.constant_flag)
)
1968 operand = constop;
1969 }
1970 }
1971 else
1972 operand = error_mark_nodeglobal_trees[TI_ERROR_MARK];
1973
1974 TREE_VALUE (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1974, __FUNCTION__, (TREE_LIST)))->list.value)
= operand;
1975 }
1976 }
1977
1978 r = build_stmt (loc, ASM_EXPR, string,
1979 output_operands, input_operands,
1980 clobbers, labels);
1981 ASM_VOLATILE_P (r)((tree_check ((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1981, __FUNCTION__, (ASM_EXPR)))->base.public_flag)
= volatile_p || noutputs == 0;
1982 ASM_INLINE_P (r)((tree_check ((r), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 1982, __FUNCTION__, (ASM_EXPR)))->base.protected_flag)
= inline_p;
1983 r = maybe_cleanup_point_expr_void (r);
1984 return add_stmt (r);
1985}
1986
1987/* Finish a label with the indicated NAME. Returns the new label. */
1988
1989tree
1990finish_label_stmt (tree name)
1991{
1992 tree decl = define_label (input_location, name);
1993
1994 if (decl == error_mark_nodeglobal_trees[TI_ERROR_MARK])
1995 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
1996
1997 add_stmt (build_stmt (input_location, LABEL_EXPR, decl));
1998
1999 return decl;
2000}
2001
2002/* Finish a series of declarations for local labels. G++ allows users
2003 to declare "local" labels, i.e., labels with scope. This extension
2004 is useful when writing code involving statement-expressions. */
2005
2006void
2007finish_label_decl (tree name)
2008{
2009 if (!at_function_scope_p ())
2010 {
2011 error ("%<__label__%> declarations are only allowed in function scopes");
2012 return;
2013 }
2014
2015 add_decl_expr (declare_local_label (name));
2016}
2017
2018/* When DECL goes out of scope, make sure that CLEANUP is executed. */
2019
2020void
2021finish_decl_cleanup (tree decl, tree cleanup)
2022{
2023 push_cleanup (decl, cleanup, false);
2024}
2025
2026/* If the current scope exits with an exception, run CLEANUP. */
2027
2028void
2029finish_eh_cleanup (tree cleanup)
2030{
2031 push_cleanup (NULL__null, cleanup, true);
2032}
2033
2034/* The MEM_INITS is a list of mem-initializers, in reverse of the
2035 order they were written by the user. Each node is as for
2036 emit_mem_initializers. */
2037
2038void
2039finish_mem_initializers (tree mem_inits)
2040{
2041 /* Reorder the MEM_INITS so that they are in the order they appeared
2042 in the source program. */
2043 mem_inits = nreverse (mem_inits);
2044
2045 if (processing_template_declscope_chain->x_processing_template_decl)
2046 {
2047 tree mem;
2048
2049 for (mem = mem_inits; mem; mem = TREE_CHAIN (mem)((contains_struct_check ((mem), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2049, __FUNCTION__))->common.chain)
)
2050 {
2051 /* If the TREE_PURPOSE is a TYPE_PACK_EXPANSION, skip the
2052 check for bare parameter packs in the TREE_VALUE, because
2053 any parameter packs in the TREE_VALUE have already been
2054 bound as part of the TREE_PURPOSE. See
2055 make_pack_expansion for more information. */
2056 if (TREE_CODE (TREE_PURPOSE (mem))((enum tree_code) (((tree_check ((mem), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2056, __FUNCTION__, (TREE_LIST)))->list.purpose))->base
.code)
!= TYPE_PACK_EXPANSION
2057 && check_for_bare_parameter_packs (TREE_VALUE (mem)((tree_check ((mem), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2057, __FUNCTION__, (TREE_LIST)))->list.value)
))
2058 TREE_VALUE (mem)((tree_check ((mem), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2058, __FUNCTION__, (TREE_LIST)))->list.value)
= error_mark_nodeglobal_trees[TI_ERROR_MARK];
2059 }
2060
2061 add_stmt (build_min_nt_loc (UNKNOWN_LOCATION((location_t) 0),
2062 CTOR_INITIALIZER, mem_inits));
2063 }
2064 else
2065 emit_mem_initializers (mem_inits);
2066}
2067
2068/* Obfuscate EXPR if it looks like an id-expression or member access so
2069 that the call to finish_decltype in do_auto_deduction will give the
2070 right result. If EVEN_UNEVAL, do this even in unevaluated context. */
2071
2072tree
2073force_paren_expr (tree expr, bool even_uneval)
2074{
2075 /* This is only needed for decltype(auto) in C++14. */
2076 if (cxx_dialect < cxx14)
2077 return expr;
2078
2079 /* If we're in unevaluated context, we can't be deducing a
2080 return/initializer type, so we don't need to mess with this. */
2081 if (cp_unevaluated_operand && !even_uneval)
2082 return expr;
2083
2084 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == COMPONENT_REF
2085 || TREE_CODE (expr)((enum tree_code) (expr)->base.code) == SCOPE_REF
2086 || REFERENCE_REF_P (expr)((((enum tree_code) (expr)->base.code) == INDIRECT_REF) &&
((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
((expr), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2086, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2086, __FUNCTION__))->typed.type) && (((enum tree_code
) (((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
(((expr)), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2086, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2086, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE
))
)
2087 REF_PARENTHESIZED_P (expr)((tree_not_check2 (((tree_check5 (((expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2087, __FUNCTION__, (COMPONENT_REF), (INDIRECT_REF), (SCOPE_REF
), (VIEW_CONVERT_EXPR), (PAREN_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2087, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)
= true;
2088 else if (DECL_P (tree_strip_any_location_wrapper (expr))(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (tree_strip_any_location_wrapper (expr))->base.code))] ==
tcc_declaration)
)
2089 {
2090 location_t loc = cp_expr_location (expr);
2091 const tree_code code = processing_template_declscope_chain->x_processing_template_decl ? PAREN_EXPR
2092 : VIEW_CONVERT_EXPR;
2093 expr = build1_loc (loc, code, TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2093, __FUNCTION__))->typed.type)
, expr);
2094 REF_PARENTHESIZED_P (expr)((tree_not_check2 (((tree_check5 (((expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2094, __FUNCTION__, (COMPONENT_REF), (INDIRECT_REF), (SCOPE_REF
), (VIEW_CONVERT_EXPR), (PAREN_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2094, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)
= true;
2095 }
2096 return expr;
2097}
2098
2099/* If T is an id-expression obfuscated by force_paren_expr, undo the
2100 obfuscation and return the underlying id-expression. Otherwise
2101 return T. */
2102
2103tree
2104maybe_undo_parenthesized_ref (tree t)
2105{
2106 if (cxx_dialect < cxx14)
2107 return t;
2108
2109 if ((TREE_CODE (t)((enum tree_code) (t)->base.code) == PAREN_EXPR || TREE_CODE (t)((enum tree_code) (t)->base.code) == VIEW_CONVERT_EXPR)
2110 && REF_PARENTHESIZED_P (t)((tree_not_check2 (((tree_check5 (((t)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2110, __FUNCTION__, (COMPONENT_REF), (INDIRECT_REF), (SCOPE_REF
), (VIEW_CONVERT_EXPR), (PAREN_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2110, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)
)
2111 t = TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2111, __FUNCTION__)))))
;
2112
2113 return t;
2114}
2115
2116/* Finish a parenthesized expression EXPR. */
2117
2118cp_expr
2119finish_parenthesized_expr (cp_expr expr)
2120{
2121 if (EXPR_P (expr)((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum
tree_code) (expr)->base.code))]) >= tcc_reference &&
(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum
tree_code) (expr)->base.code))]) <= tcc_expression)
)
2122 /* This inhibits warnings in c_common_truthvalue_conversion. */
2123 suppress_warning (expr, OPT_Wparentheses);
2124
2125 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == OFFSET_REF
2126 || TREE_CODE (expr)((enum tree_code) (expr)->base.code) == SCOPE_REF)
2127 /* [expr.unary.op]/3 The qualified id of a pointer-to-member must not be
2128 enclosed in parentheses. */
2129 PTRMEM_OK_P (expr)((tree_not_check2 (((tree_check3 (((expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2129, __FUNCTION__, (ADDR_EXPR), (OFFSET_REF), (SCOPE_REF))
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2129, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= 0;
2130
2131 tree stripped_expr = tree_strip_any_location_wrapper (expr);
2132 if (TREE_CODE (stripped_expr)((enum tree_code) (stripped_expr)->base.code) == STRING_CST)
2133 PAREN_STRING_LITERAL_P (stripped_expr)((tree_not_check2 (((tree_check ((stripped_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2133, __FUNCTION__, (STRING_CST)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2133, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= 1;
2134
2135 expr = cp_expr (force_paren_expr (expr), expr.get_location ());
2136
2137 return expr;
2138}
2139
2140/* Finish a reference to a non-static data member (DECL) that is not
2141 preceded by `.' or `->'. */
2142
2143tree
2144finish_non_static_data_member (tree decl, tree object, tree qualifying_scope,
2145 tsubst_flags_t complain /* = tf_warning_or_error */)
2146{
2147 gcc_assert (TREE_CODE (decl) == FIELD_DECL)((void)(!(((enum tree_code) (decl)->base.code) == FIELD_DECL
) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2147, __FUNCTION__), 0 : 0))
;
2148 bool try_omp_private = !object && omp_private_member_map;
2149 tree ret;
2150
2151 if (!object)
2152 {
2153 tree scope = qualifying_scope;
2154 if (scope == NULL_TREE(tree) __null)
2155 {
2156 scope = context_for_name_lookup (decl);
2157 if (!TYPE_P (scope)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (scope)->base.code))] == tcc_type)
)
2158 {
2159 /* Can happen during error recovery (c++/85014). */
2160 gcc_assert (seen_error ())((void)(!(seen_error ()) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2160, __FUNCTION__), 0 : 0))
;
2161 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2162 }
2163 }
2164 object = maybe_dummy_object (scope, NULL__null);
2165 }
2166
2167 object = maybe_resolve_dummy (object, true);
2168 if (object == error_mark_nodeglobal_trees[TI_ERROR_MARK])
2169 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2170
2171 /* DR 613/850: Can use non-static data members without an associated
2172 object in sizeof/decltype/alignof. */
2173 if (is_dummy_object (object)
2174 && !cp_unevaluated_operand
2175 && (!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))
))
2176 {
2177 if (complain & tf_error)
2178 {
2179 if (current_function_decl
2180 && 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)
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2180, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2180, __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
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2180, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((current_function_decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2180, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2180, __FUNCTION__); &lt->u.fn; })->static_function
)
)
2181 error ("invalid use of member %qD in static member function", decl);
2182 else if (current_function_decl
2183 && processing_contract_conditionscope_chain->x_processing_contract_condition
2184 && 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
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2184, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2184, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
)
)
2185 error ("invalid use of member %qD in constructor %<pre%> contract", decl);
2186 else if (current_function_decl
2187 && processing_contract_conditionscope_chain->x_processing_contract_condition
2188 && 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
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2188, __FUNCTION__, (TEMPLATE_DECL))))))))->result : current_function_decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2188, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
)
2189 error ("invalid use of member %qD in destructor %<post%> contract", decl);
2190 else
2191 error ("invalid use of non-static data member %qD", decl);
2192 inform (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2192, __FUNCTION__))->decl_minimal.locus)
, "declared here");
2193 }
2194
2195 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2196 }
2197
2198 if (current_class_ptr(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun
+ 0)->language)->x_current_class_ptr : &scope_chain
->x_current_class_ptr))
)
2199 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;
2200 if (processing_template_declscope_chain->x_processing_template_decl)
2201 {
2202 tree type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2202, __FUNCTION__))->typed.type)
;
2203
2204 if (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE))
2205 /* Quals on the object don't matter. */;
2206 else if (PACK_EXPANSION_P (type)(((enum tree_code) (type)->base.code) == TYPE_PACK_EXPANSION
|| ((enum tree_code) (type)->base.code) == EXPR_PACK_EXPANSION
)
)
2207 /* Don't bother trying to represent this. */
2208 type = NULL_TREE(tree) __null;
2209 else
2210 {
2211 /* Set the cv qualifiers. */
2212 int quals = cp_type_quals (TREE_TYPE (object)((contains_struct_check ((object), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2212, __FUNCTION__))->typed.type)
);
2213
2214 if (DECL_MUTABLE_P (decl)(((contains_struct_check (((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2214, __FUNCTION__, (FIELD_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2214, __FUNCTION__))->decl_common.lang_flag_0))
)
2215 quals &= ~TYPE_QUAL_CONST;
2216
2217 quals |= cp_type_quals (TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2217, __FUNCTION__))->typed.type)
);
2218 type = cp_build_qualified_type (type, quals);
2219 }
2220
2221 if (qualifying_scope)
2222 /* Wrap this in a SCOPE_REF for now. */
2223 ret = build_qualified_name (type, qualifying_scope, decl,
2224 /*template_p=*/false);
2225 else
2226 ret = (convert_from_reference
2227 (build_min (COMPONENT_REF, type, object, decl, NULL_TREE(tree) __null)));
2228 }
2229 /* If PROCESSING_TEMPLATE_DECL is nonzero here, then
2230 QUALIFYING_SCOPE is also non-null. */
2231 else
2232 {
2233 tree access_type = TREE_TYPE (object)((contains_struct_check ((object), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2233, __FUNCTION__))->typed.type)
;
2234
2235 if (!perform_or_defer_access_check (TYPE_BINFO (access_type)((tree_check3 ((access_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2235, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
, decl,
2236 decl, complain))
2237 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2238
2239 /* If the data member was named `C::M', convert `*this' to `C'
2240 first. */
2241 if (qualifying_scope)
2242 {
2243 tree binfo = NULL_TREE(tree) __null;
2244 object = build_scoped_ref (object, qualifying_scope,
2245 &binfo);
2246 }
2247
2248 ret = build_class_member_access_expr (object, decl,
2249 /*access_path=*/NULL_TREE(tree) __null,
2250 /*preserve_reference=*/false,
2251 complain);
2252 }
2253 if (try_omp_private)
2254 {
2255 tree *v = omp_private_member_map->get (decl);
2256 if (v)
2257 ret = convert_from_reference (*v);
2258 }
2259 return ret;
2260}
2261
2262/* DECL was the declaration to which a qualified-id resolved. Issue
2263 an error message if it is not accessible. If OBJECT_TYPE is
2264 non-NULL, we have just seen `x->' or `x.' and OBJECT_TYPE is the
2265 type of `*x', or `x', respectively. If the DECL was named as
2266 `A::B' then NESTED_NAME_SPECIFIER is `A'. Return value is like
2267 perform_access_checks above. */
2268
2269bool
2270check_accessibility_of_qualified_id (tree decl,
2271 tree object_type,
2272 tree nested_name_specifier,
2273 tsubst_flags_t complain)
2274{
2275 /* If we're not checking, return immediately. */
2276 if (deferred_access_no_check)
2277 return true;
2278
2279 /* Determine the SCOPE of DECL. */
2280 tree scope = context_for_name_lookup (decl);
2281 /* If the SCOPE is not a type, then DECL is not a member. */
2282 if (!TYPE_P (scope)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (scope)->base.code))] == tcc_type)
2283 /* If SCOPE is dependent then we can't perform this access check now,
2284 and since we'll perform this access check again after substitution
2285 there's no need to explicitly defer it. */
2286 || dependent_type_p (scope))
2287 return true;
2288
2289 tree qualifying_type = NULL_TREE(tree) __null;
2290 /* Compute the scope through which DECL is being accessed. */
2291 if (object_type
2292 /* OBJECT_TYPE might not be a class type; consider:
2293
2294 class A { typedef int I; };
2295 I *p;
2296 p->A::I::~I();
2297
2298 In this case, we will have "A::I" as the DECL, but "I" as the
2299 OBJECT_TYPE. */
2300 && 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2300, __FUNCTION__))->type_common.lang_flag_5))
2301 && DERIVED_FROM_P (scope, object_type)(lookup_base ((object_type), (scope), ba_any, __null, tf_none
) != (tree) __null)
)
2302 /* If we are processing a `->' or `.' expression, use the type of the
2303 left-hand side. */
2304 qualifying_type = object_type;
2305 else if (nested_name_specifier)
2306 {
2307 /* If the reference is to a non-static member of the
2308 current class, treat it as if it were referenced through
2309 `this'. */
2310 if (DECL_NONSTATIC_MEMBER_P (decl)((((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2310, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE
) || ((enum tree_code) (decl)->base.code) == FIELD_DECL)
2311 && current_class_ptr(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun
+ 0)->language)->x_current_class_ptr : &scope_chain
->x_current_class_ptr))
)
2312 if (tree current = current_nonlambda_class_type ())
2313 {
2314 if (dependent_type_p (current))
2315 /* In general we can't know whether this access goes through
2316 `this' until instantiation time. Punt now, or else we might
2317 create a deferred access check that's not relative to `this'
2318 when it ought to be. We'll check this access again after
2319 substitution, e.g. from tsubst_qualified_id. */
2320 return true;
2321
2322 if (DERIVED_FROM_P (scope, current)(lookup_base ((current), (scope), ba_any, __null, tf_none) !=
(tree) __null)
)
2323 qualifying_type = current;
2324 }
2325 /* Otherwise, use the type indicated by the
2326 nested-name-specifier. */
2327 if (!qualifying_type)
2328 qualifying_type = nested_name_specifier;
2329 }
2330 else
2331 /* Otherwise, the name must be from the current class or one of
2332 its bases. */
2333 qualifying_type = currently_open_derived_class (scope);
2334
2335 if (qualifying_type
2336 /* It is possible for qualifying type to be a TEMPLATE_TYPE_PARM
2337 or similar in a default argument value. */
2338 && 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
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2338, __FUNCTION__))->type_common.lang_flag_5))
)
2339 return perform_or_defer_access_check (TYPE_BINFO (qualifying_type)((tree_check3 ((qualifying_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2339, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
, decl,
2340 decl, complain);
2341
2342 return true;
2343}
2344
2345/* EXPR is the result of a qualified-id. The QUALIFYING_CLASS was the
2346 class named to the left of the "::" operator. DONE is true if this
2347 expression is a complete postfix-expression; it is false if this
2348 expression is followed by '->', '[', '(', etc. ADDRESS_P is true
2349 iff this expression is the operand of '&'. TEMPLATE_P is true iff
2350 the qualified-id was of the form "A::template B". TEMPLATE_ARG_P
2351 is true iff this qualified name appears as a template argument. */
2352
2353tree
2354finish_qualified_id_expr (tree qualifying_class,
2355 tree expr,
2356 bool done,
2357 bool address_p,
2358 bool template_p,
2359 bool template_arg_p,
2360 tsubst_flags_t complain)
2361{
2362 gcc_assert (TYPE_P (qualifying_class))((void)(!((tree_code_type_tmpl <0>::tree_code_type[(int
) (((enum tree_code) (qualifying_class)->base.code))] == tcc_type
)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2362, __FUNCTION__), 0 : 0))
;
2363
2364 if (error_operand_p (expr))
2365 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2366
2367 if (DECL_P (expr)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (expr)->base.code))] == tcc_declaration)
2368 /* Functions are marked after overload resolution; avoid redundant
2369 warnings. */
2370 && TREE_CODE (expr)((enum tree_code) (expr)->base.code) != FUNCTION_DECL
2371 && !mark_used (expr, complain))
2372 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2373
2374 if (template_p)
2375 {
2376 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == UNBOUND_CLASS_TEMPLATE)
2377 {
2378 /* cp_parser_lookup_name thought we were looking for a type,
2379 but we're actually looking for a declaration. */
2380 qualifying_class = TYPE_CONTEXT (expr)((tree_class_check ((expr), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2380, __FUNCTION__))->type_common.context)
;
2381 expr = TYPE_IDENTIFIER (expr)(((tree_class_check ((expr), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2381, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((expr), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2381, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((expr), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2381, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2381, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((expr), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2381, __FUNCTION__))->type_common.name))
;
2382 }
2383 else
2384 check_template_keyword (expr);
2385 }
2386
2387 /* If EXPR occurs as the operand of '&', use special handling that
2388 permits a pointer-to-member. */
2389 if (address_p && done
2390 && TREE_CODE (qualifying_class)((enum tree_code) (qualifying_class)->base.code) != ENUMERAL_TYPE)
2391 {
2392 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == SCOPE_REF)
2393 expr = TREE_OPERAND (expr, 1)(*((const_cast<tree*> (tree_operand_check ((expr), (1),
"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2393, __FUNCTION__)))))
;
2394 expr = build_offset_ref (qualifying_class, expr,
2395 /*address_p=*/true, complain);
2396 return expr;
2397 }
2398
2399 /* No need to check access within an enum. */
2400 if (TREE_CODE (qualifying_class)((enum tree_code) (qualifying_class)->base.code) == ENUMERAL_TYPE
2401 && TREE_CODE (expr)((enum tree_code) (expr)->base.code) != IDENTIFIER_NODE)
2402 return expr;
2403
2404 /* Within the scope of a class, turn references to non-static
2405 members into expression of the form "this->...". */
2406 if (template_arg_p)
2407 /* But, within a template argument, we do not want make the
2408 transformation, as there is no "this" pointer. */
2409 ;
2410 else if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == FIELD_DECL)
2411 {
2412 push_deferring_access_checks (dk_no_check);
2413 expr = finish_non_static_data_member (expr, NULL_TREE(tree) __null,
2414 qualifying_class, complain);
2415 pop_deferring_access_checks ();
2416 }
2417 else if (BASELINK_P (expr)(((enum tree_code) (expr)->base.code) == BASELINK))
2418 {
2419 /* See if any of the functions are non-static members. */
2420 /* If so, the expression may be relative to 'this'. */
2421 if (!shared_member_p (expr)
2422 && current_class_ptr(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun
+ 0)->language)->x_current_class_ptr : &scope_chain
->x_current_class_ptr))
2423 && DERIVED_FROM_P (qualifying_class,(lookup_base ((current_nonlambda_class_type ()), (qualifying_class
), ba_any, __null, tf_none) != (tree) __null)
2424 current_nonlambda_class_type ())(lookup_base ((current_nonlambda_class_type ()), (qualifying_class
), ba_any, __null, tf_none) != (tree) __null)
)
2425 expr = (build_class_member_access_expr
2426 (maybe_dummy_object (qualifying_class, NULL__null),
2427 expr,
2428 BASELINK_ACCESS_BINFO (expr)(((struct tree_baselink*) (tree_check ((expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2428, __FUNCTION__, (BASELINK))))->access_binfo)
,
2429 /*preserve_reference=*/false,
2430 complain));
2431 else if (done)
2432 /* The expression is a qualified name whose address is not
2433 being taken. */
2434 expr = build_offset_ref (qualifying_class, expr, /*address_p=*/false,
2435 complain);
2436 }
2437 else if (!template_p
2438 && TREE_CODE (expr)((enum tree_code) (expr)->base.code) == TEMPLATE_DECL
2439 && !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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2439, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((expr
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2439, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)
)
2440 {
2441 if (complain & tf_error)
2442 error ("%qE missing template arguments", expr);
2443 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2444 }
2445 else
2446 {
2447 /* In a template, return a SCOPE_REF for most qualified-ids
2448 so that we can check access at instantiation time. But if
2449 we're looking at a member of the current instantiation, we
2450 know we have access and building up the SCOPE_REF confuses
2451 non-type template argument handling. */
2452 if (processing_template_declscope_chain->x_processing_template_decl
2453 && (!currently_open_class (qualifying_class)
2454 || TREE_CODE (expr)((enum tree_code) (expr)->base.code) == IDENTIFIER_NODE
2455 || TREE_CODE (expr)((enum tree_code) (expr)->base.code) == TEMPLATE_ID_EXPR
2456 || TREE_CODE (expr)((enum tree_code) (expr)->base.code) == BIT_NOT_EXPR))
2457 expr = build_qualified_name (TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2457, __FUNCTION__))->typed.type)
,
2458 qualifying_class, expr,
2459 template_p);
2460 else if (tree wrap = maybe_get_tls_wrapper_call (expr))
2461 expr = wrap;
2462
2463 expr = convert_from_reference (expr);
2464 }
2465
2466 return expr;
2467}
2468
2469/* Begin a statement-expression. The value returned must be passed to
2470 finish_stmt_expr. */
2471
2472tree
2473begin_stmt_expr (void)
2474{
2475 return push_stmt_list ();
2476}
2477
2478/* Process the final expression of a statement expression. EXPR can be
2479 NULL, if the final expression is empty. Return a STATEMENT_LIST
2480 containing all the statements in the statement-expression, or
2481 ERROR_MARK_NODE if there was an error. */
2482
2483tree
2484finish_stmt_expr_expr (tree expr, tree stmt_expr)
2485{
2486 if (error_operand_p (expr))
2487 {
2488 /* The type of the statement-expression is the type of the last
2489 expression. */
2490 TREE_TYPE (stmt_expr)((contains_struct_check ((stmt_expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2490, __FUNCTION__))->typed.type)
= error_mark_nodeglobal_trees[TI_ERROR_MARK];
2491 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2492 }
2493
2494 /* If the last statement does not have "void" type, then the value
2495 of the last statement is the value of the entire expression. */
2496 if (expr)
2497 {
2498 tree type = TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2498, __FUNCTION__))->typed.type)
;
2499
2500 if (type && type_unknown_p (type))
2501 {
2502 error ("a statement expression is an insufficient context"
2503 " for overload resolution");
2504 TREE_TYPE (stmt_expr)((contains_struct_check ((stmt_expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2504, __FUNCTION__))->typed.type)
= error_mark_nodeglobal_trees[TI_ERROR_MARK];
2505 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2506 }
2507 else if (processing_template_declscope_chain->x_processing_template_decl)
2508 {
2509 expr = build_stmt (input_location, EXPR_STMT, expr);
2510 expr = add_stmt (expr);
2511 /* Mark the last statement so that we can recognize it as such at
2512 template-instantiation time. */
2513 EXPR_STMT_STMT_EXPR_RESULT (expr)((tree_not_check2 (((tree_check ((expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2513, __FUNCTION__, (EXPR_STMT)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2513, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= 1;
2514 }
2515 else if (VOID_TYPE_P (type)(((enum tree_code) (type)->base.code) == VOID_TYPE))
2516 {
2517 /* Just treat this like an ordinary statement. */
2518 expr = finish_expr_stmt (expr);
2519 }
2520 else
2521 {
2522 /* It actually has a value we need to deal with. First, force it
2523 to be an rvalue so that we won't need to build up a copy
2524 constructor call later when we try to assign it to something. */
2525 expr = force_rvalue (expr, tf_warning_or_error);
2526 if (error_operand_p (expr))
2527 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2528
2529 /* Update for array-to-pointer decay. */
2530 type = TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2530, __FUNCTION__))->typed.type)
;
2531
2532 /* This TARGET_EXPR will initialize the outer one added by
2533 finish_stmt_expr. */
2534 set_target_expr_eliding (expr);
2535
2536 /* Wrap it in a CLEANUP_POINT_EXPR and add it to the list like a
2537 normal statement, but don't convert to void or actually add
2538 the EXPR_STMT. */
2539 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) != CLEANUP_POINT_EXPR)
2540 expr = maybe_cleanup_point_expr (expr);
2541 add_stmt (expr);
2542 }
2543
2544 /* The type of the statement-expression is the type of the last
2545 expression. */
2546 TREE_TYPE (stmt_expr)((contains_struct_check ((stmt_expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2546, __FUNCTION__))->typed.type)
= type;
2547 }
2548
2549 return stmt_expr;
2550}
2551
2552/* Finish a statement-expression. EXPR should be the value returned
2553 by the previous begin_stmt_expr. Returns an expression
2554 representing the statement-expression. */
2555
2556tree
2557finish_stmt_expr (tree stmt_expr, bool has_no_scope)
2558{
2559 tree type;
2560 tree result;
2561
2562 if (error_operand_p (stmt_expr))
2563 {
2564 pop_stmt_list (stmt_expr);
2565 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2566 }
2567
2568 gcc_assert (TREE_CODE (stmt_expr) == STATEMENT_LIST)((void)(!(((enum tree_code) (stmt_expr)->base.code) == STATEMENT_LIST
) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2568, __FUNCTION__), 0 : 0))
;
2569
2570 type = TREE_TYPE (stmt_expr)((contains_struct_check ((stmt_expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2570, __FUNCTION__))->typed.type)
;
2571 result = pop_stmt_list (stmt_expr);
2572 TREE_TYPE (result)((contains_struct_check ((result), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2572, __FUNCTION__))->typed.type)
= type;
2573
2574 if (processing_template_declscope_chain->x_processing_template_decl)
2575 {
2576 result = build_min (STMT_EXPR, type, result);
2577 TREE_SIDE_EFFECTS (result)((non_type_check ((result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2577, __FUNCTION__))->base.side_effects_flag)
= 1;
2578 STMT_EXPR_NO_SCOPE (result)((tree_not_check2 (((tree_check ((result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2578, __FUNCTION__, (STMT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2578, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= has_no_scope;
2579 }
2580 else if (CLASS_TYPE_P (type)(((((enum tree_code) (type)->base.code)) == RECORD_TYPE ||
(((enum tree_code) (type)->base.code)) == UNION_TYPE) &&
((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2580, __FUNCTION__))->type_common.lang_flag_5))
)
2581 {
2582 /* Wrap the statement-expression in a TARGET_EXPR so that the
2583 temporary object created by the final expression is destroyed at
2584 the end of the full-expression containing the
2585 statement-expression. */
2586 result = force_target_expr (type, result, tf_warning_or_error);
2587 }
2588
2589 return result;
2590}
2591
2592/* Returns the expression which provides the value of STMT_EXPR. */
2593
2594tree
2595stmt_expr_value_expr (tree stmt_expr)
2596{
2597 tree t = STMT_EXPR_STMT (stmt_expr)(*((const_cast<tree*> (tree_operand_check (((tree_check
((stmt_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2597, __FUNCTION__, (STMT_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2597, __FUNCTION__)))))
;
2598
2599 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == BIND_EXPR)
2600 t = BIND_EXPR_BODY (t)((*((const_cast<tree*> (tree_operand_check (((tree_check
((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2600, __FUNCTION__, (BIND_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2600, __FUNCTION__))))))
;
2601
2602 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == STATEMENT_LIST && STATEMENT_LIST_TAIL (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2602, __FUNCTION__, (STATEMENT_LIST)))->stmt_list.tail)
)
2603 t = STATEMENT_LIST_TAIL (t)((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2603, __FUNCTION__, (STATEMENT_LIST)))->stmt_list.tail)
->stmt;
2604
2605 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == EXPR_STMT)
2606 t = EXPR_STMT_EXPR (t)(*((const_cast<tree*> (tree_operand_check (((tree_check
((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2606, __FUNCTION__, (EXPR_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2606, __FUNCTION__)))))
;
2607
2608 return t;
2609}
2610
2611/* Return TRUE iff EXPR_STMT is an empty list of
2612 expression statements. */
2613
2614bool
2615empty_expr_stmt_p (tree expr_stmt)
2616{
2617 tree body = NULL_TREE(tree) __null;
2618
2619 if (expr_stmt == void_nodeglobal_trees[TI_VOID])
2620 return true;
2621
2622 if (expr_stmt)
2623 {
2624 if (TREE_CODE (expr_stmt)((enum tree_code) (expr_stmt)->base.code) == EXPR_STMT)
2625 body = EXPR_STMT_EXPR (expr_stmt)(*((const_cast<tree*> (tree_operand_check (((tree_check
((expr_stmt), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2625, __FUNCTION__, (EXPR_STMT)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2625, __FUNCTION__)))))
;
2626 else if (TREE_CODE (expr_stmt)((enum tree_code) (expr_stmt)->base.code) == STATEMENT_LIST)
2627 body = expr_stmt;
2628 }
2629
2630 if (body)
2631 {
2632 if (TREE_CODE (body)((enum tree_code) (body)->base.code) == STATEMENT_LIST)
2633 return tsi_end_p (tsi_start (body));
2634 else
2635 return empty_expr_stmt_p (body);
2636 }
2637 return false;
2638}
2639
2640/* Perform Koenig lookup. FN_EXPR is the postfix-expression representing
2641 the function (or functions) to call; ARGS are the arguments to the
2642 call. Returns the functions to be considered by overload resolution. */
2643
2644cp_expr
2645perform_koenig_lookup (cp_expr fn_expr, vec<tree, va_gc> *args,
2646 tsubst_flags_t complain)
2647{
2648 tree identifier = NULL_TREE(tree) __null;
2649 tree functions = NULL_TREE(tree) __null;
2650 tree tmpl_args = NULL_TREE(tree) __null;
2651 bool template_id = false;
2652 location_t loc = fn_expr.get_location ();
2653 tree fn = fn_expr.get_value ();
2654
2655 STRIP_ANY_LOCATION_WRAPPER (fn)(fn) = tree_strip_any_location_wrapper ((const_cast<union tree_node
*> (((fn)))))
;
2656
2657 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == TEMPLATE_ID_EXPR)
2658 {
2659 /* Use a separate flag to handle null args. */
2660 template_id = true;
2661 tmpl_args = TREE_OPERAND (fn, 1)(*((const_cast<tree*> (tree_operand_check ((fn), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2661, __FUNCTION__)))))
;
2662 fn = TREE_OPERAND (fn, 0)(*((const_cast<tree*> (tree_operand_check ((fn), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2662, __FUNCTION__)))))
;
2663 }
2664
2665 /* Find the name of the overloaded function. */
2666 if (identifier_p (fn))
2667 identifier = fn;
2668 else
2669 {
2670 functions = fn;
2671 identifier = OVL_NAME (functions)((contains_struct_check ((ovl_first (functions)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2671, __FUNCTION__))->decl_minimal.name)
;
2672 }
2673
2674 /* A call to a namespace-scope function using an unqualified name.
2675
2676 Do Koenig lookup -- unless any of the arguments are
2677 type-dependent. */
2678 if (!any_type_dependent_arguments_p (args)
2679 && !any_dependent_template_arguments_p (tmpl_args))
2680 {
2681 fn = lookup_arg_dependent (identifier, functions, args);
2682 if (!fn)
2683 {
2684 /* The unqualified name could not be resolved. */
2685 if (complain & tf_error)
2686 fn = unqualified_fn_lookup_error (cp_expr (identifier, loc));
2687 else
2688 fn = identifier;
2689 }
2690 }
2691
2692 if (fn && template_id && fn != error_mark_nodeglobal_trees[TI_ERROR_MARK])
2693 fn = build2 (TEMPLATE_ID_EXPR, unknown_type_nodecp_global_trees[CPTI_UNKNOWN_TYPE], fn, tmpl_args);
2694
2695 return cp_expr (fn, loc);
2696}
2697
2698/* Generate an expression for `FN (ARGS)'. This may change the
2699 contents of ARGS.
2700
2701 If DISALLOW_VIRTUAL is true, the call to FN will be not generated
2702 as a virtual call, even if FN is virtual. (This flag is set when
2703 encountering an expression where the function name is explicitly
2704 qualified. For example a call to `X::f' never generates a virtual
2705 call.)
2706
2707 Returns code for the call. */
2708
2709tree
2710finish_call_expr (tree fn, vec<tree, va_gc> **args, bool disallow_virtual,
2711 bool koenig_p, tsubst_flags_t complain)
2712{
2713 tree result;
2714 tree orig_fn;
2715 vec<tree, va_gc> *orig_args = *args;
2716
2717 if (fn == error_mark_nodeglobal_trees[TI_ERROR_MARK])
2718 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2719
2720 gcc_assert (!TYPE_P (fn))((void)(!(!(tree_code_type_tmpl <0>::tree_code_type[(int
) (((enum tree_code) (fn)->base.code))] == tcc_type)) ? fancy_abort
("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2720, __FUNCTION__), 0 : 0))
;
2721
2722 /* If FN may be a FUNCTION_DECL obfuscated by force_paren_expr, undo
2723 it so that we can tell this is a call to a known function. */
2724 fn = maybe_undo_parenthesized_ref (fn);
2725
2726 STRIP_ANY_LOCATION_WRAPPER (fn)(fn) = tree_strip_any_location_wrapper ((const_cast<union tree_node
*> (((fn)))))
;
2727
2728 orig_fn = fn;
2729
2730 if (processing_template_declscope_chain->x_processing_template_decl)
2731 {
2732 /* If FN is a local extern declaration (or set thereof) in a template,
2733 look it up again at instantiation time. */
2734 if (is_overloaded_fn (fn))
2735 {
2736 tree ifn = get_first_fn (fn);
2737 if (TREE_CODE (ifn)((enum tree_code) (ifn)->base.code) == FUNCTION_DECL
2738 && dependent_local_decl_p (ifn))
2739 orig_fn = DECL_NAME (ifn)((contains_struct_check ((ifn), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2739, __FUNCTION__))->decl_minimal.name)
;
2740 }
2741
2742 /* If the call expression is dependent, build a CALL_EXPR node
2743 with no type; type_dependent_expression_p recognizes
2744 expressions with no type as being dependent. */
2745 if (type_dependent_expression_p (fn)
2746 || any_type_dependent_arguments_p (*args))
2747 {
2748 result = build_min_nt_call_vec (orig_fn, *args);
2749 SET_EXPR_LOCATION (result, cp_expr_loc_or_input_loc (fn))(expr_check (((result)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2749, __FUNCTION__))->exp.locus = (cp_expr_loc_or_input_loc
(fn))
;
2750 KOENIG_LOOKUP_P (result)((tree_not_check2 (((tree_check ((result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2750, __FUNCTION__, (CALL_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2750, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= koenig_p;
2751 /* Disable the std::move warnings since this call was dependent
2752 (c++/89780, c++/107363). This also suppresses the
2753 -Wredundant-move warning. */
2754 suppress_warning (result, OPT_Wpessimizing_move);
2755 if (is_overloaded_fn (fn))
2756 fn = get_fns (fn);
2757
2758 if (cfun(cfun + 0))
2759 {
2760 bool abnormal = true;
2761 for (lkp_iterator iter (fn); abnormal && iter; ++iter)
2762 {
2763 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2763, __FUNCTION__, (TEMPLATE_DECL))))))))->result : *iter
)
;
2764 if (TREE_CODE (fndecl)((enum tree_code) (fndecl)->base.code) != FUNCTION_DECL
2765 || !TREE_THIS_VOLATILE (fndecl)((fndecl)->base.volatile_flag))
2766 abnormal = false;
2767 }
2768 /* FIXME: Stop warning about falling off end of non-void
2769 function. But this is wrong. Even if we only see
2770 no-return fns at this point, we could select a
2771 future-defined return fn during instantiation. Or
2772 vice-versa. */
2773 if (abnormal)
2774 current_function_returns_abnormally((cfun + 0)->language)->returns_abnormally = 1;
2775 }
2776 return result;
2777 }
2778 orig_args = make_tree_vector_copy (*args);
2779 if (!BASELINK_P (fn)(((enum tree_code) (fn)->base.code) == BASELINK)
2780 && TREE_CODE (fn)((enum tree_code) (fn)->base.code) != PSEUDO_DTOR_EXPR
2781 && TREE_TYPE (fn)((contains_struct_check ((fn), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2781, __FUNCTION__))->typed.type)
!= unknown_type_nodecp_global_trees[CPTI_UNKNOWN_TYPE])
2782 fn = build_non_dependent_expr (fn);
2783 make_args_non_dependent (*args);
2784 }
2785
2786 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == COMPONENT_REF)
2787 {
2788 tree member = TREE_OPERAND (fn, 1)(*((const_cast<tree*> (tree_operand_check ((fn), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2788, __FUNCTION__)))))
;
2789 if (BASELINK_P (member)(((enum tree_code) (member)->base.code) == BASELINK))
2790 {
2791 tree object = TREE_OPERAND (fn, 0)(*((const_cast<tree*> (tree_operand_check ((fn), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2791, __FUNCTION__)))))
;
2792 return build_new_method_call (object, member,
2793 args, NULL_TREE(tree) __null,
2794 (disallow_virtual
2795 ? LOOKUP_NORMAL((1 << 0)) | LOOKUP_NONVIRTUAL(1 << 1)
2796 : LOOKUP_NORMAL((1 << 0))),
2797 /*fn_p=*/NULL__null,
2798 complain);
2799 }
2800 }
2801
2802 /* Per 13.3.1.1, '(&f)(...)' is the same as '(f)(...)'. */
2803 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == ADDR_EXPR
2804 && TREE_CODE (TREE_OPERAND (fn, 0))((enum tree_code) ((*((const_cast<tree*> (tree_operand_check
((fn), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2804, __FUNCTION__))))))->base.code)
== OVERLOAD)
2805 fn = TREE_OPERAND (fn, 0)(*((const_cast<tree*> (tree_operand_check ((fn), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2805, __FUNCTION__)))))
;
2806
2807 if (is_overloaded_fn (fn))
2808 fn = baselink_for_fns (fn);
2809
2810 result = NULL_TREE(tree) __null;
2811 if (BASELINK_P (fn)(((enum tree_code) (fn)->base.code) == BASELINK))
2812 {
2813 tree object;
2814
2815 /* A call to a member function. From [over.call.func]:
2816
2817 If the keyword this is in scope and refers to the class of
2818 that member function, or a derived class thereof, then the
2819 function call is transformed into a qualified function call
2820 using (*this) as the postfix-expression to the left of the
2821 . operator.... [Otherwise] a contrived object of type T
2822 becomes the implied object argument.
2823
2824 In this situation:
2825
2826 struct A { void f(); };
2827 struct B : public A {};
2828 struct C : public A { void g() { B::f(); }};
2829
2830 "the class of that member function" refers to `A'. But 11.2
2831 [class.access.base] says that we need to convert 'this' to B* as
2832 part of the access, so we pass 'B' to maybe_dummy_object. */
2833
2834 if (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (get_first_fn (fn))(((contains_struct_check ((get_first_fn (fn)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2834, __FUNCTION__))->decl_minimal.name) == cp_global_trees
[CPTI_CTOR_IDENTIFIER])
)
2835 {
2836 /* A constructor call always uses a dummy object. (This constructor
2837 call which has the form A::A () is actually invalid and we are
2838 going to reject it later in build_new_method_call.) */
2839 object = build_dummy_object (BINFO_TYPE (BASELINK_ACCESS_BINFO (fn))((contains_struct_check (((tree_check (((((struct tree_baselink
*) (tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2839, __FUNCTION__, (BASELINK))))->access_binfo)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2839, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2839, __FUNCTION__))->typed.type)
);
2840 }
2841 else
2842 object = maybe_dummy_object (BINFO_TYPE (BASELINK_ACCESS_BINFO (fn))((contains_struct_check (((tree_check (((((struct tree_baselink
*) (tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2842, __FUNCTION__, (BASELINK))))->access_binfo)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2842, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2842, __FUNCTION__))->typed.type)
,
2843 NULL__null);
2844
2845 result = build_new_method_call (object, fn, args, NULL_TREE(tree) __null,
2846 (disallow_virtual
2847 ? LOOKUP_NORMAL((1 << 0))|LOOKUP_NONVIRTUAL(1 << 1)
2848 : LOOKUP_NORMAL((1 << 0))),
2849 /*fn_p=*/NULL__null,
2850 complain);
2851 }
2852 else if (concept_check_p (fn))
2853 {
2854 /* FN is actually a template-id referring to a concept definition. */
2855 tree id = unpack_concept_check (fn);
2856 tree tmpl = TREE_OPERAND (id, 0)(*((const_cast<tree*> (tree_operand_check ((id), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2856, __FUNCTION__)))))
;
2857 tree args = TREE_OPERAND (id, 1)(*((const_cast<tree*> (tree_operand_check ((id), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2857, __FUNCTION__)))))
;
2858
2859 if (!function_concept_p (tmpl))
2860 {
2861 error_at (EXPR_LOC_OR_LOC (fn, input_location)((((IS_ADHOC_LOC (((((fn)) && ((tree_code_type_tmpl <
0>::tree_code_type[(int) (((enum tree_code) ((fn))->base
.code))]) >= tcc_reference && (tree_code_type_tmpl
<0>::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_tmpl <0>::tree_code_type
[(int) (((enum tree_code) ((fn))->base.code))]) >= tcc_reference
&& (tree_code_type_tmpl <0>::tree_code_type[(int
) (((enum tree_code) ((fn))->base.code))]) <= tcc_expression
)) ? (fn)->exp.locus : ((location_t) 0))) : (((((fn)) &&
((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum
tree_code) ((fn))->base.code))]) >= tcc_reference &&
(tree_code_type_tmpl <0>::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))
,
2862 "cannot call a concept as a function");
2863 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
2864 }
2865
2866 /* Ensure the result is wrapped as a call expression. */
2867 result = build_concept_check (tmpl, args, tf_warning_or_error);
2868 }
2869 else if (is_overloaded_fn (fn))
2870 {
2871 /* If the function is an overloaded builtin, resolve it. */
2872 if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == FUNCTION_DECL
2873 && (DECL_BUILT_IN_CLASS (fn)((built_in_class) (tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2873, __FUNCTION__, (FUNCTION_DECL)))->function_decl.built_in_class
)
== BUILT_IN_NORMAL
2874 || DECL_BUILT_IN_CLASS (fn)((built_in_class) (tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2874, __FUNCTION__, (FUNCTION_DECL)))->function_decl.built_in_class
)
== BUILT_IN_MD))
2875 result = resolve_overloaded_builtin (input_location, fn, *args);
2876
2877 if (!result)
2878 {
2879 if (warn_sizeof_pointer_memaccessglobal_options.x_warn_sizeof_pointer_memaccess
2880 && (complain & tf_warning)
2881 && !vec_safe_is_empty (*args)
2882 && !processing_template_declscope_chain->x_processing_template_decl)
2883 {
2884 location_t sizeof_arg_loc[3];
2885 tree sizeof_arg[3];
2886 unsigned int i;
2887 for (i = 0; i < 3; i++)
2888 {
2889 tree t;
2890
2891 sizeof_arg_loc[i] = UNKNOWN_LOCATION((location_t) 0);
2892 sizeof_arg[i] = NULL_TREE(tree) __null;
2893 if (i >= (*args)->length ())
2894 continue;
2895 t = (**args)[i];
2896 if (TREE_CODE (t)((enum tree_code) (t)->base.code) != SIZEOF_EXPR)
2897 continue;
2898 if (SIZEOF_EXPR_TYPE_P (t)((tree_not_check2 (((tree_check ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2898, __FUNCTION__, (SIZEOF_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2898, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
)
2899 sizeof_arg[i] = TREE_TYPE (TREE_OPERAND (t, 0))((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
((t), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2899, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2899, __FUNCTION__))->typed.type)
;
2900 else
2901 sizeof_arg[i] = TREE_OPERAND (t, 0)(*((const_cast<tree*> (tree_operand_check ((t), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2901, __FUNCTION__)))))
;
2902 sizeof_arg_loc[i] = EXPR_LOCATION (t)((((t)) && ((tree_code_type_tmpl <0>::tree_code_type
[(int) (((enum tree_code) ((t))->base.code))]) >= tcc_reference
&& (tree_code_type_tmpl <0>::tree_code_type[(int
) (((enum tree_code) ((t))->base.code))]) <= tcc_expression
)) ? (t)->exp.locus : ((location_t) 0))
;
2903 }
2904 sizeof_pointer_memaccess_warning
2905 (sizeof_arg_loc, fn, *args,
2906 sizeof_arg, same_type_ignoring_top_level_qualifiers_p);
2907 }
2908
2909 if ((complain & tf_warning)
2910 && TREE_CODE (fn)((enum tree_code) (fn)->base.code) == FUNCTION_DECL
2911 && fndecl_built_in_p (fn, BUILT_IN_MEMSET)
2912 && vec_safe_length (*args) == 3
2913 && !any_type_dependent_arguments_p (*args))
2914 {
2915 tree arg0 = (*orig_args)[0];
2916 tree arg1 = (*orig_args)[1];
2917 tree arg2 = (*orig_args)[2];
2918 int literal_mask = ((literal_integer_zerop (arg1) << 1)
2919 | (literal_integer_zerop (arg2) << 2));
2920 warn_for_memset (input_location, arg0, arg2, literal_mask);
2921 }
2922
2923 /* A call to a namespace-scope function. */
2924 result = build_new_function_call (fn, args, complain);
2925 }
2926 }
2927 else if (TREE_CODE (fn)((enum tree_code) (fn)->base.code) == PSEUDO_DTOR_EXPR)
2928 {
2929 if (!vec_safe_is_empty (*args))
2930 error ("arguments to destructor are not allowed");
2931 /* C++20/DR: If the postfix-expression names a pseudo-destructor (in
2932 which case the postfix-expression is a possibly-parenthesized class
2933 member access), the function call destroys the object of scalar type
2934 denoted by the object expression of the class member access. */
2935 tree ob = TREE_OPERAND (fn, 0)(*((const_cast<tree*> (tree_operand_check ((fn), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2935, __FUNCTION__)))))
;
2936 if (obvalue_p (ob))
2937 result = build_trivial_dtor_call (ob, true);
2938 else
2939 /* No location to clobber. */
2940 result = convert_to_void (ob, ICV_STATEMENT, complain);
2941 }
2942 else if (CLASS_TYPE_P (TREE_TYPE (fn))(((((enum tree_code) (((contains_struct_check ((fn), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2942, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE
|| (((enum tree_code) (((contains_struct_check ((fn), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2942, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE
) && ((tree_class_check ((((contains_struct_check ((fn
), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2942, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2942, __FUNCTION__))->type_common.lang_flag_5))
)
2943 /* If the "function" is really an object of class type, it might
2944 have an overloaded `operator ()'. */
2945 result = build_op_call (fn, args, complain);
2946
2947 if (!result)
2948 /* A call where the function is unknown. */
2949 result = cp_build_function_call_vec (fn, args, complain);
2950
2951 if (processing_template_declscope_chain->x_processing_template_decl && result != error_mark_nodeglobal_trees[TI_ERROR_MARK])
2952 {
2953 if (INDIRECT_REF_P (result)(((enum tree_code) (result)->base.code) == INDIRECT_REF))
2954 result = TREE_OPERAND (result, 0)(*((const_cast<tree*> (tree_operand_check ((result), (0
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2954, __FUNCTION__)))))
;
2955
2956 /* Prune all but the selected function from the original overload
2957 set so that we can avoid some duplicate work at instantiation time. */
2958 if (TREE_CODE (result)((enum tree_code) (result)->base.code) == CALL_EXPR
2959 && really_overloaded_fn (orig_fn))
2960 {
2961 tree sel_fn = CALL_EXPR_FN (result)(*((const_cast<tree*> (tree_operand_check (((tree_check
((result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2961, __FUNCTION__, (CALL_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2961, __FUNCTION__)))))
;
2962 if (TREE_CODE (sel_fn)((enum tree_code) (sel_fn)->base.code) == COMPONENT_REF)
2963 {
2964 /* The non-dependent result of build_new_method_call. */
2965 sel_fn = TREE_OPERAND (sel_fn, 1)(*((const_cast<tree*> (tree_operand_check ((sel_fn), (1
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2965, __FUNCTION__)))))
;
2966 gcc_assert (BASELINK_P (sel_fn))((void)(!((((enum tree_code) (sel_fn)->base.code) == BASELINK
)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2966, __FUNCTION__), 0 : 0))
;
2967 }
2968 else if (TREE_CODE (sel_fn)((enum tree_code) (sel_fn)->base.code) == ADDR_EXPR)
2969 /* Our original callee wasn't wrapped in an ADDR_EXPR,
2970 so strip this ADDR_EXPR added by build_over_call. */
2971 sel_fn = TREE_OPERAND (sel_fn, 0)(*((const_cast<tree*> (tree_operand_check ((sel_fn), (0
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2971, __FUNCTION__)))))
;
2972 orig_fn = sel_fn;
2973 }
2974
2975 result = build_call_vec (TREE_TYPE (result)((contains_struct_check ((result), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2975, __FUNCTION__))->typed.type)
, orig_fn, orig_args);
2976 SET_EXPR_LOCATION (result, input_location)(expr_check (((result)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2976, __FUNCTION__))->exp.locus = (input_location)
;
2977 KOENIG_LOOKUP_P (result)((tree_not_check2 (((tree_check ((result), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2977, __FUNCTION__, (CALL_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 2977, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= koenig_p;
2978 release_tree_vector (orig_args);
2979 result = convert_from_reference (result);
2980 }
2981
2982 return result;
2983}
2984
2985/* Finish a call to a postfix increment or decrement or EXPR. (Which
2986 is indicated by CODE, which should be POSTINCREMENT_EXPR or
2987 POSTDECREMENT_EXPR.) */
2988
2989cp_expr
2990finish_increment_expr (cp_expr expr, enum tree_code code)
2991{
2992 /* input_location holds the location of the trailing operator token.
2993 Build a location of the form:
2994 expr++
2995 ~~~~^~
2996 with the caret at the operator token, ranging from the start
2997 of EXPR to the end of the operator token. */
2998 location_t combined_loc = make_location (input_location,
2999 expr.get_start (),
3000 get_finish (input_location));
3001 cp_expr result = build_x_unary_op (combined_loc, code, expr,
3002 NULL_TREE(tree) __null, tf_warning_or_error);
3003 /* TODO: build_x_unary_op doesn't honor the location, so set it here. */
3004 result.set_location (combined_loc);
3005 return result;
3006}
3007
3008/* Finish a use of `this'. Returns an expression for `this'. */
3009
3010tree
3011finish_this_expr (void)
3012{
3013 tree result = NULL_TREE(tree) __null;
3014
3015 if (current_class_ptr(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun
+ 0)->language)->x_current_class_ptr : &scope_chain
->x_current_class_ptr))
)
3016 {
3017 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3017, __FUNCTION__))->typed.type)
;
3018
3019 /* In a lambda expression, 'this' refers to the captured 'this'. */
3020 if (LAMBDA_TYPE_P (type)(((enum tree_code) (type)->base.code) == RECORD_TYPE &&
((((tree_class_check ((((tree_class_check ((type), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((type), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3020, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))
)
3021 result = lambda_expr_this_capture (CLASSTYPE_LAMBDA_EXPR (type)((((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3021, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lambda_expr)
, true);
3022 else
3023 result = current_class_ptr(*((cfun + 0) && ((cfun + 0)->language) ? &((cfun
+ 0)->language)->x_current_class_ptr : &scope_chain
->x_current_class_ptr))
;
3024 }
3025
3026 if (result)
3027 /* The keyword 'this' is a prvalue expression. */
3028 return rvalue (result);
3029
3030 tree fn = current_nonlambda_function ();
3031 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3031, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3031, __FUNCTION__))->decl_common.lang_specific); if (!(
((enum tree_code) (fn)->base.code) == FUNCTION_DECL || (((
enum tree_code) (fn)->base.code) == TEMPLATE_DECL &&
((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3031, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((fn),
"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3031, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3031, __FUNCTION__); &lt->u.fn; })->static_function
)
)
3032 error ("%<this%> is unavailable for static member functions");
3033 else if (fn && processing_contract_conditionscope_chain->x_processing_contract_condition && DECL_CONSTRUCTOR_P (fn)((tree_check (((((enum tree_code) (fn)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3033, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3033, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_constructor
)
)
3034 error ("invalid use of %<this%> before it is valid");
3035 else if (fn && processing_contract_conditionscope_chain->x_processing_contract_condition && DECL_DESTRUCTOR_P (fn)((tree_check (((((enum tree_code) (fn)->base.code) == TEMPLATE_DECL
? ((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((fn), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3035, __FUNCTION__, (TEMPLATE_DECL))))))))->result : fn)
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3035, __FUNCTION__, (FUNCTION_DECL)))->decl_with_vis.cxx_destructor
)
)
3036 error ("invalid use of %<this%> after it is valid");
3037 else if (fn)
3038 error ("invalid use of %<this%> in non-member function");
3039 else
3040 error ("invalid use of %<this%> at top level");
3041 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3042}
3043
3044/* Finish a pseudo-destructor expression. If SCOPE is NULL, the
3045 expression was of the form `OBJECT.~DESTRUCTOR' where DESTRUCTOR is
3046 the TYPE for the type given. If SCOPE is non-NULL, the expression
3047 was of the form `OBJECT.SCOPE::~DESTRUCTOR'. */
3048
3049tree
3050finish_pseudo_destructor_expr (tree object, tree scope, tree destructor,
3051 location_t loc)
3052{
3053 if (object == error_mark_nodeglobal_trees[TI_ERROR_MARK] || destructor == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3054 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3055
3056 gcc_assert (TYPE_P (destructor))((void)(!((tree_code_type_tmpl <0>::tree_code_type[(int
) (((enum tree_code) (destructor)->base.code))] == tcc_type
)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3056, __FUNCTION__), 0 : 0))
;
3057
3058 if (!processing_template_declscope_chain->x_processing_template_decl)
3059 {
3060 if (scope == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3061 {
3062 error_at (loc, "invalid qualifying scope in pseudo-destructor name");
3063 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3064 }
3065 if (is_auto (destructor))
3066 destructor = TREE_TYPE (object)((contains_struct_check ((object), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3066, __FUNCTION__))->typed.type)
;
3067 if (scope && TYPE_P (scope)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (scope)->base.code))] == tcc_type)
&& !check_dtor_name (scope, destructor))
3068 {
3069 error_at (loc,
3070 "qualified type %qT does not match destructor name ~%qT",
3071 scope, destructor);
3072 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3073 }
3074
3075
3076 /* [expr.pseudo] says both:
3077
3078 The type designated by the pseudo-destructor-name shall be
3079 the same as the object type.
3080
3081 and:
3082
3083 The cv-unqualified versions of the object type and of the
3084 type designated by the pseudo-destructor-name shall be the
3085 same type.
3086
3087 We implement the more generous second sentence, since that is
3088 what most other compilers do. */
3089 if (!same_type_ignoring_top_level_qualifiers_p (TREE_TYPE (object)((contains_struct_check ((object), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3089, __FUNCTION__))->typed.type)
,
3090 destructor))
3091 {
3092 error_at (loc, "%qE is not of type %qT", object, destructor);
3093 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3094 }
3095 }
3096
3097 tree type = (type_dependent_expression_p (object)
3098 ? NULL_TREE(tree) __null : void_type_nodeglobal_trees[TI_VOID_TYPE]);
3099
3100 return build3_loc (loc, PSEUDO_DTOR_EXPR, type, object,
3101 scope, destructor);
3102}
3103
3104/* Finish an expression of the form CODE EXPR. */
3105
3106cp_expr
3107finish_unary_op_expr (location_t op_loc, enum tree_code code, cp_expr expr,
3108 tsubst_flags_t complain)
3109{
3110 /* Build a location of the form:
3111 ++expr
3112 ^~~~~~
3113 with the caret at the operator token, ranging from the start
3114 of the operator token to the end of EXPR. */
3115 location_t combined_loc = make_location (op_loc,
3116 op_loc, expr.get_finish ());
3117 cp_expr result = build_x_unary_op (combined_loc, code, expr,
3118 NULL_TREE(tree) __null, complain);
3119 /* TODO: build_x_unary_op doesn't always honor the location. */
3120 result.set_location (combined_loc);
3121
3122 if (result == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3123 return result;
3124
3125 if (!(complain & tf_warning))
3126 return result;
3127
3128 tree result_ovl = result;
3129 tree expr_ovl = expr;
3130
3131 if (!processing_template_declscope_chain->x_processing_template_decl)
3132 expr_ovl = cp_fully_fold (expr_ovl);
3133
3134 if (!CONSTANT_CLASS_P (expr_ovl)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (expr_ovl)->base.code))] == tcc_constant)
3135 || TREE_OVERFLOW_P (expr_ovl)((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum
tree_code) (expr_ovl)->base.code))] == tcc_constant) &&
((tree_class_check ((expr_ovl), (tcc_constant), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3135, __FUNCTION__))->base.public_flag))
)
3136 return result;
3137
3138 if (!processing_template_declscope_chain->x_processing_template_decl)
3139 result_ovl = cp_fully_fold (result_ovl);
3140
3141 if (CONSTANT_CLASS_P (result_ovl)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (result_ovl)->base.code))] == tcc_constant)
&& TREE_OVERFLOW_P (result_ovl)((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum
tree_code) (result_ovl)->base.code))] == tcc_constant) &&
((tree_class_check ((result_ovl), (tcc_constant), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3141, __FUNCTION__))->base.public_flag))
)
3142 overflow_warning (combined_loc, result_ovl);
3143
3144 return result;
3145}
3146
3147/* Return true if CONSTRUCTOR EXPR after pack expansion could have no
3148 elements. */
3149
3150static bool
3151maybe_zero_constructor_nelts (tree expr)
3152{
3153 if (CONSTRUCTOR_NELTS (expr)(vec_safe_length (((tree_check ((expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3153, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts)))
== 0)
3154 return true;
3155 if (!processing_template_declscope_chain->x_processing_template_decl)
3156 return false;
3157 for (constructor_elt &elt : CONSTRUCTOR_ELTS (expr)((tree_check ((expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3157, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts)
)
3158 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
)
)
3159 return false;
3160 return true;
3161}
3162
3163/* Finish a compound-literal expression or C++11 functional cast with aggregate
3164 initializer. TYPE is the type to which the CONSTRUCTOR in COMPOUND_LITERAL
3165 is being cast. */
3166
3167tree
3168finish_compound_literal (tree type, tree compound_literal,
3169 tsubst_flags_t complain,
3170 fcl_t fcl_context)
3171{
3172 if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3173 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3174
3175 if (TYPE_REF_P (type)(((enum tree_code) (type)->base.code) == REFERENCE_TYPE))
3176 {
3177 compound_literal
3178 = finish_compound_literal (TREE_TYPE (type)((contains_struct_check ((type), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3178, __FUNCTION__))->typed.type)
, compound_literal,
3179 complain, fcl_context);
3180 /* The prvalue is then used to direct-initialize the reference. */
3181 tree r = (perform_implicit_conversion_flags
3182 (type, compound_literal, complain, LOOKUP_NORMAL((1 << 0))));
3183 return convert_from_reference (r);
3184 }
3185
3186 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))
)
3187 {
3188 /* DR2351 */
3189 if (VOID_TYPE_P (type)(((enum tree_code) (type)->base.code) == VOID_TYPE) && CONSTRUCTOR_NELTS (compound_literal)(vec_safe_length (((tree_check ((compound_literal), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3189, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts)))
== 0)
3190 {
3191 if (!processing_template_declscope_chain->x_processing_template_decl)
3192 return void_nodeglobal_trees[TI_VOID];
3193 TREE_TYPE (compound_literal)((contains_struct_check ((compound_literal), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3193, __FUNCTION__))->typed.type)
= type;
3194 TREE_HAS_CONSTRUCTOR (compound_literal)(((tree_not_check2 ((compound_literal), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3194, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4))
= 1;
3195 CONSTRUCTOR_IS_DEPENDENT (compound_literal)(((tree_not_check2 (((tree_check ((compound_literal), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3195, __FUNCTION__, (CONSTRUCTOR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3195, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1))
= 0;
3196 return compound_literal;
3197 }
3198 else if (VOID_TYPE_P (type)(((enum tree_code) (type)->base.code) == VOID_TYPE)
3199 && processing_template_declscope_chain->x_processing_template_decl
3200 && maybe_zero_constructor_nelts (compound_literal))
3201 /* If there are only packs in compound_literal, it could
3202 be void{} after pack expansion. */;
3203 else
3204 {
3205 if (complain & tf_error)
3206 error ("compound literal of non-object type %qT", type);
3207 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3208 }
3209 }
3210
3211 if (template_placeholder_p (type))
3212 {
3213 type = do_auto_deduction (type, compound_literal, type, complain,
3214 adc_variable_type);
3215 if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3216 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3217 }
3218 /* C++23 auto{x}. */
3219 else if (is_auto (type)
3220 && !AUTO_IS_DECLTYPE (type)(((tree_class_check (((tree_check ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3220, __FUNCTION__, (TEMPLATE_TYPE_PARM)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3220, __FUNCTION__))->type_common.lang_flag_5))
3221 && CONSTRUCTOR_NELTS (compound_literal)(vec_safe_length (((tree_check ((compound_literal), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3221, __FUNCTION__, (CONSTRUCTOR)))->constructor.elts)))
== 1)
3222 {
3223 if (is_constrained_auto (type))
3224 {
3225 if (complain & tf_error)
3226 error ("%<auto{x}%> cannot be constrained");
3227 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3228 }
3229 else if (cxx_dialect < cxx23)
3230 pedwarn (input_location, OPT_Wc__23_extensions,
3231 "%<auto{x}%> only available with "
3232 "%<-std=c++2b%> or %<-std=gnu++2b%>");
3233 type = do_auto_deduction (type, compound_literal, type, complain,
3234 adc_variable_type);
3235 if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3236 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3237 }
3238
3239 /* Used to hold a copy of the compound literal in a template. */
3240 tree orig_cl = NULL_TREE(tree) __null;
3241
3242 if (processing_template_declscope_chain->x_processing_template_decl)
3243 {
3244 const bool dependent_p
3245 = (instantiation_dependent_expression_p (compound_literal)
3246 || dependent_type_p (type));
3247 if (dependent_p)
3248 /* We're about to return, no need to copy. */
3249 orig_cl = compound_literal;
3250 else
3251 /* We're going to need a copy. */
3252 orig_cl = unshare_constructor (compound_literal);
3253 TREE_TYPE (orig_cl)((contains_struct_check ((orig_cl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3253, __FUNCTION__))->typed.type)
= type;
3254 /* Mark the expression as a compound literal. */
3255 TREE_HAS_CONSTRUCTOR (orig_cl)(((tree_not_check2 ((orig_cl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3255, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4))
= 1;
3256 /* And as instantiation-dependent. */
3257 CONSTRUCTOR_IS_DEPENDENT (orig_cl)(((tree_not_check2 (((tree_check ((orig_cl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3257, __FUNCTION__, (CONSTRUCTOR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3257, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1))
= dependent_p;
3258 if (fcl_context == fcl_c99)
3259 CONSTRUCTOR_C99_COMPOUND_LITERAL (orig_cl)(((tree_not_check2 (((tree_check ((orig_cl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3259, __FUNCTION__, (CONSTRUCTOR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3259, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3))
= 1;
3260 /* If the compound literal is dependent, we're done for now. */
3261 if (dependent_p)
3262 return orig_cl;
3263 /* Otherwise, do go on to e.g. check narrowing. */
3264 }
3265
3266 type = complete_type (type);
3267
3268 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3268, __FUNCTION__))->type_common.lang_flag_5)) &&
((((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3268, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_aggregate))
)
3269 {
3270 /* Trying to deal with a CONSTRUCTOR instead of a TREE_LIST
3271 everywhere that deals with function arguments would be a pain, so
3272 just wrap it in a TREE_LIST. The parser set a flag so we know
3273 that it came from T{} rather than T({}). */
3274 CONSTRUCTOR_IS_DIRECT_INIT (compound_literal)(((tree_not_check2 (((tree_check ((compound_literal), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3274, __FUNCTION__, (CONSTRUCTOR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3274, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0))
= 1;
3275 compound_literal = build_tree_list (NULL_TREE(tree) __null, compound_literal);
3276 return build_functional_cast (input_location, type,
3277 compound_literal, complain);
3278 }
3279
3280 if (TREE_CODE (type)((enum tree_code) (type)->base.code) == ARRAY_TYPE
3281 && check_array_initializer (NULL_TREE(tree) __null, type, compound_literal))
3282 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3283 compound_literal = reshape_init (type, compound_literal, complain);
3284 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3284, __FUNCTION__, (RECORD_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3284, __FUNCTION__))->type_common.lang_flag_2))) || (((enum
tree_code) (type)->base.code) == NULLPTR_TYPE))
3285 && !BRACE_ENCLOSED_INITIALIZER_P (compound_literal)(((enum tree_code) (compound_literal)->base.code) == CONSTRUCTOR
&& ((contains_struct_check ((compound_literal), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3285, __FUNCTION__))->typed.type) == cp_global_trees[CPTI_INIT_LIST_TYPE
])
3286 && !check_narrowing (type, compound_literal, complain))
3287 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3288 if (TREE_CODE (type)((enum tree_code) (type)->base.code) == ARRAY_TYPE
3289 && TYPE_DOMAIN (type)((tree_check ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3289, __FUNCTION__, (ARRAY_TYPE)))->type_non_common.values
)
== NULL_TREE(tree) __null)
3290 {
3291 cp_complete_array_type_or_error (&type, compound_literal,
3292 false, complain);
3293 if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3294 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3295 }
3296 compound_literal = digest_init_flags (type, compound_literal,
3297 LOOKUP_NORMAL((1 << 0)) | LOOKUP_NO_NARROWING((1 << 6) << 1),
3298 complain);
3299 if (compound_literal == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3300 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3301
3302 /* If we're in a template, return the original compound literal. */
3303 if (orig_cl)
3304 return orig_cl;
3305
3306 if (TREE_CODE (compound_literal)((enum tree_code) (compound_literal)->base.code) == CONSTRUCTOR)
3307 {
3308 TREE_HAS_CONSTRUCTOR (compound_literal)(((tree_not_check2 ((compound_literal), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3308, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4))
= true;
3309 if (fcl_context == fcl_c99)
3310 CONSTRUCTOR_C99_COMPOUND_LITERAL (compound_literal)(((tree_not_check2 (((tree_check ((compound_literal), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3310, __FUNCTION__, (CONSTRUCTOR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3310, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3))
= 1;
3311 }
3312
3313 /* Put static/constant array temporaries in static variables. */
3314 /* FIXME all C99 compound literals should be variables rather than C++
3315 temporaries, unless they are used as an aggregate initializer. */
3316 if ((!at_function_scope_p () || CP_TYPE_CONST_P (type)((cp_type_quals (type) & TYPE_QUAL_CONST) != 0))
3317 && fcl_context == fcl_c99
3318 && TREE_CODE (type)((enum tree_code) (type)->base.code) == ARRAY_TYPE
3319 && !TYPE_HAS_NONTRIVIAL_DESTRUCTOR (type)(((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3319, __FUNCTION__))->type_common.lang_flag_4))
3320 && initializer_constant_valid_p (compound_literal, type))
3321 {
3322 tree decl = create_temporary_var (type);
3323 DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3323, __FUNCTION__))->decl_minimal.context)
= NULL_TREE(tree) __null;
3324 DECL_INITIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3324, __FUNCTION__))->decl_common.initial)
= compound_literal;
3325 TREE_STATIC (decl)((decl)->base.static_flag) = 1;
3326 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)
)
3327 {
3328 /* 5.19 says that a constant expression can include an
3329 lvalue-rvalue conversion applied to "a glvalue of literal type
3330 that refers to a non-volatile temporary object initialized
3331 with a constant expression". Rather than try to communicate
3332 that this VAR_DECL is a temporary, just mark it constexpr. */
3333 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
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3333, __FUNCTION__, (TEMPLATE_DECL))))))))->result : decl
)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3333, __FUNCTION__, (VAR_DECL), (FUNCTION_DECL)))), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3333, __FUNCTION__))->decl_common.lang_flag_8)
= true;
3334 DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (decl)(((tree_not_check2 (((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3334, __FUNCTION__, (VAR_DECL)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3334, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2))
= true;
3335 TREE_CONSTANT (decl)((non_type_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3335, __FUNCTION__))->base.constant_flag)
= true;
3336 }
3337 cp_apply_type_quals_to_decl (cp_type_quals (type), decl);
3338 decl = pushdecl_top_level (decl);
3339 DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3339, __FUNCTION__))->decl_minimal.name)
= make_anon_name ();
3340 SET_DECL_ASSEMBLER_NAME (decl, DECL_NAME (decl))overwrite_decl_assembler_name (decl, ((contains_struct_check (
(decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3340, __FUNCTION__))->decl_minimal.name))
;
3341 /* Make sure the destructor is callable. */
3342 tree clean = cxx_maybe_build_cleanup (decl, complain);
3343 if (clean == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3344 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3345 return decl;
3346 }
3347
3348 /* Represent other compound literals with TARGET_EXPR so we produce
3349 a prvalue, and can elide copies. */
3350 if (!VECTOR_TYPE_P (type)(((enum tree_code) (type)->base.code) == VECTOR_TYPE)
3351 && (TREE_CODE (compound_literal)((enum tree_code) (compound_literal)->base.code) == CONSTRUCTOR
3352 || TREE_CODE (compound_literal)((enum tree_code) (compound_literal)->base.code) == VEC_INIT_EXPR))
3353 {
3354 /* The CONSTRUCTOR is now an initializer, not a compound literal. */
3355 if (TREE_CODE (compound_literal)((enum tree_code) (compound_literal)->base.code) == CONSTRUCTOR)
3356 TREE_HAS_CONSTRUCTOR (compound_literal)(((tree_not_check2 ((compound_literal), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3356, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_4))
= false;
3357 compound_literal = get_target_expr (compound_literal, complain);
3358 }
3359 else
3360 /* For e.g. int{42} just make sure it's a prvalue. */
3361 compound_literal = rvalue (compound_literal);
3362
3363 return compound_literal;
3364}
3365
3366/* Return the declaration for the function-name variable indicated by
3367 ID. */
3368
3369tree
3370finish_fname (tree id)
3371{
3372 tree decl;
3373
3374 decl = fname_decl (input_location, C_RID_CODE (id)((enum rid) (((struct c_common_identifier *) (id))->node.rid_code
))
, id);
3375 if (processing_template_declscope_chain->x_processing_template_decl && current_function_decl
3376 && decl != error_mark_nodeglobal_trees[TI_ERROR_MARK])
3377 decl = DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3377, __FUNCTION__))->decl_minimal.name)
;
3378 return decl;
3379}
3380
3381/* Finish a translation unit. */
3382
3383void
3384finish_translation_unit (void)
3385{
3386 /* In case there were missing closebraces,
3387 get us back to the global binding level. */
3388 pop_everything ();
3389 while (current_namespacescope_chain->old_namespace != global_namespacecp_global_trees[CPTI_GLOBAL])
3390 pop_namespace ();
3391
3392 /* Do file scope __FUNCTION__ et al. */
3393 finish_fname_decls ();
3394
3395 if (vec_safe_length (scope_chain->omp_declare_target_attribute))
3396 {
3397 cp_omp_declare_target_attr
3398 a = scope_chain->omp_declare_target_attribute->pop ();
3399 if (!errorcount(global_dc)->diagnostic_count[(int) (DK_ERROR)])
3400 error ("%qs without corresponding %qs",
3401 a.device_type >= 0 ? "#pragma omp begin declare target"
3402 : "#pragma omp declare target",
3403 "#pragma omp end declare target");
3404 vec_safe_truncate (scope_chain->omp_declare_target_attribute, 0);
3405 }
3406 if (vec_safe_length (scope_chain->omp_begin_assumes))
3407 {
3408 if (!errorcount(global_dc)->diagnostic_count[(int) (DK_ERROR)])
3409 error ("%qs without corresponding %qs",
3410 "#pragma omp begin assumes", "#pragma omp end assumes");
3411 vec_safe_truncate (scope_chain->omp_begin_assumes, 0);
3412 }
3413}
3414
3415/* Finish a template type parameter, specified as AGGR IDENTIFIER.
3416 Returns the parameter. */
3417
3418tree
3419finish_template_type_parm (tree aggr, tree identifier)
3420{
3421 if (aggr != class_type_nodecp_global_trees[CPTI_CLASS_TYPE])
3422 {
3423 permerror (input_location, "template type parameters must use the keyword %<class%> or %<typename%>");
3424 aggr = class_type_nodecp_global_trees[CPTI_CLASS_TYPE];
3425 }
3426
3427 return build_tree_list (aggr, identifier);
3428}
3429
3430/* Finish a template template parameter, specified as AGGR IDENTIFIER.
3431 Returns the parameter. */
3432
3433tree
3434finish_template_template_parm (tree aggr, tree identifier)
3435{
3436 tree decl = build_decl (input_location,
3437 TYPE_DECL, identifier, NULL_TREE(tree) __null);
3438
3439 tree tmpl = build_lang_decl (TEMPLATE_DECL, identifier, NULL_TREE(tree) __null);
3440 DECL_TEMPLATE_PARMS (tmpl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((tmpl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3440, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments
= current_template_parmsscope_chain->template_parms;
3441 DECL_TEMPLATE_RESULT (tmpl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((tmpl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3441, __FUNCTION__, (TEMPLATE_DECL))))))))->result
= decl;
3442 DECL_ARTIFICIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3442, __FUNCTION__))->decl_common.artificial_flag)
= 1;
3443
3444 /* Associate the constraints with the underlying declaration,
3445 not the template. */
3446 tree constr = current_template_constraints ();
3447 set_constraints (decl, constr);
3448
3449 end_template_decl ();
3450
3451 gcc_assert (DECL_TEMPLATE_PARMS (tmpl))((void)(!(((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((tmpl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3451, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments) ?
fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3451, __FUNCTION__), 0 : 0))
;
3452
3453 check_default_tmpl_args (decl, DECL_TEMPLATE_PARMS (tmpl)((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((tmpl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3453, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments
,
3454 /*is_primary=*/true, /*is_partial=*/false,
3455 /*is_friend=*/0);
3456
3457 return finish_template_type_parm (aggr, tmpl);
3458}
3459
3460/* ARGUMENT is the default-argument value for a template template
3461 parameter. If ARGUMENT is invalid, issue error messages and return
3462 the ERROR_MARK_NODE. Otherwise, ARGUMENT itself is returned. */
3463
3464tree
3465check_template_template_default_arg (tree argument)
3466{
3467 if (TREE_CODE (argument)((enum tree_code) (argument)->base.code) != TEMPLATE_DECL
3468 && TREE_CODE (argument)((enum tree_code) (argument)->base.code) != TEMPLATE_TEMPLATE_PARM
3469 && TREE_CODE (argument)((enum tree_code) (argument)->base.code) != UNBOUND_CLASS_TEMPLATE)
3470 {
3471 if (TREE_CODE (argument)((enum tree_code) (argument)->base.code) == TYPE_DECL)
3472 {
3473 if (tree t = maybe_get_template_decl_from_type_decl (argument))
3474 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == TEMPLATE_DECL)
3475 return t;
3476 error ("invalid use of type %qT as a default value for a template "
3477 "template-parameter", TREE_TYPE (argument)((contains_struct_check ((argument), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3477, __FUNCTION__))->typed.type)
);
3478 }
3479 else
3480 error ("invalid default argument for a template template parameter");
3481 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3482 }
3483
3484 return argument;
3485}
3486
3487/* Begin a class definition, as indicated by T. */
3488
3489tree
3490begin_class_definition (tree t)
3491{
3492 if (error_operand_p (t) || error_operand_p (TYPE_MAIN_DECL (t)((((contains_struct_check (((tree_class_check ((((tree_class_check
((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3492, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3492, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3492, __FUNCTION__))->common.chain)))
))
3493 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3494
3495 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((t), (tcc_type)
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3495, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))
)
3496 {
3497 error ("definition of %q#T inside template parameter list", t);
3498 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3499 }
3500
3501 /* According to the C++ ABI, decimal classes defined in ISO/IEC TR 24733
3502 are passed the same as decimal scalar types. */
3503 if (TREE_CODE (t)((enum tree_code) (t)->base.code) == RECORD_TYPE
3504 && !processing_template_declscope_chain->x_processing_template_decl)
3505 {
3506 tree ns = TYPE_CONTEXT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3506, __FUNCTION__))->type_common.context)
;
3507 if (ns && TREE_CODE (ns)((enum tree_code) (ns)->base.code) == NAMESPACE_DECL
3508 && DECL_CONTEXT (ns)((contains_struct_check ((ns), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3508, __FUNCTION__))->decl_minimal.context)
== std_nodecp_global_trees[CPTI_STD]
3509 && DECL_NAME (ns)((contains_struct_check ((ns), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3509, __FUNCTION__))->decl_minimal.name)
3510 && id_equal (DECL_NAME (ns)((contains_struct_check ((ns), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3510, __FUNCTION__))->decl_minimal.name)
, "decimal"))
3511 {
3512 const char *n = TYPE_NAME_STRING (t)(((const char *) (tree_check (((((tree_class_check ((t), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3512, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3512, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3512, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3512, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3512, __FUNCTION__))->type_common.name))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3512, __FUNCTION__, (IDENTIFIER_NODE)))->identifier.id.str
))
;
3513 if ((strcmp (n, "decimal32") == 0)
3514 || (strcmp (n, "decimal64") == 0)
3515 || (strcmp (n, "decimal128") == 0))
3516 TYPE_TRANSPARENT_AGGR (t)((tree_check3 ((t), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3516, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_common.transparent_aggr_flag)
= 1;
3517 }
3518 }
3519
3520 /* A non-implicit typename comes from code like:
3521
3522 template <typename T> struct A {
3523 template <typename U> struct A<T>::B ...
3524
3525 This is erroneous. */
3526 else if (TREE_CODE (t)((enum tree_code) (t)->base.code) == TYPENAME_TYPE)
3527 {
3528 error ("invalid definition of qualified type %qT", t);
3529 t = error_mark_nodeglobal_trees[TI_ERROR_MARK];
3530 }
3531
3532 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) == TRAIT_TYPE || ((enum tree_code) (t)->
base.code) == DEPENDENT_OPERATOR_TYPE) || (((((enum tree_code
) (t)->base.code)) == RECORD_TYPE || (((enum tree_code) (t
)->base.code)) == UNION_TYPE) && ((tree_class_check
((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3532, __FUNCTION__))->type_common.lang_flag_5)))
)
3533 {
3534 t = make_class_type (RECORD_TYPE);
3535 pushtag (make_anon_name (), t);
3536 }
3537
3538 if (TYPE_BEING_DEFINED (t)((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3538, __FUNCTION__))->type_with_lang_specific.lang_specific
))->being_defined)
)
3539 {
3540 t = make_class_type (TREE_CODE (t)((enum tree_code) (t)->base.code));
3541 pushtag (TYPE_IDENTIFIER (t)(((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3541, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3541, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3541, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3541, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3541, __FUNCTION__))->type_common.name))
, t);
3542 }
3543
3544 if (modules_p ())
3545 {
3546 if (!module_may_redeclare (TYPE_NAME (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3546, __FUNCTION__))->type_common.name)
))
3547 {
3548 error ("cannot declare %qD in a different module", TYPE_NAME (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3548, __FUNCTION__))->type_common.name)
);
3549 inform (DECL_SOURCE_LOCATION (TYPE_NAME (t))((contains_struct_check ((((tree_class_check ((t), (tcc_type)
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3549, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3549, __FUNCTION__))->decl_minimal.locus)
, "declared here");
3550 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3551 }
3552 set_instantiating_module (TYPE_NAME (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3552, __FUNCTION__))->type_common.name)
);
3553 set_defining_module (TYPE_NAME (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3553, __FUNCTION__))->type_common.name)
);
3554 }
3555
3556 maybe_process_partial_specialization (t);
3557 pushclass (t);
3558 TYPE_BEING_DEFINED (t)((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3558, __FUNCTION__))->type_with_lang_specific.lang_specific
))->being_defined)
= 1;
3559 class_binding_levelscope_chain->class_bindings->defining_class_p = 1;
3560
3561 if (flag_pack_structglobal_options.x_flag_pack_struct)
3562 {
3563 tree v;
3564 TYPE_PACKED (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3564, __FUNCTION__))->base.u.bits.packed_flag)
= 1;
3565 /* Even though the type is being defined for the first time
3566 here, there might have been a forward declaration, so there
3567 might be cv-qualified variants of T. */
3568 for (v = TYPE_NEXT_VARIANT (t)((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3568, __FUNCTION__))->type_common.next_variant)
; v; v = TYPE_NEXT_VARIANT (v)((tree_class_check ((v), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3568, __FUNCTION__))->type_common.next_variant)
)
3569 TYPE_PACKED (v)((tree_class_check ((v), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3569, __FUNCTION__))->base.u.bits.packed_flag)
= 1;
3570 }
3571 /* Reset the interface data, at the earliest possible
3572 moment, as it might have been set via a class foo;
3573 before. */
3574 if (! TYPE_UNNAMED_P (t)((((((tree_class_check ((((tree_class_check ((t), (tcc_type),
"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((t), (tcc_type)
, "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__, (IDENTIFIER_NODE)))->base.private_flag
)) && !((tree_check ((((((tree_class_check ((((tree_class_check
((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3574, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))
)
3575 {
3576 struct c_fileinfo *finfo = \
3577 get_fileinfo (LOCATION_FILE (input_location)((expand_location (input_location)).file));
3578 CLASSTYPE_INTERFACE_ONLY (t)((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3578, __FUNCTION__))->type_with_lang_specific.lang_specific
))->interface_only)
= finfo->interface_only;
3579 SET_CLASSTYPE_INTERFACE_UNKNOWN_X((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3580, __FUNCTION__))->type_with_lang_specific.lang_specific
))->interface_unknown = !!(finfo->interface_unknown))
3580 (t, finfo->interface_unknown)((((tree_class_check ((t), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3580, __FUNCTION__))->type_with_lang_specific.lang_specific
))->interface_unknown = !!(finfo->interface_unknown))
;
3581 }
3582 reset_specialization ();
3583
3584 /* Make a declaration for this class in its own scope. */
3585 build_self_reference ();
3586
3587 return t;
3588}
3589
3590/* Finish the member declaration given by DECL. */
3591
3592void
3593finish_member_declaration (tree decl)
3594{
3595 if (decl == error_mark_nodeglobal_trees[TI_ERROR_MARK] || decl == NULL_TREE(tree) __null)
3596 return;
3597
3598 if (decl == void_type_nodeglobal_trees[TI_VOID_TYPE])
3599 /* The COMPONENT was a friend, not a member, and so there's
3600 nothing for us to do. */
3601 return;
3602
3603 /* We should see only one DECL at a time. */
3604 gcc_assert (DECL_CHAIN (decl) == NULL_TREE)((void)(!((((contains_struct_check (((contains_struct_check (
(decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3604, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3604, __FUNCTION__))->common.chain)) == (tree) __null) ?
fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3604, __FUNCTION__), 0 : 0))
;
3605
3606 /* Don't add decls after definition. */
3607 gcc_assert (TYPE_BEING_DEFINED (current_class_type)((void)(!(((((tree_class_check ((scope_chain->class_type),
(tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3607, __FUNCTION__))->type_with_lang_specific.lang_specific
))->being_defined) || (((enum tree_code) (((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type))->base.code) == RECORD_TYPE
&& ((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__), 0 : 0))
3608 /* We can add lambda types when late parsing default((void)(!(((((tree_class_check ((scope_chain->class_type),
(tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3607, __FUNCTION__))->type_with_lang_specific.lang_specific
))->being_defined) || (((enum tree_code) (((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type))->base.code) == RECORD_TYPE
&& ((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__), 0 : 0))
3609 arguments. */((void)(!(((((tree_class_check ((scope_chain->class_type),
(tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3607, __FUNCTION__))->type_with_lang_specific.lang_specific
))->being_defined) || (((enum tree_code) (((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type))->base.code) == RECORD_TYPE
&& ((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__), 0 : 0))
3610 || LAMBDA_TYPE_P (TREE_TYPE (decl)))((void)(!(((((tree_class_check ((scope_chain->class_type),
(tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3607, __FUNCTION__))->type_with_lang_specific.lang_specific
))->being_defined) || (((enum tree_code) (((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type))->base.code) == RECORD_TYPE
&& ((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name))->base.code))
] == tcc_declaration) ? ((contains_struct_check ((((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
))) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3610, __FUNCTION__), 0 : 0))
;
3611
3612 /* Set up access control for DECL. */
3613 TREE_PRIVATE (decl)((decl)->base.private_flag)
3614 = (current_access_specifierscope_chain->access_specifier == access_private_nodeglobal_trees[TI_PRIVATE]);
3615 TREE_PROTECTED (decl)((decl)->base.protected_flag)
3616 = (current_access_specifierscope_chain->access_specifier == access_protected_nodeglobal_trees[TI_PROTECTED]);
3617 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_DECL)
3618 {
3619 TREE_PRIVATE (DECL_TEMPLATE_RESULT (decl))((((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3619, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.private_flag)
= TREE_PRIVATE (decl)((decl)->base.private_flag);
3620 TREE_PROTECTED (DECL_TEMPLATE_RESULT (decl))((((struct tree_template_decl *)(const_cast<union tree_node
*> ((((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3620, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.protected_flag)
= TREE_PROTECTED (decl)((decl)->base.protected_flag);
3621 }
3622
3623 /* Mark the DECL as a member of the current class, unless it's
3624 a member of an enumeration. */
3625 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) != CONST_DECL)
3626 DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3626, __FUNCTION__))->decl_minimal.context)
= current_class_typescope_chain->class_type;
3627
3628 /* Remember the single FIELD_DECL an anonymous aggregate type is used for. */
3629 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == FIELD_DECL
3630 && ANON_AGGR_TYPE_P (TREE_TYPE (decl))((((((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3630, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE
|| (((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3630, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE
) && ((tree_class_check ((((contains_struct_check ((decl
), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3630, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3630, __FUNCTION__))->type_common.lang_flag_5)) &&
(((tree_class_check ((((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3630, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3630, __FUNCTION__))->type_with_lang_specific.lang_specific
))->anon_aggr)
)
3631 {
3632 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3632, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3632, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3632, __FUNCTION__))->type_with_lang_specific.lang_specific
))->typeinfo_var)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3632, __FUNCTION__), 0 : 0))
;
3633 ANON_AGGR_TYPE_FIELD (TYPE_MAIN_VARIANT (TREE_TYPE (decl)))((((tree_class_check ((((tree_class_check ((((contains_struct_check
((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3633, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3633, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3633, __FUNCTION__))->type_with_lang_specific.lang_specific
))->typeinfo_var)
= decl;
3634 }
3635
3636 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == USING_DECL)
3637 /* Avoid debug info for class-scope USING_DECLS for now, we'll
3638 call cp_emit_debug_info_for_using later. */
3639 DECL_IGNORED_P (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3639, __FUNCTION__))->decl_common.ignored_flag)
= 1;
3640
3641 /* Check for bare parameter packs in the non-static data member
3642 declaration. */
3643 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == FIELD_DECL)
3644 {
3645 if (check_for_bare_parameter_packs (TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3645, __FUNCTION__))->typed.type)
))
3646 TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3646, __FUNCTION__))->typed.type)
= error_mark_nodeglobal_trees[TI_ERROR_MARK];
3647 if (check_for_bare_parameter_packs (DECL_ATTRIBUTES (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3647, __FUNCTION__))->decl_common.attributes)
))
3648 DECL_ATTRIBUTES (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3648, __FUNCTION__))->decl_common.attributes)
= NULL_TREE(tree) __null;
3649 }
3650
3651 /* [dcl.link]
3652
3653 A C language linkage is ignored for the names of class members
3654 and the member function type of class member functions. */
3655 if (DECL_LANG_SPECIFIC (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3655, __FUNCTION__))->decl_common.lang_specific)
)
3656 SET_DECL_LANGUAGE (decl, lang_cplusplus)(((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3656, __FUNCTION__))->decl_common.lang_specific)->u.base
.language = (lang_cplusplus))
;
3657
3658 bool add = false;
3659
3660 /* Functions and non-functions are added differently. */
3661 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3661, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3661, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL))
)
3662 add = add_method (current_class_typescope_chain->class_type, decl, false);
3663 /* Enter the DECL into the scope of the class, if the class
3664 isn't a closure (whose fields are supposed to be unnamed). */
3665 else if (CLASSTYPE_LAMBDA_EXPR (current_class_type)((((tree_class_check ((scope_chain->class_type), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3665, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lambda_expr)
3666 || maybe_push_used_methods (decl)
3667 || pushdecl_class_level (decl))
3668 add = true;
3669
3670 if (add)
3671 {
3672 /* All TYPE_DECLs go at the end of TYPE_FIELDS. Ordinary fields
3673 go at the beginning. The reason is that
3674 legacy_nonfn_member_lookup searches the list in order, and we
3675 want a field name to override a type name so that the "struct
3676 stat hack" will work. In particular:
3677
3678 struct S { enum E { }; static const int E = 5; int ary[S::E]; } s;
3679
3680 is valid. */
3681
3682 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TYPE_DECL)
3683 TYPE_FIELDS (current_class_type)((tree_check3 ((scope_chain->class_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3683, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
3684 = chainon (TYPE_FIELDS (current_class_type)((tree_check3 ((scope_chain->class_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3684, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
, decl);
3685 else
3686 {
3687 DECL_CHAIN (decl)(((contains_struct_check (((contains_struct_check ((decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3687, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3687, __FUNCTION__))->common.chain))
= TYPE_FIELDS (current_class_type)((tree_check3 ((scope_chain->class_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3687, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
;
3688 TYPE_FIELDS (current_class_type)((tree_check3 ((scope_chain->class_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3688, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.values)
= decl;
3689 }
3690
3691 maybe_add_class_template_decl_list (current_class_typescope_chain->class_type, decl,
3692 /*friend_p=*/0);
3693 }
3694}
3695
3696/* Finish processing a complete template declaration. The PARMS are
3697 the template parameters. */
3698
3699void
3700finish_template_decl (tree parms)
3701{
3702 if (parms)
3703 end_template_decl ();
3704 else
3705 end_specialization ();
3706}
3707
3708// Returns the template type of the class scope being entered. If we're
3709// entering a constrained class scope. TYPE is the class template
3710// scope being entered and we may need to match the intended type with
3711// a constrained specialization. For example:
3712//
3713// template<Object T>
3714// struct S { void f(); }; #1
3715//
3716// template<Object T>
3717// void S<T>::f() { } #2
3718//
3719// We check, in #2, that S<T> refers precisely to the type declared by
3720// #1 (i.e., that the constraints match). Note that the following should
3721// be an error since there is no specialization of S<T> that is
3722// unconstrained, but this is not diagnosed here.
3723//
3724// template<typename T>
3725// void S<T>::f() { }
3726//
3727// We cannot diagnose this problem here since this function also matches
3728// qualified template names that are not part of a definition. For example:
3729//
3730// template<Integral T, Floating_point U>
3731// typename pair<T, U>::first_type void f(T, U);
3732//
3733// Here, it is unlikely that there is a partial specialization of
3734// pair constrained for for Integral and Floating_point arguments.
3735//
3736// The general rule is: if a constrained specialization with matching
3737// constraints is found return that type. Also note that if TYPE is not a
3738// class-type (e.g. a typename type), then no fixup is needed.
3739
3740static tree
3741fixup_template_type (tree type)
3742{
3743 // Find the template parameter list at the a depth appropriate to
3744 // the scope we're trying to enter.
3745 tree parms = current_template_parmsscope_chain->template_parms;
3746 int depth = template_class_depth (type);
3747 for (int n = current_template_depth(scope_chain->template_parms ? ((long) ((unsigned long) (*
tree_int_cst_elt_check ((((tree_check ((scope_chain->template_parms
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3747, __FUNCTION__, (TREE_LIST)))->list.purpose)), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3747, __FUNCTION__)))) : 0)
; n > depth && parms; --n)
3748 parms = TREE_CHAIN (parms)((contains_struct_check ((parms), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3748, __FUNCTION__))->common.chain)
;
3749 if (!parms)
3750 return type;
3751 tree cur_reqs = TEMPLATE_PARMS_CONSTRAINTS (parms)((contains_struct_check (((tree_check ((parms), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3751, __FUNCTION__, (TREE_LIST)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3751, __FUNCTION__))->typed.type)
;
3752 tree cur_constr = build_constraints (cur_reqs, NULL_TREE(tree) __null);
3753
3754 // Search for a specialization whose type and constraints match.
3755 tree tmpl = CLASSTYPE_TI_TEMPLATE (type)((struct tree_template_info*)(tree_check (((((tree_class_check
(((tree_check3 ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3755, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3755, __FUNCTION__))->type_non_common.lang_1))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3755, __FUNCTION__, (TEMPLATE_INFO))))->tmpl
;
3756 tree specs = DECL_TEMPLATE_SPECIALIZATIONS (tmpl)((contains_struct_check (((tree_check ((tmpl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3756, __FUNCTION__, (TEMPLATE_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3756, __FUNCTION__))->decl_common.size)
;
3757 while (specs)
3758 {
3759 tree spec_constr = get_constraints (TREE_VALUE (specs)((tree_check ((specs), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3759, __FUNCTION__, (TREE_LIST)))->list.value)
);
3760
3761 // If the type and constraints match a specialization, then we
3762 // are entering that type.
3763 if (same_type_p (type, TREE_TYPE (specs))comptypes ((type), (((contains_struct_check ((specs), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3763, __FUNCTION__))->typed.type)), 0)
3764 && equivalent_constraints (cur_constr, spec_constr))
3765 return TREE_TYPE (specs)((contains_struct_check ((specs), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3765, __FUNCTION__))->typed.type)
;
3766 specs = TREE_CHAIN (specs)((contains_struct_check ((specs), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3766, __FUNCTION__))->common.chain)
;
3767 }
3768
3769 // If no specialization matches, then must return the type
3770 // previously found.
3771 return type;
3772}
3773
3774/* Finish processing a template-id (which names a type) of the form
3775 NAME < ARGS >. Return the TYPE_DECL for the type named by the
3776 template-id. If ENTERING_SCOPE is nonzero we are about to enter
3777 the scope of template-id indicated. */
3778
3779tree
3780finish_template_type (tree name, tree args, int entering_scope)
3781{
3782 tree type;
3783
3784 type = lookup_template_class (name, args,
3785 NULL_TREE(tree) __null, NULL_TREE(tree) __null, entering_scope,
3786 tf_warning_or_error | tf_user);
3787
3788 /* If we might be entering the scope of a partial specialization,
3789 find the one with the right constraints. */
3790 if (flag_conceptsglobal_options.x_flag_concepts
3791 && entering_scope
3792 && CLASS_TYPE_P (type)(((((enum tree_code) (type)->base.code)) == RECORD_TYPE ||
(((enum tree_code) (type)->base.code)) == UNION_TYPE) &&
((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3792, __FUNCTION__))->type_common.lang_flag_5))
3793 && CLASSTYPE_TEMPLATE_INFO (type)(((tree_class_check (((tree_check3 ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3793, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3793, __FUNCTION__))->type_non_common.lang_1))
3794 && dependent_type_p (type)
3795 && 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3795, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3795, __FUNCTION__))->type_non_common.lang_1))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3795, __FUNCTION__, (TEMPLATE_INFO))))->tmpl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3795, __FUNCTION__, (TEMPLATE_DECL))))))))->arguments), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3795, __FUNCTION__, (TREE_LIST)))->list.value)), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3795, __FUNCTION__))->typed.type))) == (((struct tree_template_info
*)(tree_check (((((tree_class_check (((tree_check3 ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3795, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3795, __FUNCTION__))->type_non_common.lang_1))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3795, __FUNCTION__, (TEMPLATE_INFO))))->tmpl))
)
3796 type = fixup_template_type (type);
3797
3798 if (type == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3799 return type;
3800 else if (CLASS_TYPE_P (type)(((((enum tree_code) (type)->base.code)) == RECORD_TYPE ||
(((enum tree_code) (type)->base.code)) == UNION_TYPE) &&
((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3800, __FUNCTION__))->type_common.lang_flag_5))
&& !alias_type_or_template_p (type))
3801 return TYPE_STUB_DECL (type)(((contains_struct_check (((tree_class_check ((type), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3801, __FUNCTION__))), (TS_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3801, __FUNCTION__))->common.chain))
;
3802 else
3803 return TYPE_NAME (type)((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3803, __FUNCTION__))->type_common.name)
;
3804}
3805
3806/* Finish processing a BASE_CLASS with the indicated ACCESS_SPECIFIER.
3807 Return a TREE_LIST containing the ACCESS_SPECIFIER and the
3808 BASE_CLASS, or NULL_TREE if an error occurred. The
3809 ACCESS_SPECIFIER is one of
3810 access_{default,public,protected_private}_node. For a virtual base
3811 we set TREE_TYPE. */
3812
3813tree
3814finish_base_specifier (tree base, tree access, bool virtual_p)
3815{
3816 tree result;
3817
3818 if (base == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3819 {
3820 error ("invalid base-class specification");
3821 result = NULL_TREE(tree) __null;
3822 }
3823 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) == TRAIT_TYPE || ((enum
tree_code) (base)->base.code) == DEPENDENT_OPERATOR_TYPE)
|| (((((enum tree_code) (base)->base.code)) == RECORD_TYPE
|| (((enum tree_code) (base)->base.code)) == UNION_TYPE) &&
((tree_class_check ((base), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3823, __FUNCTION__))->type_common.lang_flag_5)))
)
3824 {
3825 error ("%qT is not a class type", base);
3826 result = NULL_TREE(tree) __null;
3827 }
3828 else
3829 {
3830 if (cp_type_quals (base) != 0)
3831 {
3832 /* DR 484: Can a base-specifier name a cv-qualified
3833 class type? */
3834 base = TYPE_MAIN_VARIANT (base)((tree_class_check ((base), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3834, __FUNCTION__))->type_common.main_variant)
;
3835 }
3836 result = build_tree_list (access, base);
3837 if (virtual_p)
3838 TREE_TYPE (result)((contains_struct_check ((result), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3838, __FUNCTION__))->typed.type)
= integer_type_nodeinteger_types[itk_int];
3839 }
3840
3841 return result;
3842}
3843
3844/* If FNS is a member function, a set of member functions, or a
3845 template-id referring to one or more member functions, return a
3846 BASELINK for FNS, incorporating the current access context.
3847 Otherwise, return FNS unchanged. */
3848
3849tree
3850baselink_for_fns (tree fns)
3851{
3852 tree scope;
3853 tree cl;
3854
3855 if (BASELINK_P (fns)(((enum tree_code) (fns)->base.code) == BASELINK)
3856 || error_operand_p (fns))
3857 return fns;
3858
3859 scope = ovl_scope (fns);
3860 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3860, __FUNCTION__))->type_common.lang_flag_5))
)
3861 return fns;
3862
3863 cl = currently_open_derived_class (scope);
3864 if (!cl)
3865 cl = scope;
3866 tree access_path = TYPE_BINFO (cl)((tree_check3 ((cl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3866, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
;
3867 tree conv_path = (cl == scope ? access_path
3868 : lookup_base (cl, scope, ba_any, NULL__null, tf_none));
3869 return build_baselink (conv_path, access_path, fns, /*optype=*/NULL_TREE(tree) __null);
3870}
3871
3872/* Returns true iff DECL is a variable from a function outside
3873 the current one. */
3874
3875static bool
3876outer_var_p (tree decl)
3877{
3878 return ((VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL) || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == PARM_DECL)
3879 && DECL_FUNCTION_SCOPE_P (decl)(((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3879, __FUNCTION__))->decl_minimal.context) && (
(enum tree_code) (((contains_struct_check ((decl), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3879, __FUNCTION__))->decl_minimal.context))->base.code
) == FUNCTION_DECL)
3880 /* Don't get confused by temporaries. */
3881 && DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3881, __FUNCTION__))->decl_minimal.name)
3882 && (DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3882, __FUNCTION__))->decl_minimal.context)
!= current_function_decl
3883 || parsing_nsdmi ()));
3884}
3885
3886/* As above, but also checks that DECL is automatic. */
3887
3888bool
3889outer_automatic_var_p (tree decl)
3890{
3891 return (outer_var_p (decl)
3892 && !TREE_STATIC (decl)((decl)->base.static_flag));
3893}
3894
3895/* DECL satisfies outer_automatic_var_p. Possibly complain about it or
3896 rewrite it for lambda capture.
3897
3898 If ODR_USE is true, we're being called from mark_use, and we complain about
3899 use of constant variables. If ODR_USE is false, we're being called for the
3900 id-expression, and we do lambda capture. */
3901
3902tree
3903process_outer_var_ref (tree decl, tsubst_flags_t complain, bool odr_use)
3904{
3905 if (cp_unevaluated_operand)
3906 {
3907 tree type = TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3907, __FUNCTION__))->typed.type)
;
3908 if (!dependent_type_p (type)
3909 && variably_modified_type_p (type, NULL_TREE(tree) __null))
3910 /* VLAs are used even in unevaluated context. */;
3911 else
3912 /* It's not a use (3.2) if we're in an unevaluated context. */
3913 return decl;
3914 }
3915 if (decl == error_mark_nodeglobal_trees[TI_ERROR_MARK])
3916 return decl;
3917
3918 tree context = DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3918, __FUNCTION__))->decl_minimal.context)
;
3919 tree containing_function = current_function_decl;
3920 tree lambda_stack = NULL_TREE(tree) __null;
3921 tree lambda_expr = NULL_TREE(tree) __null;
3922 tree initializer = convert_from_reference (decl);
3923
3924 /* Mark it as used now even if the use is ill-formed. */
3925 if (!mark_used (decl, complain))
3926 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3927
3928 if (parsing_nsdmi ())
3929 containing_function = NULL_TREE(tree) __null;
3930
3931 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
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((containing_function
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && (((tree_not_check2 (
((tree_check ((((contains_struct_check ((containing_function)
, (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__, (IDENTIFIER_NODE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __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
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__, (TEMPLATE_DECL))))))))->result : containing_function
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __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
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((containing_function
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__); &lt->u.fn; })->ovl_op_code) ==
OVL_OP_CALL_EXPR) && (((enum tree_code) ((!(! (((contains_struct_check
((containing_function), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check (((!(! (((contains_struct_check
((containing_function), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3931, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
)))
)
3932 {
3933 /* Check whether we've already built a proxy. */
3934 tree var = decl;
3935 while (is_normal_capture_proxy (var))
3936 var = DECL_CAPTURED_VARIABLE (var)(__extension__ ({ struct lang_decl *lt = ((contains_struct_check
((var), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3936, __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 ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3936, __FUNCTION__); &lt->u.min; })->access)
;
3937 tree d = retrieve_local_specialization (var);
3938
3939 if (d && d != decl && is_capture_proxy (d))
3940 {
3941 if (DECL_CONTEXT (d)((contains_struct_check ((d), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3941, __FUNCTION__))->decl_minimal.context)
== containing_function)
3942 /* We already have an inner proxy. */
3943 return d;
3944 else
3945 /* We need to capture an outer proxy. */
3946 return process_outer_var_ref (d, complain, odr_use);
3947 }
3948 }
3949
3950 /* If we are in a lambda function, we can move out until we hit
3951 1. the context,
3952 2. a non-lambda function, or
3953 3. a non-default capturing lambda function. */
3954 while (context != containing_function
3955 /* containing_function can be null with invalid generic lambdas. */
3956 && containing_function
3957 && 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
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((containing_function
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) && (((tree_not_check2 (
((tree_check ((((contains_struct_check ((containing_function)
, (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.name)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__, (IDENTIFIER_NODE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __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
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__, (TEMPLATE_DECL))))))))->result : containing_function
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __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
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((containing_function
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__); &lt->u.fn; })->ovl_op_code) ==
OVL_OP_CALL_EXPR) && (((enum tree_code) ((!(! (((contains_struct_check
((containing_function), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->type_common.name))) && ((tree_check
((((((tree_class_check ((((tree_class_check (((!(! (((contains_struct_check
((containing_function), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->type_common.name) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->type_common.name)), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.name) : ((tree_class_check
((((tree_class_check (((!(! (((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context)) || ((enum tree_code
) (((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context))->base.code
) == TRANSLATION_UNIT_DECL) ? ((contains_struct_check ((containing_function
), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->decl_minimal.context) : cp_global_trees
[CPTI_GLOBAL])), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->type_common.main_variant)), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__))->type_common.name)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3957, __FUNCTION__, (IDENTIFIER_NODE)))->base.protected_flag
)))
)
3958 {
3959 tree closure = DECL_CONTEXT (containing_function)((contains_struct_check ((containing_function), (TS_DECL_MINIMAL
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3959, __FUNCTION__))->decl_minimal.context)
;
3960 lambda_expr = CLASSTYPE_LAMBDA_EXPR (closure)((((tree_class_check ((closure), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3960, __FUNCTION__))->type_with_lang_specific.lang_specific
))->lambda_expr)
;
3961
3962 if (TYPE_CLASS_SCOPE_P (closure)(((tree_class_check ((closure), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3962, __FUNCTION__))->type_common.context) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((closure), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3962, __FUNCTION__))->type_common.context))->base.code
))] == tcc_type))
)
3963 /* A lambda in an NSDMI (c++/64496). */
3964 break;
3965
3966 if (LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (lambda_expr)(((struct tree_lambda_expr *)(tree_check ((lambda_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3966, __FUNCTION__, (LAMBDA_EXPR))))->default_capture_mode
)
== CPLD_NONE)
3967 break;
3968
3969 lambda_stack = tree_cons (NULL_TREE(tree) __null, lambda_expr, lambda_stack);
3970
3971 containing_function = decl_function_context (containing_function);
3972 }
3973
3974 /* In a lambda within a template, wait until instantiation time to implicitly
3975 capture a parameter pack. We want to wait because we don't know if we're
3976 capturing the whole pack or a single element, and it's OK to wait because
3977 find_parameter_packs_r walks into the lambda body. */
3978 if (context == containing_function
3979 && DECL_PACK_P (decl)((tree_code_type_tmpl <0>::tree_code_type[(int) (((enum
tree_code) (decl)->base.code))] == tcc_declaration) &&
(((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3979, __FUNCTION__))->typed.type))->base.code) == TYPE_PACK_EXPANSION
|| ((enum tree_code) (((contains_struct_check ((decl), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3979, __FUNCTION__))->typed.type))->base.code) == EXPR_PACK_EXPANSION
))
)
3980 return decl;
3981
3982 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3982, __FUNCTION__, (VAR_DECL)))), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3982, __FUNCTION__))->decl_common.lang_flag_4))
)
3983 {
3984 if (complain & tf_error)
3985 error ("cannot capture member %qD of anonymous union", decl);
3986 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
3987 }
3988 /* Do lambda capture when processing the id-expression, not when
3989 odr-using a variable. */
3990 if (!odr_use && context == containing_function)
3991 decl = add_default_capture (lambda_stack,
3992 /*id=*/DECL_NAME (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 3992, __FUNCTION__))->decl_minimal.name)
, initializer);
3993 /* Only an odr-use of an outer automatic variable causes an
3994 error, and a constant variable can decay to a prvalue
3995 constant without odr-use. So don't complain yet. */
3996 else if (!odr_use && decl_constant_var_p (decl))
3997 return decl;
3998 else if (lambda_expr)
3999 {
4000 if (complain & tf_error)
4001 {
4002 error ("%qD is not captured", decl);
4003 tree closure = LAMBDA_EXPR_CLOSURE (lambda_expr)(((contains_struct_check (((tree_check ((lambda_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4003, __FUNCTION__, (LAMBDA_EXPR)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4003, __FUNCTION__))->typed.type))
;
4004 if (LAMBDA_EXPR_DEFAULT_CAPTURE_MODE (lambda_expr)(((struct tree_lambda_expr *)(tree_check ((lambda_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4004, __FUNCTION__, (LAMBDA_EXPR))))->default_capture_mode
)
== CPLD_NONE)
4005 inform (location_of (closure),
4006 "the lambda has no capture-default");
4007 else if (TYPE_CLASS_SCOPE_P (closure)(((tree_class_check ((closure), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4007, __FUNCTION__))->type_common.context) && (tree_code_type_tmpl
<0>::tree_code_type[(int) (((enum tree_code) (((tree_class_check
((closure), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4007, __FUNCTION__))->type_common.context))->base.code
))] == tcc_type))
)
4008 inform (UNKNOWN_LOCATION((location_t) 0), "lambda in local class %q+T cannot "
4009 "capture variables from the enclosing context",
4010 TYPE_CONTEXT (closure)((tree_class_check ((closure), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4010, __FUNCTION__))->type_common.context)
);
4011 inform (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4011, __FUNCTION__))->decl_minimal.locus)
, "%q#D declared here", decl);
4012 }
4013 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4014 }
4015 else if (processing_contract_conditionscope_chain->x_processing_contract_condition && (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == PARM_DECL))
4016 /* Use of a parameter in a contract condition is fine. */
4017 return decl;
4018 else
4019 {
4020 if (complain & tf_error)
4021 {
4022 error (VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL)
4023 ? G_("use of local variable with automatic storage from ""use of local variable with automatic storage from " "containing function"
4024 "containing function")"use of local variable with automatic storage from " "containing function"
4025 : G_("use of parameter from containing function")"use of parameter from containing function");
4026 inform (DECL_SOURCE_LOCATION (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4026, __FUNCTION__))->decl_minimal.locus)
, "%q#D declared here", decl);
4027 }
4028 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4029 }
4030 return decl;
4031}
4032
4033/* ID_EXPRESSION is a representation of parsed, but unprocessed,
4034 id-expression. (See cp_parser_id_expression for details.) SCOPE,
4035 if non-NULL, is the type or namespace used to explicitly qualify
4036 ID_EXPRESSION. DECL is the entity to which that name has been
4037 resolved.
4038
4039 *CONSTANT_EXPRESSION_P is true if we are presently parsing a
4040 constant-expression. In that case, *NON_CONSTANT_EXPRESSION_P will
4041 be set to true if this expression isn't permitted in a
4042 constant-expression, but it is otherwise not set by this function.
4043 *ALLOW_NON_CONSTANT_EXPRESSION_P is true if we are parsing a
4044 constant-expression, but a non-constant expression is also
4045 permissible.
4046
4047 DONE is true if this expression is a complete postfix-expression;
4048 it is false if this expression is followed by '->', '[', '(', etc.
4049 ADDRESS_P is true iff this expression is the operand of '&'.
4050 TEMPLATE_P is true iff the qualified-id was of the form
4051 "A::template B". TEMPLATE_ARG_P is true iff this qualified name
4052 appears as a template argument.
4053
4054 If an error occurs, and it is the kind of error that might cause
4055 the parser to abort a tentative parse, *ERROR_MSG is filled in. It
4056 is the caller's responsibility to issue the message. *ERROR_MSG
4057 will be a string with static storage duration, so the caller need
4058 not "free" it.
4059
4060 Return an expression for the entity, after issuing appropriate
4061 diagnostics. This function is also responsible for transforming a
4062 reference to a non-static member into a COMPONENT_REF that makes
4063 the use of "this" explicit.
4064
4065 Upon return, *IDK will be filled in appropriately. */
4066static cp_expr
4067finish_id_expression_1 (tree id_expression,
4068 tree decl,
4069 tree scope,
4070 cp_id_kind *idk,
4071 bool integral_constant_expression_p,
4072 bool allow_non_integral_constant_expression_p,
4073 bool *non_integral_constant_expression_p,
4074 bool template_p,
4075 bool done,
4076 bool address_p,
4077 bool template_arg_p,
4078 const char **error_msg,
4079 location_t location)
4080{
4081 decl = strip_using_decl (decl);
4082
4083 /* Initialize the output parameters. */
4084 *idk = CP_ID_KIND_NONE;
4085 *error_msg = NULL__null;
4086
4087 if (id_expression == error_mark_nodeglobal_trees[TI_ERROR_MARK])
4088 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4089 /* If we have a template-id, then no further lookup is
4090 required. If the template-id was for a template-class, we
4091 will sometimes have a TYPE_DECL at this point. */
4092 else if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_ID_EXPR
4093 || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TYPE_DECL)
4094 ;
4095 /* Look up the name. */
4096 else
4097 {
4098 if (decl == error_mark_nodeglobal_trees[TI_ERROR_MARK])
4099 {
4100 /* Name lookup failed. */
4101 if (scope
4102 && (!TYPE_P (scope)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (scope)->base.code))] == tcc_type)
4103 || (!dependent_type_p (scope)
4104 && !(identifier_p (id_expression)
4105 && IDENTIFIER_CONV_OP_P (id_expression)((((tree_not_check2 (((tree_check ((id_expression), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4105, __FUNCTION__, (IDENTIFIER_NODE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4105, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)) & ((tree_not_check2 (((tree_check ((id_expression
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4105, __FUNCTION__, (IDENTIFIER_NODE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4105, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_1) & (!((tree_not_check2 (((tree_check ((id_expression
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4105, __FUNCTION__, (IDENTIFIER_NODE)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4105, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)))
4106 && dependent_type_p (TREE_TYPE (id_expression)((contains_struct_check ((id_expression), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4106, __FUNCTION__))->typed.type)
)))))
4107 {
4108 /* If the qualifying type is non-dependent (and the name
4109 does not name a conversion operator to a dependent
4110 type), issue an error. */
4111 qualified_name_lookup_error (scope, id_expression, decl, location);
4112 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4113 }
4114 else if (!scope)
4115 {
4116 /* It may be resolved via Koenig lookup. */
4117 *idk = CP_ID_KIND_UNQUALIFIED;
4118 return id_expression;
4119 }
4120 else
4121 decl = id_expression;
4122 }
4123
4124 /* Remember that the name was used in the definition of
4125 the current class so that we can check later to see if
4126 the meaning would have been different after the class
4127 was entirely defined. */
4128 if (!scope && decl != error_mark_nodeglobal_trees[TI_ERROR_MARK] && identifier_p (id_expression))
4129 maybe_note_name_used_in_class (id_expression, decl);
4130
4131 /* A use in unevaluated operand might not be instantiated appropriately
4132 if tsubst_copy builds a dummy parm, or if we never instantiate a
4133 generic lambda, so mark it now. */
4134 if (processing_template_declscope_chain->x_processing_template_decl && cp_unevaluated_operand)
4135 mark_type_use (decl);
4136
4137 /* Disallow uses of local variables from containing functions, except
4138 within lambda-expressions. */
4139 if (outer_automatic_var_p (decl))
4140 {
4141 decl = process_outer_var_ref (decl, tf_warning_or_error);
4142 if (decl == error_mark_nodeglobal_trees[TI_ERROR_MARK])
4143 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4144 }
4145
4146 /* Also disallow uses of function parameters outside the function
4147 body, except inside an unevaluated context (i.e. decltype). */
4148 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == PARM_DECL
4149 && DECL_CONTEXT (decl)((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4149, __FUNCTION__))->decl_minimal.context)
== NULL_TREE(tree) __null
4150 && !cp_unevaluated_operand
4151 && !processing_contract_conditionscope_chain->x_processing_contract_condition)
4152 {
4153 *error_msg = G_("use of parameter outside function body")"use of parameter outside function body";
4154 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4155 }
4156 }
4157
4158 /* If we didn't find anything, or what we found was a type,
4159 then this wasn't really an id-expression. */
4160 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_DECL
4161 && !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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4161, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4161, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)
)
4162 {
4163 *error_msg = G_("missing template arguments")"missing template arguments";
4164 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4165 }
4166 else if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TYPE_DECL
4167 || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == NAMESPACE_DECL)
4168 {
4169 *error_msg = G_("expected primary-expression")"expected primary-expression";
4170 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4171 }
4172
4173 /* If the name resolved to a template parameter, there is no
4174 need to look it up again later. */
4175 if ((TREE_CODE (decl)((enum tree_code) (decl)->base.code) == CONST_DECL && DECL_TEMPLATE_PARM_P (decl)(((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4175, __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))
)
4176 || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_PARM_INDEX)
4177 {
4178 tree r;
4179
4180 *idk = CP_ID_KIND_NONE;
4181 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_PARM_INDEX)
4182 decl = TEMPLATE_PARM_DECL (decl)(((template_parm_index*)(tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4182, __FUNCTION__, (TEMPLATE_PARM_INDEX))))->decl)
;
4183 r = DECL_INITIAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4183, __FUNCTION__))->decl_common.initial)
;
4184 if (CLASS_TYPE_P (TREE_TYPE (r))(((((enum tree_code) (((contains_struct_check ((r), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4184, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE
|| (((enum tree_code) (((contains_struct_check ((r), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4184, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE
) && ((tree_class_check ((((contains_struct_check ((r
), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4184, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4184, __FUNCTION__))->type_common.lang_flag_5))
&& !CP_TYPE_CONST_P (TREE_TYPE (r))((cp_type_quals (((contains_struct_check ((r), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4184, __FUNCTION__))->typed.type)) & TYPE_QUAL_CONST
) != 0)
)
4185 {
4186 /* If the entity is a template parameter object for a template
4187 parameter of type T, the type of the expression is const T. */
4188 tree ctype = TREE_TYPE (r)((contains_struct_check ((r), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4188, __FUNCTION__))->typed.type)
;
4189 ctype = cp_build_qualified_type (ctype, (cp_type_quals (ctype)
4190 | TYPE_QUAL_CONST));
4191 r = build1 (VIEW_CONVERT_EXPR, ctype, r);
4192 }
4193 r = convert_from_reference (r);
4194 if (integral_constant_expression_p
4195 && !dependent_type_p (TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4195, __FUNCTION__))->typed.type)
)
4196 && !(INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (r))(((enum tree_code) (((contains_struct_check ((r), (TS_TYPED),
"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4196, __FUNCTION__))->typed.type))->base.code) == ENUMERAL_TYPE
|| (((enum tree_code) (((contains_struct_check ((r), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4196, __FUNCTION__))->typed.type))->base.code) == BOOLEAN_TYPE
|| ((enum tree_code) (((contains_struct_check ((r), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4196, __FUNCTION__))->typed.type))->base.code) == INTEGER_TYPE
))
))
4197 {
4198 if (!allow_non_integral_constant_expression_p)
4199 error ("template parameter %qD of type %qT is not allowed in "
4200 "an integral constant expression because it is not of "
4201 "integral or enumeration type", decl, TREE_TYPE (decl)((contains_struct_check ((decl), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4201, __FUNCTION__))->typed.type)
);
4202 *non_integral_constant_expression_p = true;
4203 }
4204 return r;
4205 }
4206 else if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == UNBOUND_CLASS_TEMPLATE)
4207 {
4208 gcc_checking_assert (scope)((void)(!(scope) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4208, __FUNCTION__), 0 : 0))
;
4209 *idk = CP_ID_KIND_QUALIFIED;
4210 cp_warn_deprecated_use_scopes (scope);
4211 decl = finish_qualified_id_expr (scope, decl, done, address_p,
4212 template_p, template_arg_p,
4213 tf_warning_or_error);
4214 }
4215 else
4216 {
4217 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_ID_EXPR
4218 && variable_template_p (TREE_OPERAND (decl, 0)(*((const_cast<tree*> (tree_operand_check ((decl), (0),
"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4218, __FUNCTION__)))))
)
4219 && !concept_check_p (decl))
4220 /* Try resolving this variable TEMPLATE_ID_EXPR (which is always
4221 considered type-dependent) now, so that the dependence test that
4222 follows gives us the right answer: if it represents a non-dependent
4223 variable template-id then finish_template_variable will yield the
4224 corresponding non-dependent VAR_DECL. */
4225 decl = finish_template_variable (decl);
4226
4227 bool dependent_p = type_dependent_expression_p (decl);
4228
4229 /* If the declaration was explicitly qualified indicate
4230 that. The semantics of `A::f(3)' are different than
4231 `f(3)' if `f' is virtual. */
4232 *idk = (scope
4233 ? CP_ID_KIND_QUALIFIED
4234 : (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TEMPLATE_ID_EXPR
4235 ? CP_ID_KIND_TEMPLATE_ID
4236 : (dependent_p
4237 ? CP_ID_KIND_UNQUALIFIED_DEPENDENT
4238 : CP_ID_KIND_UNQUALIFIED)));
4239
4240 if (dependent_p
4241 && !scope
4242 && DECL_P (decl)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (decl)->base.code))] == tcc_declaration)
4243 && any_dependent_type_attributes_p (DECL_ATTRIBUTES (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4243, __FUNCTION__))->decl_common.attributes)
))
4244 /* Dependent type attributes on the decl mean that the TREE_TYPE is
4245 wrong, so just return the identifier. */
4246 return id_expression;
4247
4248 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4248, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((decl
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4248, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == TYPE_DECL) && (((enum tree_code) (((struct
tree_template_decl *)(const_cast<union tree_node *> ((
((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4248, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == TYPE_DECL && ((contains_struct_check ((
((struct tree_template_decl *)(const_cast<union tree_node *
> ((((tree_check ((decl), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4248, __FUNCTION__, (TEMPLATE_DECL))))))))->result), (TS_DECL_COMMON
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4248, __FUNCTION__))->decl_common.lang_flag_2)))
)
4249 {
4250 error ("use of class template %qT as expression", decl);
4251 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4252 }
4253
4254 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == TREE_LIST)
4255 {
4256 /* Ambiguous reference to base members. */
4257 error ("request for member %qD is ambiguous in "
4258 "multiple inheritance lattice", id_expression);
4259 print_candidates (decl);
4260 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4261 }
4262
4263 /* Mark variable-like entities as used. Functions are similarly
4264 marked either below or after overload resolution. */
4265 if ((VAR_P (decl)(((enum tree_code) (decl)->base.code) == VAR_DECL)
4266 || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == PARM_DECL
4267 || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == CONST_DECL
4268 || TREE_CODE (decl)((enum tree_code) (decl)->base.code) == RESULT_DECL)
4269 && !mark_used (decl))
4270 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4271
4272 /* Only certain kinds of names are allowed in constant
4273 expression. Template parameters have already
4274 been handled above. */
4275 if (! error_operand_p (decl)
4276 && !dependent_p
4277 && integral_constant_expression_p
4278 && !decl_constant_var_p (decl)
4279 && TREE_CODE (decl)((enum tree_code) (decl)->base.code) != CONST_DECL
4280 && !builtin_valid_in_constant_expr_p (decl)
4281 && !concept_check_p (decl))
4282 {
4283 if (!allow_non_integral_constant_expression_p)
4284 {
4285 error ("%qD cannot appear in a constant-expression", decl);
4286 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4287 }
4288 *non_integral_constant_expression_p = true;
4289 }
4290
4291 if (tree wrap = maybe_get_tls_wrapper_call (decl))
4292 /* Replace an evaluated use of the thread_local variable with
4293 a call to its wrapper. */
4294 decl = wrap;
4295 else if (concept_check_p (decl))
4296 {
4297 /* Nothing more to do. All of the analysis for concept checks
4298 is done by build_conept_id, called from the parser. */
4299 }
4300 else if (scope)
4301 {
4302 if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == SCOPE_REF)
4303 {
4304 gcc_assert (same_type_p (scope, TREE_OPERAND (decl, 0)))((void)(!(comptypes ((scope), ((*((const_cast<tree*> (tree_operand_check
((decl), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4304, __FUNCTION__)))))), 0)) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4304, __FUNCTION__), 0 : 0))
;
4305 decl = TREE_OPERAND (decl, 1)(*((const_cast<tree*> (tree_operand_check ((decl), (1),
"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4305, __FUNCTION__)))))
;
4306 }
4307
4308 decl = (adjust_result_of_qualified_name_lookup
4309 (decl, scope, current_nonlambda_class_type()));
4310
4311 cp_warn_deprecated_use_scopes (scope);
4312
4313 if (TYPE_P (scope)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (scope)->base.code))] == tcc_type)
)
4314 decl = finish_qualified_id_expr (scope,
4315 decl,
4316 done,
4317 address_p,
4318 template_p,
4319 template_arg_p,
4320 tf_warning_or_error);
4321 else
4322 decl = convert_from_reference (decl);
4323 }
4324 else if (TREE_CODE (decl)((enum tree_code) (decl)->base.code) == FIELD_DECL)
4325 {
4326 /* Since SCOPE is NULL here, this is an unqualified name.
4327 Access checking has been performed during name lookup
4328 already. Turn off checking to avoid duplicate errors. */
4329 push_deferring_access_checks (dk_no_check);
4330 decl = finish_non_static_data_member (decl, NULL_TREE(tree) __null,
4331 /*qualifying_scope=*/NULL_TREE(tree) __null);
4332 pop_deferring_access_checks ();
4333 }
4334 else if (is_overloaded_fn (decl))
4335 {
4336 /* We only need to look at the first function,
4337 because all the fns share the attribute we're
4338 concerned with (all member fns or all non-members). */
4339 tree first_fn = get_first_fn (decl);
4340 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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4340, __FUNCTION__, (TEMPLATE_DECL))))))))->result : first_fn
)
;
4341
4342 if (!template_arg_p
4343 && (TREE_CODE (first_fn)((enum tree_code) (first_fn)->base.code) == USING_DECL
4344 || (TREE_CODE (first_fn)((enum tree_code) (first_fn)->base.code) == FUNCTION_DECL
4345 && DECL_FUNCTION_MEMBER_P (first_fn)((((enum tree_code) (((contains_struct_check ((first_fn), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4345, __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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4345, __FUNCTION__, (TEMPLATE_DECL))))))))->result : first_fn
)), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4345, __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), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4345, __FUNCTION__, (TEMPLATE_DECL))))))))->result != (tree
) __null && ((enum tree_code) (((struct tree_template_decl
*)(const_cast<union tree_node *> ((((tree_check ((first_fn
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4345, __FUNCTION__, (TEMPLATE_DECL))))))))->result)->
base.code) == FUNCTION_DECL)) || lt->u.base.selector != lds_fn
) lang_check_failed ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4345, __FUNCTION__); &lt->u.fn; })->static_function
))
4346 && !shared_member_p (decl))))
4347 {
4348 /* A set of member functions. */
4349 decl = maybe_dummy_object (DECL_CONTEXT (first_fn)((contains_struct_check ((first_fn), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4349, __FUNCTION__))->decl_minimal.context)
, 0);
4350 return finish_class_member_access_expr (decl, id_expression,
4351 /*template_p=*/false,
4352 tf_warning_or_error);
4353 }
4354
4355 decl = baselink_for_fns (decl);
4356 }
4357 else
4358 {
4359 if (DECL_P (decl)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (decl)->base.code))] == tcc_declaration)
&& DECL_NONLOCAL (decl)((contains_struct_check ((decl), (TS_DECL_COMMON), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4359, __FUNCTION__))->decl_common.nonlocal_flag)
4360 && DECL_CLASS_SCOPE_P (decl)(((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4360, __FUNCTION__))->decl_minimal.context) && (
tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (((contains_struct_check ((decl), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4360, __FUNCTION__))->decl_minimal.context))->base.code
))] == tcc_type))
)
4361 {
4362 tree context = context_for_name_lookup (decl);
4363 if (context != current_class_typescope_chain->class_type)
4364 {
4365 tree path = currently_open_derived_class (context);
4366 if (!path)
4367 /* PATH can be null for using an enum of an unrelated
4368 class; we checked its access in lookup_using_decl.
4369
4370 ??? Should this case make a clone instead, like
4371 handle_using_decl? */
4372 gcc_assert (TREE_CODE (decl) == CONST_DECL)((void)(!(((enum tree_code) (decl)->base.code) == CONST_DECL
) ? fancy_abort ("/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4372, __FUNCTION__), 0 : 0))
;
4373 else
4374 perform_or_defer_access_check (TYPE_BINFO (path)((tree_check3 ((path), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4374, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
,
4375 decl, decl,
4376 tf_warning_or_error);
4377 }
4378 }
4379
4380 decl = convert_from_reference (decl);
4381 }
4382 }
4383
4384 return cp_expr (decl, location);
4385}
4386
4387/* As per finish_id_expression_1, but adding a wrapper node
4388 around the result if needed to express LOCATION. */
4389
4390cp_expr
4391finish_id_expression (tree id_expression,
4392 tree decl,
4393 tree scope,
4394 cp_id_kind *idk,
4395 bool integral_constant_expression_p,
4396 bool allow_non_integral_constant_expression_p,
4397 bool *non_integral_constant_expression_p,
4398 bool template_p,
4399 bool done,
4400 bool address_p,
4401 bool template_arg_p,
4402 const char **error_msg,
4403 location_t location)
4404{
4405 cp_expr result
4406 = finish_id_expression_1 (id_expression, decl, scope, idk,
4407 integral_constant_expression_p,
4408 allow_non_integral_constant_expression_p,
4409 non_integral_constant_expression_p,
4410 template_p, done, address_p, template_arg_p,
4411 error_msg, location);
4412 return result.maybe_add_location_wrapper ();
4413}
4414
4415/* Implement the __typeof keyword: Return the type of EXPR, suitable for
4416 use as a type-specifier. */
4417
4418tree
4419finish_typeof (tree expr)
4420{
4421 tree type;
4422
4423 if (type_dependent_expression_p (expr))
4424 {
4425 type = cxx_make_type (TYPEOF_TYPE);
4426 TYPEOF_TYPE_EXPR (type)(((tree_class_check (((tree_check ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4426, __FUNCTION__, (TYPEOF_TYPE)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4426, __FUNCTION__))->type_non_common.values))
= expr;
4427 SET_TYPE_STRUCTURAL_EQUALITY (type)(((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4427, __FUNCTION__))->type_common.canonical) = (tree) __null
)
;
4428
4429 return type;
4430 }
4431
4432 expr = mark_type_use (expr);
4433
4434 type = unlowered_expr_type (expr);
4435
4436 if (!type || type == unknown_type_nodecp_global_trees[CPTI_UNKNOWN_TYPE])
4437 {
4438 error ("type of %qE is unknown", expr);
4439 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4440 }
4441
4442 return type;
4443}
4444
4445/* Implement the __underlying_type keyword: Return the underlying
4446 type of TYPE, suitable for use as a type-specifier. */
4447
4448tree
4449finish_underlying_type (tree type)
4450{
4451 if (!complete_type_or_else (type, NULL_TREE(tree) __null))
4452 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4453
4454 if (TREE_CODE (type)((enum tree_code) (type)->base.code) != ENUMERAL_TYPE)
4455 {
4456 error ("%qT is not an enumeration type", type);
4457 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4458 }
4459
4460 tree underlying_type = ENUM_UNDERLYING_TYPE (type)((contains_struct_check (((tree_check ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4460, __FUNCTION__, (ENUMERAL_TYPE)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4460, __FUNCTION__))->typed.type)
;
4461
4462 /* Fixup necessary in this case because ENUM_UNDERLYING_TYPE
4463 includes TYPE_MIN_VALUE and TYPE_MAX_VALUE information.
4464 See finish_enum_value_list for details. */
4465 if (!ENUM_FIXED_UNDERLYING_TYPE_P (type)(((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4465, __FUNCTION__))->type_common.lang_flag_5))
)
4466 underlying_type
4467 = c_common_type_for_mode (TYPE_MODE (underlying_type)((((enum tree_code) ((tree_class_check ((underlying_type), (tcc_type
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4467, __FUNCTION__)))->base.code) == VECTOR_TYPE) ? vector_type_mode
(underlying_type) : (underlying_type)->type_common.mode)
,
4468 TYPE_UNSIGNED (underlying_type)((tree_class_check ((underlying_type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4468, __FUNCTION__))->base.u.bits.unsigned_flag)
);
4469
4470 return underlying_type;
4471}
4472
4473/* Implement the __direct_bases keyword: Return the direct base classes
4474 of type. */
4475
4476tree
4477calculate_direct_bases (tree type, tsubst_flags_t complain)
4478{
4479 if (!complete_type_or_maybe_complain (type, NULL_TREE(tree) __null, complain)
4480 || !NON_UNION_CLASS_TYPE_P (type)(((enum tree_code) (type)->base.code) == RECORD_TYPE &&
((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4480, __FUNCTION__))->type_common.lang_flag_5))
)
4481 return make_tree_vec (0);
4482
4483 releasing_vec vector;
4484 vec<tree, va_gc> *base_binfos = BINFO_BASE_BINFOS (TYPE_BINFO (type))(&(tree_check ((((tree_check3 ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4484, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4484, __FUNCTION__, (TREE_BINFO)))->binfo.base_binfos)
;
4485 tree binfo;
4486 unsigned i;
4487
4488 /* Virtual bases are initialized first */
4489 for (i = 0; base_binfos->iterate (i, &binfo); i++)
4490 if (BINFO_VIRTUAL_P (binfo)((tree_check ((binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4490, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
4491 vec_safe_push (vector, binfo);
4492
4493 /* Now non-virtuals */
4494 for (i = 0; base_binfos->iterate (i, &binfo); i++)
4495 if (!BINFO_VIRTUAL_P (binfo)((tree_check ((binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4495, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
4496 vec_safe_push (vector, binfo);
4497
4498 tree bases_vec = make_tree_vec (vector->length ());
4499
4500 for (i = 0; i < vector->length (); ++i)
4501 TREE_VEC_ELT (bases_vec, i)(*((const_cast<tree *> (tree_vec_elt_check ((bases_vec)
, (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4501, __FUNCTION__)))))
= BINFO_TYPE ((*vector)[i])((contains_struct_check (((tree_check (((*vector)[i]), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4501, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4501, __FUNCTION__))->typed.type)
;
4502
4503 return bases_vec;
4504}
4505
4506/* Implement the __bases keyword: Return the base classes
4507 of type */
4508
4509/* Find morally non-virtual base classes by walking binfo hierarchy */
4510/* Virtual base classes are handled separately in finish_bases */
4511
4512static tree
4513dfs_calculate_bases_pre (tree binfo, void * /*data_*/)
4514{
4515 /* Don't walk bases of virtual bases */
4516 return BINFO_VIRTUAL_P (binfo)((tree_check ((binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4516, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
? dfs_skip_bases((tree)1) : NULL_TREE(tree) __null;
4517}
4518
4519static tree
4520dfs_calculate_bases_post (tree binfo, void *data_)
4521{
4522 vec<tree, va_gc> **data = ((vec<tree, va_gc> **) data_);
4523 if (!BINFO_VIRTUAL_P (binfo)((tree_check ((binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4523, __FUNCTION__, (TREE_BINFO)))->base.static_flag)
)
4524 vec_safe_push (*data, BINFO_TYPE (binfo)((contains_struct_check (((tree_check ((binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4524, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4524, __FUNCTION__))->typed.type)
);
4525 return NULL_TREE(tree) __null;
4526}
4527
4528/* Calculates the morally non-virtual base classes of a class */
4529static vec<tree, va_gc> *
4530calculate_bases_helper (tree type)
4531{
4532 vec<tree, va_gc> *vector = make_tree_vector ();
4533
4534 /* Now add non-virtual base classes in order of construction */
4535 if (TYPE_BINFO (type)((tree_check3 ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4535, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
)
4536 dfs_walk_all (TYPE_BINFO (type)((tree_check3 ((type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4536, __FUNCTION__, (RECORD_TYPE), (UNION_TYPE), (QUAL_UNION_TYPE
)))->type_non_common.maxval)
,
4537 dfs_calculate_bases_pre, dfs_calculate_bases_post, &vector);
4538 return vector;
4539}
4540
4541tree
4542calculate_bases (tree type, tsubst_flags_t complain)
4543{
4544 if (!complete_type_or_maybe_complain (type, NULL_TREE(tree) __null, complain)
4545 || !NON_UNION_CLASS_TYPE_P (type)(((enum tree_code) (type)->base.code) == RECORD_TYPE &&
((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4545, __FUNCTION__))->type_common.lang_flag_5))
)
4546 return make_tree_vec (0);
4547
4548 releasing_vec vector;
4549 tree bases_vec = NULL_TREE(tree) __null;
4550 unsigned i;
4551 vec<tree, va_gc> *vbases;
4552 tree binfo;
4553
4554 /* First go through virtual base classes */
4555 for (vbases = CLASSTYPE_VBASECLASSES (type)((((tree_class_check ((type), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4555, __FUNCTION__))->type_with_lang_specific.lang_specific
))->vbases)
, i = 0;
4556 vec_safe_iterate (vbases, i, &binfo); i++)
4557 {
4558 releasing_vec vbase_bases
4559 = calculate_bases_helper (BINFO_TYPE (binfo)((contains_struct_check (((tree_check ((binfo), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4559, __FUNCTION__, (TREE_BINFO)))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4559, __FUNCTION__))->typed.type)
);
4560 vec_safe_splice (vector, vbase_bases);
4561 }
4562
4563 /* Now for the non-virtual bases */
4564 releasing_vec nonvbases = calculate_bases_helper (type);
4565 vec_safe_splice (vector, nonvbases);
4566
4567 /* Note that during error recovery vector->length can even be zero. */
4568 if (vector->length () > 1)
4569 {
4570 /* Last element is entire class, so don't copy */
4571 bases_vec = make_tree_vec (vector->length () - 1);
4572
4573 for (i = 0; i < vector->length () - 1; ++i)
4574 TREE_VEC_ELT (bases_vec, i)(*((const_cast<tree *> (tree_vec_elt_check ((bases_vec)
, (i), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4574, __FUNCTION__)))))
= (*vector)[i];
4575 }
4576 else
4577 bases_vec = make_tree_vec (0);
4578
4579 return bases_vec;
4580}
4581
4582tree
4583finish_bases (tree type, bool direct)
4584{
4585 tree bases = NULL_TREE(tree) __null;
4586
4587 if (!processing_template_declscope_chain->x_processing_template_decl)
4588 {
4589 /* Parameter packs can only be used in templates */
4590 error ("parameter pack %<__bases%> only valid in template declaration");
4591 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4592 }
4593
4594 bases = cxx_make_type (BASES);
4595 BASES_TYPE (bases)(((tree_class_check (((tree_check ((bases), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4595, __FUNCTION__, (BASES)))), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4595, __FUNCTION__))->type_non_common.values))
= type;
4596 BASES_DIRECT (bases)((tree_not_check2 (((tree_check ((bases), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4596, __FUNCTION__, (BASES)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4596, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
= direct;
4597 SET_TYPE_STRUCTURAL_EQUALITY (bases)(((tree_class_check ((bases), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4597, __FUNCTION__))->type_common.canonical) = (tree) __null
)
;
4598
4599 return bases;
4600}
4601
4602/* Perform C++-specific checks for __builtin_offsetof before calling
4603 fold_offsetof. */
4604
4605tree
4606finish_offsetof (tree object_ptr, tree expr, location_t loc)
4607{
4608 /* If we're processing a template, we can't finish the semantics yet.
4609 Otherwise we can fold the entire expression now. */
4610 if (processing_template_declscope_chain->x_processing_template_decl)
4611 {
4612 expr = build2 (OFFSETOF_EXPR, size_type_nodeglobal_trees[TI_SIZE_TYPE], expr, object_ptr);
4613 SET_EXPR_LOCATION (expr, loc)(expr_check (((expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4613, __FUNCTION__))->exp.locus = (loc)
;
4614 return expr;
4615 }
4616
4617 if (expr == error_mark_nodeglobal_trees[TI_ERROR_MARK])
4618 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4619
4620 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == PSEUDO_DTOR_EXPR)
4621 {
4622 error ("cannot apply %<offsetof%> to destructor %<~%T%>",
4623 TREE_OPERAND (expr, 2)(*((const_cast<tree*> (tree_operand_check ((expr), (2),
"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4623, __FUNCTION__)))))
);
4624 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4625 }
4626 if (FUNC_OR_METHOD_TYPE_P (TREE_TYPE (expr))(((enum tree_code) (((contains_struct_check ((expr), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4626, __FUNCTION__))->typed.type))->base.code) == FUNCTION_TYPE
|| ((enum tree_code) (((contains_struct_check ((expr), (TS_TYPED
), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4626, __FUNCTION__))->typed.type))->base.code) == METHOD_TYPE
)
4627 || TREE_TYPE (expr)((contains_struct_check ((expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4627, __FUNCTION__))->typed.type)
== unknown_type_nodecp_global_trees[CPTI_UNKNOWN_TYPE])
4628 {
4629 while (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == COMPONENT_REF
4630 || TREE_CODE (expr)((enum tree_code) (expr)->base.code) == COMPOUND_EXPR)
4631 expr = TREE_OPERAND (expr, 1)(*((const_cast<tree*> (tree_operand_check ((expr), (1),
"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4631, __FUNCTION__)))))
;
4632
4633 if (DECL_P (expr)(tree_code_type_tmpl <0>::tree_code_type[(int) (((enum tree_code
) (expr)->base.code))] == tcc_declaration)
)
4634 {
4635 error ("cannot apply %<offsetof%> to member function %qD", expr);
4636 inform (DECL_SOURCE_LOCATION (expr)((contains_struct_check ((expr), (TS_DECL_MINIMAL), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4636, __FUNCTION__))->decl_minimal.locus)
, "declared here");
4637 }
4638 else
4639 error ("cannot apply %<offsetof%> to member function");
4640 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4641 }
4642 if (TREE_CODE (expr)((enum tree_code) (expr)->base.code) == CONST_DECL)
4643 {
4644 error ("cannot apply %<offsetof%> to an enumerator %qD", expr);
4645 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4646 }
4647 if (REFERENCE_REF_P (expr)((((enum tree_code) (expr)->base.code) == INDIRECT_REF) &&
((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
((expr), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4647, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4647, __FUNCTION__))->typed.type) && (((enum tree_code
) (((contains_struct_check (((*((const_cast<tree*> (tree_operand_check
(((expr)), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4647, __FUNCTION__)))))), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4647, __FUNCTION__))->typed.type))->base.code) == REFERENCE_TYPE
))
)
4648 expr = TREE_OPERAND (expr, 0)(*((const_cast<tree*> (tree_operand_check ((expr), (0),
"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4648, __FUNCTION__)))))
;
4649 if (!complete_type_or_else (TREE_TYPE (TREE_TYPE (object_ptr))((contains_struct_check ((((contains_struct_check ((object_ptr
), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4649, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4649, __FUNCTION__))->typed.type)
, object_ptr))
4650 return error_mark_nodeglobal_trees[TI_ERROR_MARK];
4651 if (warn_invalid_offsetofglobal_options.x_warn_invalid_offsetof
4652 && CLASS_TYPE_P (TREE_TYPE (TREE_TYPE (object_ptr)))(((((enum tree_code) (((contains_struct_check ((((contains_struct_check
((object_ptr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4652, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4652, __FUNCTION__))->typed.type))->base.code)) == RECORD_TYPE
|| (((enum tree_code) (((contains_struct_check ((((contains_struct_check
((object_ptr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4652, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4652, __FUNCTION__))->typed.type))->base.code)) == UNION_TYPE
) && ((tree_class_check ((((contains_struct_check (((
(contains_struct_check ((object_ptr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4652, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4652, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4652, __FUNCTION__))->type_common.lang_flag_5))
4653 && CLASSTYPE_NON_STD_LAYOUT (TREE_TYPE (TREE_TYPE (object_ptr)))((((tree_class_check ((((contains_struct_check ((((contains_struct_check
((object_ptr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4653, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4653, __FUNCTION__))->typed.type)), (tcc_type), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4653, __FUNCTION__))->type_with_lang_specific.lang_specific
))->non_std_layout)
4654 && cp_unevaluated_operand == 0)
4655 warning_at (loc, OPT_Winvalid_offsetof, "%<offsetof%> within "
4656 "non-standard-layout type %qT is conditionally-supported",
4657 TREE_TYPE (TREE_TYPE (object_ptr))((contains_struct_check ((((contains_struct_check ((object_ptr
), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4657, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4657, __FUNCTION__))->typed.type)
);
4658 return fold_offsetof (expr);
4659}
4660
4661/* Replace the AGGR_INIT_EXPR at *TP with an equivalent CALL_EXPR. This
4662 function is broken out from the above for the benefit of the tree-ssa
4663 project. */
4664
4665void
4666simplify_aggr_init_expr (tree *tp)
4667{
4668 tree aggr_init_expr = *tp;
4669
4670 /* Form an appropriate CALL_EXPR. */
4671 tree fn = AGGR_INIT_EXPR_FN (aggr_init_expr)(*((const_cast<tree*> (tree_operand_check (((tree_check
((aggr_init_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4671, __FUNCTION__, (AGGR_INIT_EXPR)))), (1), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4671, __FUNCTION__)))))
;
4672 tree slot = AGGR_INIT_EXPR_SLOT (aggr_init_expr)(*((const_cast<tree*> (tree_operand_check (((tree_check
((aggr_init_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4672, __FUNCTION__, (AGGR_INIT_EXPR)))), (2), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4672, __FUNCTION__)))))
;
4673 tree type = TREE_TYPE (slot)((contains_struct_check ((slot), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4673, __FUNCTION__))->typed.type)
;
4674
4675 tree call_expr;
4676 enum style_t { ctor, arg, pcc } style;
4677
4678 if (AGGR_INIT_VIA_CTOR_P (aggr_init_expr)((tree_not_check2 (((tree_check ((aggr_init_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4678, __FUNCTION__, (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4678, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_0)
)
4679 style = ctor;
4680#ifdef PCC_STATIC_STRUCT_RETURN
4681 else if (1)
4682 style = pcc;
4683#endif
4684 else
4685 {
4686 gcc_assert (TREE_ADDRESSABLE (type))((void)(!(((type)->base.addressable_flag)) ? fancy_abort (
"/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4686, __FUNCTION__), 0 : 0))
;
4687 style = arg;
4688 }
4689
4690 call_expr = build_call_array_loc (input_location,
4691 TREE_TYPE (TREE_TYPE (TREE_TYPE (fn)))((contains_struct_check ((((contains_struct_check ((((contains_struct_check
((fn), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4691, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4691, __FUNCTION__))->typed.type)), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4691, __FUNCTION__))->typed.type)
,
4692 fn,
4693 aggr_init_expr_nargs (aggr_init_expr)(((int)((unsigned long) (*tree_int_cst_elt_check (((tree_class_check
((aggr_init_expr), (tcc_vl_exp), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4693, __FUNCTION__))->exp.operands[0]), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4693, __FUNCTION__)))) - 3)
,
4694 AGGR_INIT_EXPR_ARGP (aggr_init_expr)(&((*((const_cast<tree*> (tree_operand_check (((tree_check
((aggr_init_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4694, __FUNCTION__, (AGGR_INIT_EXPR)))), (0), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4694, __FUNCTION__)))))) + 3)
);
4695 TREE_NOTHROW (call_expr)((call_expr)->base.nothrow_flag) = TREE_NOTHROW (aggr_init_expr)((aggr_init_expr)->base.nothrow_flag);
4696 CALL_FROM_THUNK_P (call_expr)((tree_check ((call_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4696, __FUNCTION__, (CALL_EXPR)))->base.protected_flag)
= AGGR_INIT_FROM_THUNK_P (aggr_init_expr)((tree_check ((aggr_init_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4696, __FUNCTION__, (AGGR_INIT_EXPR)))->base.protected_flag
)
;
4697 CALL_EXPR_OPERATOR_SYNTAX (call_expr)((tree_not_check2 (((tree_check2 (((call_expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4697, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4697, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_6)
4698 = CALL_EXPR_OPERATOR_SYNTAX (aggr_init_expr)((tree_not_check2 (((tree_check2 (((aggr_init_expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4698, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4698, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_6)
;
4699 CALL_EXPR_ORDERED_ARGS (call_expr)((tree_not_check2 (((tree_check2 (((call_expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4699, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4699, __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)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4699, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4699, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_3)
;
4700 CALL_EXPR_REVERSE_ARGS (call_expr)((tree_not_check2 (((tree_check2 (((call_expr)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4700, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4700, __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)), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4700, __FUNCTION__, (CALL_EXPR), (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4700, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_5)
;
4701
4702 if (style == ctor)
4703 {
4704 /* Replace the first argument to the ctor with the address of the
4705 slot. */
4706 cxx_mark_addressable (slot);
4707 CALL_EXPR_ARG (call_expr, 0)(*((const_cast<tree*> (tree_operand_check (((tree_check
((call_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4707, __FUNCTION__, (CALL_EXPR)))), ((0) + 3), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4707, __FUNCTION__)))))
=
4708 build1 (ADDR_EXPR, build_pointer_type (type), slot);
4709 }
4710 else if (style == arg)
4711 {
4712 /* Just mark it addressable here, and leave the rest to
4713 expand_call{,_inline}. */
4714 cxx_mark_addressable (slot);
4715 CALL_EXPR_RETURN_SLOT_OPT (call_expr)((tree_check ((call_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4715, __FUNCTION__, (CALL_EXPR)))->base.private_flag)
= true;
4716 call_expr = cp_build_init_expr (slot, call_expr);
4717 }
4718 else if (style == pcc)
4719 {
4720 /* If we're using the non-reentrant PCC calling convention, then we
4721 need to copy the returned value out of the static buffer into the
4722 SLOT. */
4723 push_deferring_access_checks (dk_no_check);
4724 call_expr = build_aggr_init (slot, call_expr,
4725 DIRECT_BIND(1 << 3) | LOOKUP_ONLYCONVERTING(1 << 2),
4726 tf_warning_or_error);
4727 pop_deferring_access_checks ();
4728 call_expr = build2 (COMPOUND_EXPR, TREE_TYPE (slot)((contains_struct_check ((slot), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4728, __FUNCTION__))->typed.type)
, call_expr, slot);
4729 }
4730
4731 if (AGGR_INIT_ZERO_FIRST (aggr_init_expr)((tree_not_check2 (((tree_check ((aggr_init_expr), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4731, __FUNCTION__, (AGGR_INIT_EXPR)))), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4731, __FUNCTION__, (TREE_VEC), (SSA_NAME)))->base.u.bits
.lang_flag_2)
)
4732 {
4733 tree init = build_zero_init (type, NULL_TREE(tree) __null,
4734 /*static_storage_p=*/false);
4735 init = cp_build_init_expr (slot, init);
4736 call_expr = build2 (COMPOUND_EXPR, TREE_TYPE (call_expr)((contains_struct_check ((call_expr), (TS_TYPED), "/buildworker/marxinbox-gcc-clang-static-analyzer/build/gcc/cp/semantics.cc"
, 4736, __FUNCTION__))->typed.type)
,
4737 init, call_expr);
4738 }
4739
4740 *tp = call_expr;
4741}
4742
4743/* Emit all thunks to FN that should be emitted when FN is emitted. */
4744
4745void
4746emit_associated_thunks (tree fn)
4747{
4748 /* When we use vcall offsets, we emit thunks with the virtual