Lines Matching refs:NODE
164 The BV_DELTA of each node gives the amount by which to adjust the
170 The BV_VCALL_INDEX of each node, if non-NULL, gives the vtable
193 #define VAR_OR_FUNCTION_DECL_CHECK(NODE) \
194 TREE_CHECK2(NODE,VAR_DECL,FUNCTION_DECL)
196 #define VAR_FUNCTION_OR_PARM_DECL_CHECK(NODE) \
197 TREE_CHECK3(NODE,VAR_DECL,FUNCTION_DECL,PARM_DECL)
199 #define VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK(NODE) \
200 TREE_CHECK4(NODE,VAR_DECL,FUNCTION_DECL,TYPE_DECL,TEMPLATE_DECL)
202 #define BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK(NODE) \
203 TREE_CHECK(NODE,BOUND_TEMPLATE_TEMPLATE_PARM)
206 #define NON_THUNK_FUNCTION_CHECK(NODE) __extension__ \
207 ({ __typeof(NODE) const __t = (NODE); \
213 #define THUNK_FUNCTION_CHECK(NODE) __extension__ \
214 ({ __typeof (NODE) const __t = (NODE); \
220 #define NON_THUNK_FUNCTION_CHECK(NODE) (NODE)
221 #define THUNK_FUNCTION_CHECK(NODE) (NODE)
237 keyword. C_RID_CODE (node) is then the RID_* value of the keyword,
242 #define LANG_IDENTIFIER_CAST(NODE) \
243 ((struct lang_identifier*)IDENTIFIER_NODE_CHECK (NODE))
265 #define IDENTIFIER_GLOBAL_VALUE(NODE) \
266 namespace_binding ((NODE), global_namespace)
267 #define SET_IDENTIFIER_GLOBAL_VALUE(NODE, VAL) \
268 set_namespace_binding ((NODE), global_namespace, (VAL))
269 #define IDENTIFIER_NAMESPACE_VALUE(NODE) \
270 namespace_binding ((NODE), current_namespace)
271 #define SET_IDENTIFIER_NAMESPACE_VALUE(NODE, VAL) \
272 set_namespace_binding ((NODE), current_namespace, (VAL))
274 #define CLEANUP_P(NODE) TREE_LANG_FLAG_0 (TRY_BLOCK_CHECK (NODE))
276 #define BIND_EXPR_TRY_BLOCK(NODE) \
277 TREE_LANG_FLAG_0 (BIND_EXPR_CHECK (NODE))
280 #define BIND_EXPR_BODY_BLOCK(NODE) \
281 TREE_LANG_FLAG_3 (BIND_EXPR_CHECK (NODE))
282 #define FUNCTION_NEEDS_BODY_BLOCK(NODE) \
283 (DECL_CONSTRUCTOR_P (NODE) || DECL_DESTRUCTOR_P (NODE))
285 #define STATEMENT_LIST_NO_SCOPE(NODE) \
286 TREE_LANG_FLAG_0 (STATEMENT_LIST_CHECK (NODE))
287 #define STATEMENT_LIST_TRY_BLOCK(NODE) \
288 TREE_LANG_FLAG_2 (STATEMENT_LIST_CHECK (NODE))
293 #define STMT_IS_FULL_EXPR_P(NODE) TREE_LANG_FLAG_1 ((NODE))
296 #define EXPR_STMT_STMT_EXPR_RESULT(NODE) \
297 TREE_LANG_FLAG_0 (EXPR_STMT_CHECK (NODE))
300 #define STMT_EXPR_NO_SCOPE(NODE) \
301 TREE_LANG_FLAG_0 (STMT_EXPR_CHECK (NODE))
317 /* Returns nonzero iff NODE is a declaration for the global function
319 #define DECL_MAIN_P(NODE) \
320 (DECL_EXTERN_C_FUNCTION_P (NODE) \
321 && DECL_NAME (NODE) != NULL_TREE \
322 && MAIN_NAME_P (DECL_NAME (NODE)) \
326 #define OVL_FUNCTION(NODE) \
327 (((struct tree_overload*)OVERLOAD_CHECK (NODE))->function)
328 #define OVL_CHAIN(NODE) TREE_CHAIN (NODE)
330 #define OVL_CURRENT(NODE) \
331 ((TREE_CODE (NODE) == OVERLOAD) ? OVL_FUNCTION (NODE) : (NODE))
332 #define OVL_NEXT(NODE) \
333 ((TREE_CODE (NODE) == OVERLOAD) ? TREE_CHAIN (NODE) : NULL_TREE)
336 is not important for this node. */
337 #define OVL_USED(NODE) TREE_USED (NODE)
345 /* Returns true iff NODE is a BASELINK. */
346 #define BASELINK_P(NODE) \
347 (TREE_CODE (NODE) == BASELINK)
349 #define BASELINK_BINFO(NODE) \
350 (((struct tree_baselink*) BASELINK_CHECK (NODE))->binfo)
353 #define BASELINK_FUNCTIONS(NODE) \
354 (((struct tree_baselink*) BASELINK_CHECK (NODE))->functions)
358 #define BASELINK_ACCESS_BINFO(NODE) \
359 (((struct tree_baselink*) BASELINK_CHECK (NODE))->access_binfo)
365 #define BASELINK_OPTYPE(NODE) \
366 (TREE_CHAIN (BASELINK_CHECK (NODE)))
368 #define BASELINK_QUALIFIED_P(NODE) \
369 TREE_LANG_FLAG_0 (BASELINK_CHECK (NODE))
397 #define IDENTIFIER_NAMESPACE_BINDINGS(NODE) \
398 (LANG_IDENTIFIER_CAST (NODE)->namespace_bindings)
399 #define IDENTIFIER_TEMPLATE(NODE) \
400 (LANG_IDENTIFIER_CAST (NODE)->class_template_info)
405 name lookup consists simply of pulling off the node at the front
409 #define IDENTIFIER_BINDING(NODE) \
410 (LANG_IDENTIFIER_CAST (NODE)->bindings)
416 #define IDENTIFIER_TYPE_VALUE(NODE) identifier_type_value (NODE)
417 #define REAL_IDENTIFIER_TYPE_VALUE(NODE) TREE_TYPE (NODE)
418 #define SET_IDENTIFIER_TYPE_VALUE(NODE,TYPE) (TREE_TYPE (NODE) = (TYPE))
419 #define IDENTIFIER_HAS_TYPE_VALUE(NODE) (IDENTIFIER_TYPE_VALUE (NODE) ? 1 : 0)
421 #define IDENTIFIER_LABEL_VALUE(NODE) \
422 (LANG_IDENTIFIER_CAST (NODE)->label_value)
423 #define SET_IDENTIFIER_LABEL_VALUE(NODE, VALUE) \
424 IDENTIFIER_LABEL_VALUE (NODE) = (VALUE)
428 #define IDENTIFIER_VIRTUAL_P(NODENODE)
432 #define IDENTIFIER_OPNAME_P(NODE) TREE_LANG_FLAG_2 (NODE)
436 #define IDENTIFIER_TYPENAME_P(NODE) \
437 TREE_LANG_FLAG_4 (NODE)
441 #define IDENTIFIER_CTOR_OR_DTOR_P(NODE) \
442 TREE_LANG_FLAG_3 (NODE)
456 #define DEFARG_TOKENS(NODE) \
457 (((struct tree_default_arg *)DEFAULT_ARG_CHECK (NODE))->tokens)
458 #define DEFARG_INSTANTIATIONS(NODE) \
459 (((struct tree_default_arg *)DEFAULT_ARG_CHECK (NODE))->instantiations)
470 #define STATIC_ASSERT_CONDITION(NODE) \
471 (((struct tree_static_assert *)STATIC_ASSERT_CHECK (NODE))->condition)
476 #define STATIC_ASSERT_MESSAGE(NODE) \
477 (((struct tree_static_assert *)STATIC_ASSERT_CHECK (NODE))->message)
480 #define STATIC_ASSERT_SOURCE_LOCATION(NODE) \
481 (((struct tree_static_assert *)STATIC_ASSERT_CHECK (NODE))->location)
522 #define TRAIT_EXPR_TYPE1(NODE) \
523 (((struct tree_trait_expr *)TRAIT_EXPR_CHECK (NODE))->type1)
525 #define TRAIT_EXPR_TYPE2(NODE) \
526 (((struct tree_trait_expr *)TRAIT_EXPR_CHECK (NODE))->type2)
529 #define TRAIT_EXPR_KIND(NODE) \
530 (((struct tree_trait_expr *)TRAIT_EXPR_CHECK (NODE))->kind)
749 /* Node to indicate default access. This must be distinct from the
814 active template parameters. Each node in the list represents one
817 TREE_PURPOSE of each node. The parameters for that level are
949 /* True if NODE is an erroneous expression. */
951 #define error_operand_p(NODE) \
952 ((NODE) == error_mark_node \
953 || ((NODE) && TREE_TYPE ((NODE)) == error_mark_node))
964 #define TYPE_IDENTIFIER(NODE) (DECL_NAME (TYPE_NAME (NODE)))
965 #define TYPE_LINKAGE_IDENTIFIER(NODE) \
966 (TYPE_IDENTIFIER (TYPE_MAIN_VARIANT (NODE)))
967 #define TYPE_NAME_STRING(NODE) (IDENTIFIER_POINTER (TYPE_IDENTIFIER (NODE)))
968 #define TYPE_NAME_LENGTH(NODE) (IDENTIFIER_LENGTH (TYPE_IDENTIFIER (NODE)))
970 /* Nonzero if NODE has no name for linkage purposes. */
971 #define TYPE_ANONYMOUS_P(NODE) \
972 (TAGGED_TYPE_P (NODE) && ANON_AGGRNAME_P (TYPE_LINKAGE_IDENTIFIER (NODE)))
975 #define TYPE_MAIN_DECL(NODE) (TYPE_STUB_DECL (TYPE_MAIN_VARIANT (NODE)))
1011 #define TYPE_FOR_JAVA(NODE) TYPE_LANG_FLAG_3 (NODE)
1015 #define TYPE_DEPENDENT_P(NODE) TYPE_LANG_FLAG_0 (NODE)
1019 #define TYPE_DEPENDENT_P_VALID(NODE) TYPE_LANG_FLAG_6(NODE)
1022 #define CP_TYPE_CONST_P(NODE) \
1023 ((cp_type_quals (NODE) & TYPE_QUAL_CONST) != 0)
1026 #define CP_TYPE_VOLATILE_P(NODE) \
1027 ((cp_type_quals (NODE) & TYPE_QUAL_VOLATILE) != 0)
1030 #define CP_TYPE_RESTRICT_P(NODE) \
1031 ((cp_type_quals (NODE) & TYPE_QUAL_RESTRICT) != 0)
1037 #define CP_TYPE_CONST_NON_VOLATILE_P(NODE) \
1038 ((cp_type_quals (NODE) & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE)) \
1041 #define FUNCTION_ARG_CHAIN(NODE) \
1042 TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (NODE)))
1046 #define FUNCTION_FIRST_USER_PARMTYPE(NODE) \
1047 skip_artificial_parms_for ((NODE), TYPE_ARG_TYPES (TREE_TYPE (NODE)))
1050 #define FUNCTION_FIRST_USER_PARM(NODE) \
1051 skip_artificial_parms_for ((NODE), DECL_ARGUMENTS (NODE))
1205 #define LANG_TYPE_CLASS_CHECK(NODE) __extension__ \
1206 ({ struct lang_type *lt = TYPE_LANG_SPECIFIC (NODE); \
1211 #define LANG_TYPE_PTRMEM_CHECK(NODE) __extension__ \
1212 ({ struct lang_type *lt = TYPE_LANG_SPECIFIC (NODE); \
1219 #define LANG_TYPE_CLASS_CHECK(NODE) (&TYPE_LANG_SPECIFIC (NODE)->u.c)
1220 #define LANG_TYPE_PTRMEM_CHECK(NODE) (&TYPE_LANG_SPECIFIC (NODE)->u.ptrmem)
1229 #define CLASSTYPE_INLINE_FRIENDS(NODE) CLASSTYPE_PURE_VIRTUALS (NODE)
1232 #define TYPE_GETS_DELETE(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->gets_delete)
1233 #define TYPE_GETS_REG_DELETE(NODE) (TYPE_GETS_DELETE (NODE) & 1)
1235 /* Nonzero if `new NODE[x]' should cause the allocation of extra
1237 #define TYPE_VEC_NEW_USES_COOKIE(NODE) \
1238 (CLASS_TYPE_P (NODE) \
1239 && LANG_TYPE_CLASS_CHECK (NODE)->vec_new_uses_cookie)
1241 /* Nonzero means that this _CLASSTYPE node defines ways of converting
1243 #define TYPE_HAS_CONVERSION(NODE) \
1244 (LANG_TYPE_CLASS_CHECK (NODE)->h.has_type_conversion)
1246 /* Nonzero means that NODE (a class type) has a default constructor --
1248 #define CLASSTYPE_LAZY_DEFAULT_CTOR(NODE) \
1249 (LANG_TYPE_CLASS_CHECK (NODE)->lazy_default_ctor)
1251 /* Nonzero means that NODE (a class type) has a copy constructor --
1253 #define CLASSTYPE_LAZY_COPY_CTOR(NODE) \
1254 (LANG_TYPE_CLASS_CHECK (NODE)->lazy_copy_ctor)
1256 /* Nonzero means that NODE (a class type) has an assignment operator
1258 #define CLASSTYPE_LAZY_ASSIGNMENT_OP(NODE) \
1259 (LANG_TYPE_CLASS_CHECK (NODE)->lazy_assignment_op)
1261 /* Nonzero means that NODE (a class type) has a destructor -- but that
1263 #define CLASSTYPE_LAZY_DESTRUCTOR(NODE) \
1264 (LANG_TYPE_CLASS_CHECK (NODE)->lazy_destructor)
1266 /* Nonzero means that this _CLASSTYPE node overloads operator=(X&). */
1267 #define TYPE_HAS_ASSIGN_REF(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->has_assign_ref)
1269 /* True iff the class type NODE has an "operator =" whose parameter
1271 #define TYPE_HAS_CONST_ASSIGN_REF(NODE) \
1272 (LANG_TYPE_CLASS_CHECK (NODE)->h.has_const_assign_ref)
1274 /* Nonzero means that this _CLASSTYPE node has an X(X&) constructor. */
1275 #define TYPE_HAS_INIT_REF(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->h.has_init_ref)
1276 #define TYPE_HAS_CONST_INIT_REF(NODE) \
1277 (LANG_TYPE_CLASS_CHECK (NODE)->has_const_init_ref)
1280 #define TYPE_HAS_LIST_CTOR(NODE) \
1281 (LANG_TYPE_CLASS_CHECK (NODE)->has_list_ctor)
1285 #define TYPE_HAS_NEW_OPERATOR(NODE) \
1286 (LANG_TYPE_CLASS_CHECK (NODE)->has_new)
1289 #define TYPE_HAS_ARRAY_NEW_OPERATOR(NODE) \
1290 (LANG_TYPE_CLASS_CHECK (NODE)->has_array_new)
1294 #define TYPE_BEING_DEFINED(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->being_defined)
1297 #define TYPE_MARKED_P(NODE) TREE_LANG_FLAG_6 (TYPE_CHECK (NODE))
1299 /* Nonzero if the class NODE has multiple paths to the same (virtual)
1301 #define CLASSTYPE_DIAMOND_SHAPED_P(NODE) \
1302 (LANG_TYPE_CLASS_CHECK(NODE)->diamond_shaped)
1304 /* Nonzero if the class NODE has multiple instances of the same base
1306 #define CLASSTYPE_REPEATED_BASE_P(NODE) \
1307 (LANG_TYPE_CLASS_CHECK(NODE)->repeated_base)
1312 #define CLASSTYPE_KEY_METHOD(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->key_method)
1326 #define CLASSTYPE_METHOD_VEC(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->methods)
1332 #define CLASSTYPE_DECL_LIST(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->decl_list)
1344 /* A FUNCTION_DECL or OVERLOAD for the constructors for NODE. These
1346 #define CLASSTYPE_CONSTRUCTORS(NODE) \
1347 (VEC_index (tree, CLASSTYPE_METHOD_VEC (NODE), CLASSTYPE_CONSTRUCTOR_SLOT))
1349 /* A FUNCTION_DECL for the destructor for NODE. These are the
1353 #define CLASSTYPE_DESTRUCTORS(NODE) \
1354 (CLASSTYPE_METHOD_VEC (NODE) \
1355 ? VEC_index (tree, CLASSTYPE_METHOD_VEC (NODE), CLASSTYPE_DESTRUCTOR_SLOT) \
1361 #define CLASSTYPE_NESTED_UTDS(NODE) \
1362 (LANG_TYPE_CLASS_CHECK (NODE)->nested_udts)
1364 /* Nonzero if NODE has a primary base class, i.e., a base class with
1366 #define CLASSTYPE_HAS_PRIMARY_BASE_P(NODE) \
1367 (CLASSTYPE_PRIMARY_BINFO (NODE) != NULL_TREE)
1372 #define CLASSTYPE_PRIMARY_BINFO(NODE) \
1373 (LANG_TYPE_CLASS_CHECK (NODE)->primary_base)
1379 #define CLASSTYPE_VBASECLASSES(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->vbases)
1381 /* The type corresponding to NODE when NODE is used as a base class,
1382 i.e., NODE without virtual base classes. */
1384 #define CLASSTYPE_AS_BASE(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->as_base)
1386 /* True iff NODE is the CLASSTYPE_AS_BASE version of some type. */
1388 #define IS_FAKE_BASE_TYPE(NODE) \
1389 (TREE_CODE (NODE) == RECORD_TYPE \
1390 && TYPE_CONTEXT (NODE) && CLASS_TYPE_P (TYPE_CONTEXT (NODE)) \
1391 && CLASSTYPE_AS_BASE (TYPE_CONTEXT (NODE)) == (NODE))
1395 #define CLASSTYPE_SIZE(NODE) TYPE_SIZE (CLASSTYPE_AS_BASE (NODE))
1396 #define CLASSTYPE_SIZE_UNIT(NODE) TYPE_SIZE_UNIT (CLASSTYPE_AS_BASE (NODE))
1397 #define CLASSTYPE_ALIGN(NODE) TYPE_ALIGN (CLASSTYPE_AS_BASE (NODE))
1398 #define CLASSTYPE_USER_ALIGN(NODE) TYPE_USER_ALIGN (CLASSTYPE_AS_BASE (NODE))
1400 /* The alignment of NODE, without its virtual bases, in bytes. */
1401 #define CLASSTYPE_ALIGN_UNIT(NODE) \
1402 (CLASSTYPE_ALIGN (NODE) / BITS_PER_UNIT)
1406 #define TYPE_JAVA_INTERFACE(NODE) \
1407 (LANG_TYPE_CLASS_CHECK (NODE)->java_interface)
1412 #define CLASSTYPE_PURE_VIRTUALS(NODE) \
1413 (LANG_TYPE_CLASS_CHECK (NODE)->pure_virtuals)
1416 #define TYPE_HAS_DEFAULT_CONSTRUCTOR(NODE) \
1417 (LANG_TYPE_CLASS_CHECK (NODE)->h.has_default_ctor)
1420 #define CLASSTYPE_HAS_MUTABLE(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->has_mutable)
1421 #define TYPE_HAS_MUTABLE_P(NODE) (cp_has_mutable_p (NODE))
1424 #define CLASSTYPE_NON_POD_P(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->non_pod_class)
1429 #define CLASSTYPE_NON_ZERO_INIT_P(NODE) \
1430 (LANG_TYPE_CLASS_CHECK (NODE)->non_zero_init)
1433 #define CLASSTYPE_EMPTY_P(NODE) \
1434 (LANG_TYPE_CLASS_CHECK (NODE)->empty_p)
1438 #define CLASSTYPE_NEARLY_EMPTY_P(NODE) \
1439 (LANG_TYPE_CLASS_CHECK (NODE)->nearly_empty_p)
1442 #define CLASSTYPE_CONTAINS_EMPTY_CLASS_P(NODE) \
1443 (LANG_TYPE_CLASS_CHECK (NODE)->contains_empty_class_p)
1448 #define CLASSTYPE_FRIEND_CLASSES(NODE) \
1449 (LANG_TYPE_CLASS_CHECK (NODE)->friend_classes)
1452 #define CLASSTYPE_BEFRIENDING_CLASSES(NODE) \
1453 (LANG_TYPE_CLASS_CHECK (NODE)->befriending_classes)
1455 /* Say whether this node was declared as a "class" or a "struct". */
1456 #define CLASSTYPE_DECLARED_CLASS(NODE) \
1457 (LANG_TYPE_CLASS_CHECK (NODE)->declared_class)
1461 #define CLASSTYPE_READONLY_FIELDS_NEED_INIT(NODE) \
1462 (TYPE_LANG_SPECIFIC (NODE) \
1463 ? LANG_TYPE_CLASS_CHECK (NODE)->h.const_needs_init : 0)
1464 #define SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT(NODE, VALUE) \
1465 (LANG_TYPE_CLASS_CHECK (NODE)->h.const_needs_init = (VALUE))
1469 #define CLASSTYPE_REF_FIELDS_NEED_INIT(NODE) \
1470 (TYPE_LANG_SPECIFIC (NODE) \
1471 ? LANG_TYPE_CLASS_CHECK (NODE)->h.ref_needs_init : 0)
1472 #define SET_CLASSTYPE_REF_FIELDS_NEED_INIT(NODE, VALUE) \
1473 (LANG_TYPE_CLASS_CHECK (NODE)->h.ref_needs_init = (VALUE))
1477 #define CLASSTYPE_INTERFACE_ONLY(NODE) \
1478 (LANG_TYPE_CLASS_CHECK (NODE)->interface_only)
1485 #define CLASSTYPE_INTERFACE_KNOWN(NODE) \
1486 (LANG_TYPE_CLASS_CHECK (NODE)->interface_unknown == 0)
1488 #define CLASSTYPE_INTERFACE_UNKNOWN(NODE) \
1489 (LANG_TYPE_CLASS_CHECK (NODE)->interface_unknown)
1491 #define SET_CLASSTYPE_INTERFACE_UNKNOWN_X(NODE,X) \
1492 (LANG_TYPE_CLASS_CHECK (NODE)->interface_unknown = !!(X))
1493 #define SET_CLASSTYPE_INTERFACE_UNKNOWN(NODE) \
1494 (LANG_TYPE_CLASS_CHECK (NODE)->interface_unknown = 1)
1495 #define SET_CLASSTYPE_INTERFACE_KNOWN(NODE) \
1496 (LANG_TYPE_CLASS_CHECK (NODE)->interface_unknown = 0)
1498 /* Nonzero if a _DECL node requires us to output debug info for this class. */
1499 #define CLASSTYPE_DEBUG_REQUESTED(NODE) \
1500 (LANG_TYPE_CLASS_CHECK (NODE)->debug_requested)
1506 #define BINFO_VTABLE_PATH_MARKED(NODE) BINFO_FLAG_1 (NODE)
1530 #define BINFO_DEPENDENT_BASE_P(NODE) BINFO_FLAG_3 (NODE)
1535 #define BINFO_LOST_PRIMARY_P(NODE) BINFO_FLAG_4 (NODE)
1538 #define BINFO_PRIMARY_P(NODE) BINFO_FLAG_5(NODE)
1541 #define IDENTIFIER_MARKED(NODE) TREE_LANG_FLAG_0 (NODE)
1545 NODE. The PURPOSE of each element is a FUNCTION_DECL for a virtual
1547 vcall offset for that function is stored, when NODE is a virtual
1549 #define CLASSTYPE_VCALL_INDICES(NODE) \
1550 (LANG_TYPE_CLASS_CHECK (NODE)->vcall_indices)
1552 /* The various vtables for the class NODE. The primary vtable will be
1554 #define CLASSTYPE_VTABLES(NODE) \
1555 (LANG_TYPE_CLASS_CHECK (NODE)->vtables)
1560 #define CLASSTYPE_TYPEINFO_VAR(NODE) \
1561 (LANG_TYPE_CLASS_CHECK (NODE)->typeinfo_var)
1568 #define BV_DELTA(NODE) (TREE_PURPOSE (NODE))
1573 #define BV_VCALL_INDEX(NODE) (TREE_TYPE (NODE))
1576 #define BV_FN(NODE) (TREE_VALUE (NODE))
1584 #define TYPE_RAISES_EXCEPTIONS(NODE) TYPE_LANG_SLOT_1 (NODE)
1587 #define TYPE_NOTHROW_P(NODE) \
1588 (TYPE_RAISES_EXCEPTIONS (NODE) \
1589 && TREE_VALUE (TYPE_RAISES_EXCEPTIONS (NODE)) == NULL_TREE)
1592 #define NAMESPACE_LEVEL(NODE) \
1593 (DECL_LANG_SPECIFIC (NODE)->decl_flags.u.level)
1602 #define CAN_HAVE_FULL_LANG_DECL_P(NODE) \
1603 (!(TREE_CODE (NODE) == FIELD_DECL \
1604 || TREE_CODE (NODE) == VAR_DECL \
1605 || TREE_CODE (NODE) == CONST_DECL \
1606 || TREE_CODE (NODE) == USING_DECL))
1722 #define LANG_DECL_U2_CHECK(NODE, TF) __extension__ \
1723 ({ struct lang_decl *lt = DECL_LANG_SPECIFIC (NODE); \
1730 #define LANG_DECL_U2_CHECK(NODE, TF) \
1731 (&DECL_LANG_SPECIFIC (NODE)->decl_flags.u2)
1744 #define DECL_LANGUAGE(NODE) \
1745 (DECL_LANG_SPECIFIC (NODE) \
1746 ? DECL_LANG_SPECIFIC (NODE)->decl_flags.language \
1747 : (TREE_CODE (NODE) == FUNCTION_DECL \
1750 /* Set the language linkage for NODE to LANGUAGE. */
1751 #define SET_DECL_LANGUAGE(NODE, LANGUAGE) \
1752 (DECL_LANG_SPECIFIC (NODE)->decl_flags.language = (LANGUAGE))
1755 #define DECL_CONSTRUCTOR_P(NODE) \
1756 (DECL_LANG_SPECIFIC (NODE)->decl_flags.constructor_attr)
1758 /* Nonzero if NODE (a FUNCTION_DECL) is a constructor for a complete
1760 #define DECL_COMPLETE_CONSTRUCTOR_P(NODE) \
1761 (DECL_CONSTRUCTOR_P (NODE) \
1762 && DECL_NAME (NODE) == complete_ctor_identifier)
1764 /* Nonzero if NODE (a FUNCTION_DECL) is a constructor for a base
1766 #define DECL_BASE_CONSTRUCTOR_P(NODE) \
1767 (DECL_CONSTRUCTOR_P (NODE) \
1768 && DECL_NAME (NODE) == base_ctor_identifier)
1770 NODE (a FUNCTION_DECL) is a constructor, but not either the
1773 #define DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P(NODE) \
1774 (DECL_CONSTRUCTOR_P (NODE) && !DECL_CLONED_FUNCTION_P (NODE))
1776 /* Nonzero if NODE (a FUNCTION_DECL) is a copy constructor. */
1777 #define DECL_COPY_CONSTRUCTOR_P(NODE) \
1778 (DECL_CONSTRUCTOR_P (NODE) && copy_fn_p (NODE) > 0)
1780 /* Nonzero if NODE (a FUNCTION_DECL) is a move constructor. */
1781 #define DECL_MOVE_CONSTRUCTOR_P(NODE) \
1782 (DECL_CONSTRUCTOR_P (NODE) && move_fn_p (NODE))
1784 /* Nonzero if NODE is a destructor. */
1785 #define DECL_DESTRUCTOR_P(NODE) \
1786 (DECL_LANG_SPECIFIC (NODE)->decl_flags.destructor_attr)
1788 /* Nonzero if NODE (a FUNCTION_DECL) is a destructor, but not the
1791 #define DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P(NODE) \
1792 (DECL_DESTRUCTOR_P (NODE) && !DECL_CLONED_FUNCTION_P (NODE))
1794 /* Nonzero if NODE (a FUNCTION_DECL) is a destructor for a complete
1796 #define DECL_COMPLETE_DESTRUCTOR_P(NODE) \
1797 (DECL_DESTRUCTOR_P (NODE) \
1798 && DECL_NAME (NODE) == complete_dtor_identifier)
1800 /* Nonzero if NODE (a FUNCTION_DECL) is a destructor for a base
1802 #define DECL_BASE_DESTRUCTOR_P(NODE) \
1803 (DECL_DESTRUCTOR_P (NODE) \
1804 && DECL_NAME (NODE) == base_dtor_identifier)
1806 /* Nonzero if NODE (a FUNCTION_DECL) is a destructor for a complete
1808 #define DECL_DELETING_DESTRUCTOR_P(NODE) \
1809 (DECL_DESTRUCTOR_P (NODE) \
1810 && DECL_NAME (NODE) == deleting_dtor_identifier)
1812 /* Nonzero if NODE (a FUNCTION_DECL) is a cloned constructor or
1814 #define DECL_CLONED_FUNCTION_P(NODE) \
1815 ((TREE_CODE (NODE) == FUNCTION_DECL \
1816 || TREE_CODE (NODE) == TEMPLATE_DECL) \
1817 && DECL_LANG_SPECIFIC (NODE) \
1818 && !DECL_LANG_SPECIFIC (NODE)->decl_flags.thunk_p \
1819 && DECL_CLONED_FUNCTION (NODE) != NULL_TREE)
1823 #define DECL_CLONED_FUNCTION(NODE) \
1824 (DECL_LANG_SPECIFIC (NON_THUNK_FUNCTION_CHECK(NODE))->u.f.u5.cloned_function)
1841 /* Nonzero if NODE has DECL_DISCRIMINATOR and not DECL_ACCESS. */
1842 #define DECL_DISCRIMINATOR_P(NODE) \
1843 (TREE_CODE (NODE) == VAR_DECL \
1844 && DECL_FUNCTION_SCOPE_P (NODE))
1847 #define DECL_DISCRIMINATOR(NODE) (LANG_DECL_U2_CHECK (NODE, 1)->discriminator)
1849 /* Nonzero if the VTT parm has been added to NODE. */
1850 #define DECL_HAS_VTT_PARM_P(NODE) \
1851 (DECL_LANG_SPECIFIC (NODE)->decl_flags.has_vtt_parm_p)
1853 /* Nonzero if NODE is a FUNCTION_DECL for which a VTT parameter is
1855 #define DECL_NEEDS_VTT_PARM_P(NODE) \
1856 (CLASSTYPE_VBASECLASSES (DECL_CONTEXT (NODE)) \
1857 && (DECL_BASE_CONSTRUCTOR_P (NODE) \
1858 || DECL_BASE_DESTRUCTOR_P (NODE)))
1860 /* Nonzero if NODE is a user-defined conversion operator. */
1861 #define DECL_CONV_FN_P(NODE) \
1862 (DECL_NAME (NODE) && IDENTIFIER_TYPENAME_P (DECL_NAME (NODE)))
1869 /* Nonzero if NODE, which is a TEMPLATE_DECL, is a template
1872 #define DECL_TEMPLATE_CONV_FN_P(NODE) \
1873 (DECL_LANG_SPECIFIC (NODE)->decl_flags.template_conv_p)
1875 /* Set the overloaded operator code for NODE to CODE. */
1876 #define SET_OVERLOADED_OPERATOR_CODE(NODE, CODE) \
1877 (DECL_LANG_SPECIFIC (NODE)->u.f.operator_code = (CODE))
1879 /* If NODE is an overloaded operator, then this returns the TREE_CODE
1882 whether or not NODE is an assignment operator. If NODE is not an
1885 to test whether or not NODE is an overloaded operator. */
1886 #define DECL_OVERLOADED_OPERATOR_P(NODE) \
1887 (IDENTIFIER_OPNAME_P (DECL_NAME (NODE)) \
1888 ? DECL_LANG_SPECIFIC (NODE)->u.f.operator_code : ERROR_MARK)
1890 /* Nonzero if NODE is an assignment operator (including += and such). */
1891 #define DECL_ASSIGNMENT_OPERATOR_P(NODE) \
1892 (DECL_LANG_SPECIFIC (NODE)->decl_flags.assignment_operator_p)
1897 #define DECL_HAS_IN_CHARGE_PARM_P(NODE) \
1898 (DECL_LANG_SPECIFIC (NODE)->decl_flags.has_in_charge_parm_p)
1901 #define DECL_IS_BUILTIN_CONSTANT_P(NODE) \
1902 (TREE_CODE (NODE) == FUNCTION_DECL \
1903 && DECL_BUILT_IN_CLASS (NODE) == BUILT_IN_NORMAL \
1904 && DECL_FUNCTION_CODE (NODE) == BUILT_IN_CONSTANT_P)
1907 in) as a member in a RECORD_TYPE or UNION_TYPE node. It is also for
1911 #define DECL_IN_AGGR_P(NODE) (DECL_LANG_FLAG_3 (NODE))
1917 #define DECL_INITIALIZED_P(NODE) \
1918 (TREE_LANG_FLAG_1 (VAR_DECL_CHECK (NODE)))
1921 #define DECL_NONTRIVIALLY_INITIALIZED_P(NODE) \
1922 (TREE_LANG_FLAG_3 (VAR_DECL_CHECK (NODE)))
1926 #define DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P(NODE) \
1927 (TREE_LANG_FLAG_2 (VAR_DECL_CHECK (NODE)))
1940 #define DECL_INTEGRAL_CONSTANT_VAR_P(NODE) \
1941 (TREE_CODE (NODE) == VAR_DECL \
1942 && CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (NODE)) \
1943 && INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (NODE)) \
1944 && DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (NODE))
1954 #define DECL_FRIEND_P(NODE) (DECL_LANG_SPECIFIC (NODE)->decl_flags.friend_attr)
1957 #define DECL_BEFRIENDING_CLASSES(NODE) \
1958 (DECL_LANG_SPECIFIC (NODE)->u.f.befriending_classes)
1962 #define DECL_STATIC_FUNCTION_P(NODE) \
1963 (DECL_LANG_SPECIFIC (NODE)->decl_flags.static_function)
1967 #define DECL_NONSTATIC_MEMBER_FUNCTION_P(NODE) \
1968 (TREE_CODE (TREE_TYPE (NODE)) == METHOD_TYPE)
1972 #define DECL_FUNCTION_MEMBER_P(NODE) \
1973 (DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE) || DECL_STATIC_FUNCTION_P (NODE))
1977 #define DECL_CONST_MEMFUNC_P(NODE) \
1978 (DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE) \
1980 (TYPE_ARG_TYPES (TREE_TYPE (NODE))))))
1984 #define DECL_VOLATILE_MEMFUNC_P(NODE) \
1985 (DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE) \
1987 (TYPE_ARG_TYPES (TREE_TYPE (NODE))))))
1990 #define DECL_NONSTATIC_MEMBER_P(NODE) \
1991 (DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE) \
1992 || TREE_CODE (NODE) == FIELD_DECL)
1996 #define DECL_MUTABLE_P(NODE) (DECL_LANG_FLAG_0 (NODE))
2000 #define DECL_NONCONVERTING_P(NODE) \
2001 (DECL_LANG_SPECIFIC (NODE)->decl_flags.nonconverting)
2005 #define DECL_PURE_VIRTUAL_P(NODE) \
2006 (DECL_LANG_SPECIFIC (NODE)->decl_flags.pure_virtual)
2008 /* True (in a FUNCTION_DECL) if NODE is a virtual function that is an
2012 #define DECL_INVALID_OVERRIDER_P(NODE) \
2013 (DECL_LANG_FLAG_4 (NODE))
2015 /* The thunks associated with NODE, a FUNCTION_DECL. */
2016 #define DECL_THUNKS(NODE) \
2017 (DECL_LANG_SPECIFIC (NODE)->u.f.context)
2019 /* Nonzero if NODE is a thunk, rather than an ordinary function. */
2020 #define DECL_THUNK_P(NODE) \
2021 (TREE_CODE (NODE) == FUNCTION_DECL \
2022 && DECL_LANG_SPECIFIC (NODE) \
2023 && DECL_LANG_SPECIFIC (NODE)->decl_flags.thunk_p)
2025 /* Set DECL_THUNK_P for node. */
2026 #define SET_DECL_THUNK_P(NODE, THIS_ADJUSTING) \
2027 (DECL_LANG_SPECIFIC (NODE)->decl_flags.thunk_p = 1, \
2028 DECL_LANG_SPECIFIC (NODE)->u.f.u3sel = 1, \
2029 DECL_LANG_SPECIFIC (NODE)->decl_flags.this_thunk_p = (THIS_ADJUSTING))
2031 /* Nonzero if NODE is a this pointer adjusting thunk. */
2032 #define DECL_THIS_THUNK_P(NODE) \
2033 (DECL_THUNK_P (NODE) && DECL_LANG_SPECIFIC (NODE)->decl_flags.this_thunk_p)
2035 /* Nonzero if NODE is a result pointer adjusting thunk. */
2036 #define DECL_RESULT_THUNK_P(NODE) \
2037 (DECL_THUNK_P (NODE) && !DECL_LANG_SPECIFIC (NODE)->decl_flags.this_thunk_p)
2039 /* Nonzero if NODE is a FUNCTION_DECL, but not a thunk. */
2040 #define DECL_NON_THUNK_FUNCTION_P(NODE) \
2041 (TREE_CODE (NODE) == FUNCTION_DECL && !DECL_THUNK_P (NODE))
2043 /* Nonzero if NODE is `extern "C"'. */
2044 #define DECL_EXTERN_C_P(NODE) \
2045 (DECL_LANGUAGE (NODE) == lang_c)
2047 /* Nonzero if NODE is an `extern "C"' function. */
2048 #define DECL_EXTERN_C_FUNCTION_P(NODE) \
2049 (DECL_NON_THUNK_FUNCTION_P (NODE) && DECL_EXTERN_C_P (NODE))
2053 #define DECL_REPO_AVAILABLE_P(NODE) \
2054 (DECL_LANG_SPECIFIC (NODE)->decl_flags.repo_available_p)
2058 #define DECL_PRETTY_FUNCTION_P(NODE) \
2059 (TREE_LANG_FLAG_0 (VAR_DECL_CHECK (NODE)))
2063 #define DECL_CLASS_CONTEXT(NODE) \
2064 (DECL_CLASS_SCOPE_P (NODE) ? DECL_CONTEXT (NODE) : NULL_TREE)
2072 #define DECL_FRIEND_CONTEXT(NODE) \
2073 ((DECL_FRIEND_P (NODE) && !DECL_FUNCTION_MEMBER_P (NODE)) \
2074 ? DECL_LANG_SPECIFIC (NODE)->u.f.context \
2077 /* Set the DECL_FRIEND_CONTEXT for NODE to CONTEXT. */
2078 #define SET_DECL_FRIEND_CONTEXT(NODE, CONTEXT) \
2079 (DECL_LANG_SPECIFIC (NODE)->u.f.context = (CONTEXT))
2082 #define CP_DECL_CONTEXT(NODE) \
2083 (DECL_CONTEXT (NODE) ? DECL_CONTEXT (NODE) : global_namespace)
2084 #define CP_TYPE_CONTEXT(NODE) \
2085 (TYPE_CONTEXT (NODE) ? TYPE_CONTEXT (NODE) : global_namespace)
2086 #define FROB_CONTEXT(NODE) ((NODE) == global_namespace ? NULL_TREE : (NODE))
2088 /* 1 iff NODE has namespace scope, including the global namespace. */
2089 #define DECL_NAMESPACE_SCOPE_P(NODE) \
2090 (!DECL_TEMPLATE_PARM_P (NODE) \
2091 && TREE_CODE (CP_DECL_CONTEXT (NODE)) == NAMESPACE_DECL)
2093 /* 1 iff NODE is a class member. */
2094 #define DECL_CLASS_SCOPE_P(NODE) \
2095 (DECL_CONTEXT (NODE) && TYPE_P (DECL_CONTEXT (NODE)))
2097 #define TYPE_CLASS_SCOPE_P(NODE) \
2098 (TYPE_CONTEXT (NODE) && TYPE_P (TYPE_CONTEXT (NODE)))
2100 /* 1 iff NODE is function-local. */
2101 #define DECL_FUNCTION_SCOPE_P(NODE) \
2102 (DECL_CONTEXT (NODE) \
2103 && TREE_CODE (DECL_CONTEXT (NODE)) == FUNCTION_DECL)
2105 /* 1 iff VAR_DECL node NODE is a type-info decl. This flag is set for
2107 #define DECL_TINFO_P(NODE) TREE_LANG_FLAG_4 (VAR_DECL_CHECK (NODE))
2109 /* 1 iff VAR_DECL node NODE is virtual table or VTT. */
2110 #define DECL_VTABLE_OR_VTT_P(NODE) TREE_LANG_FLAG_5 (VAR_DECL_CHECK (NODE))
2115 #define DECL_CONSTRUCTION_VTABLE_P(NODE) \
2116 TREE_LANG_FLAG_6 (VAR_DECL_CHECK (NODE))
2118 /* 1 iff NODE is function-local, but for types. */
2119 #define LOCAL_CLASS_P(NODE) \
2120 (decl_function_context (TYPE_MAIN_DECL (NODE)) != NULL_TREE)
2125 #define DECL_NAMESPACE_USING(NODE) DECL_VINDEX (NAMESPACE_DECL_CHECK (NODE))
2129 #define DECL_NAMESPACE_USERS(NODE) DECL_INITIAL (NAMESPACE_DECL_CHECK (NODE))
2133 #define DECL_NAMESPACE_ASSOCIATIONS(NODE) \
2134 (NAMESPACE_DECL_CHECK (NODE)->decl_non_common.saved_tree)
2138 #define DECL_NAMESPACE_ALIAS(NODE) \
2139 DECL_ABSTRACT_ORIGIN (NAMESPACE_DECL_CHECK (NODE))
2140 #define ORIGINAL_NAMESPACE(NODE) \
2141 (DECL_NAMESPACE_ALIAS (NODE) ? DECL_NAMESPACE_ALIAS (NODE) : (NODE))
2143 /* Nonzero if NODE is the std namespace. */
2144 #define DECL_NAMESPACE_STD_P(NODE) \
2145 (TREE_CODE (NODE) == NAMESPACE_DECL \
2146 && CP_DECL_CONTEXT (NODE) == global_namespace \
2147 && DECL_NAME (NODE) == std_identifier)
2151 #define TREE_INDIRECT_USING(NODE) (TREE_LIST_CHECK (NODE)->base.lang_flag_0)
2155 #define ATTR_IS_DEPENDENT(NODE) (TREE_LIST_CHECK (NODE)->base.lang_flag_0)
2161 #define DECL_DEPENDENT_P(NODE) DECL_LANG_FLAG_0 (USING_DECL_CHECK (NODE))
2164 #define USING_DECL_SCOPE(NODE) TREE_TYPE (USING_DECL_CHECK (NODE))
2167 #define USING_DECL_DECLS(NODE) DECL_INITIAL (USING_DECL_CHECK (NODE))
2171 #define DECL_HAS_SHADOWED_FOR_VAR_P(NODE) \
2172 (VAR_DECL_CHECK (NODE)->decl_with_vis.shadowed_for_var_p)
2176 #define DECL_SHADOWED_FOR_VAR(NODE) \
2177 (DECL_HAS_SHADOWED_FOR_VAR_P(NODE) ? decl_shadowed_for_var_lookup (NODE) : NULL)
2179 #define SET_DECL_SHADOWED_FOR_VAR(NODE, VAL) \
2180 (decl_shadowed_for_var_insert (NODE, VAL))
2185 #define DECL_PENDING_INLINE_P(NODE) \
2186 (DECL_LANG_SPECIFIC (NODE)->u.f.pending_inline_p)
2190 #define DECL_PENDING_INLINE_INFO(NODE) \
2191 (DECL_LANG_SPECIFIC (NODE)->u.f.u.pending_inline_info)
2195 #define DECL_SORTED_FIELDS(NODE) \
2196 (DECL_LANG_SPECIFIC (TYPE_DECL_CHECK (NODE))->u.f.u.sorted_fields)
2221 #define DECL_TEMPLATE_INFO(NODE) \
2222 (DECL_LANG_SPECIFIC (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK (NODE)) \
2228 #define DECL_ANON_UNION_VAR_P(NODE) \
2229 (DECL_LANG_FLAG_4 (VAR_DECL_CHECK (NODE)))
2232 #define CLASSTYPE_TEMPLATE_INFO(NODE) \
2233 (LANG_TYPE_CLASS_CHECK (RECORD_OR_UNION_CHECK (NODE))->template_info)
2239 #define ENUM_TEMPLATE_INFO(NODE) \
2240 (TYPE_LANG_SLOT_1 (ENUMERAL_TYPE_CHECK (NODE)))
2243 #define TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO(NODE) \
2244 (LANG_TYPE_CLASS_CHECK (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK (NODE)) \
2248 #define TYPE_TEMPLATE_INFO(NODE) \
2249 (TREE_CODE (NODE) == ENUMERAL_TYPE \
2250 ? ENUM_TEMPLATE_INFO (NODE) : \
2251 (TREE_CODE (NODE) == BOUND_TEMPLATE_TEMPLATE_PARM \
2252 ? TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (NODE) : \
2253 (TYPE_LANG_SPECIFIC (NODE) \
2254 ? CLASSTYPE_TEMPLATE_INFO (NODE) \
2259 #define SET_TYPE_TEMPLATE_INFO(NODE, VAL) \
2260 (TREE_CODE (NODE) == ENUMERAL_TYPE \
2261 ? (ENUM_TEMPLATE_INFO (NODE) = (VAL)) \
2262 : (CLASSTYPE_TEMPLATE_INFO (NODE) = (VAL)))
2264 #define TI_TEMPLATE(NODE) (TREE_PURPOSE (NODE))
2265 #define TI_ARGS(NODE) (TREE_VALUE (NODE))
2266 #define TI_PENDING_TEMPLATE_FLAG(NODE) TREE_LANG_FLAG_1 (NODE)
2282 #define TMPL_ARGS_HAVE_MULTIPLE_LEVELS(NODE) \
2283 (NODE && TREE_VEC_LENGTH (NODE) && TREE_VEC_ELT (NODE, 0) \
2284 && TREE_CODE (TREE_VEC_ELT (NODE, 0)) == TREE_VEC)
2291 #define TMPL_ARGS_DEPTH(NODE) \
2292 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS (NODE) ? TREE_VEC_LENGTH (NODE) : 1)
2309 /* Given a single level of template arguments in NODE, return the
2311 #define NUM_TMPL_ARGS(NODE) \
2312 (TREE_VEC_LENGTH (NODE))
2315 #define INNERMOST_TEMPLATE_ARGS(NODE) \
2316 (get_innermost_template_args ((NODE), 1))
2318 /* The number of levels of template parameters given by NODE. */
2319 #define TMPL_PARMS_DEPTH(NODE) \
2320 ((HOST_WIDE_INT) TREE_INT_CST_LOW (TREE_PURPOSE (NODE)))
2322 /* The TEMPLATE_DECL instantiated or specialized by NODE. This
2340 #define DECL_TI_TEMPLATE(NODE) TI_TEMPLATE (DECL_TEMPLATE_INFO (NODE))
2347 #define DECL_TI_ARGS(NODE) TI_ARGS (DECL_TEMPLATE_INFO (NODE))
2349 /* The TEMPLATE_DECL associated with NODE, a class type. Even if NODE
2358 #define CLASSTYPE_TI_TEMPLATE(NODE) TI_TEMPLATE (CLASSTYPE_TEMPLATE_INFO (NODE))
2359 #define CLASSTYPE_TI_ARGS(NODE) TI_ARGS (CLASSTYPE_TEMPLATE_INFO (NODE))
2371 #define TYPE_TI_TEMPLATE(NODE) \
2372 (TI_TEMPLATE (TYPE_TEMPLATE_INFO (NODE)))
2375 #define TYPE_TI_ARGS(NODE) \
2376 (TI_ARGS (TYPE_TEMPLATE_INFO (NODE)))
2378 #define INNERMOST_TEMPLATE_PARMS(NODE) TREE_VALUE (NODE)
2380 /* Nonzero if NODE (a TEMPLATE_DECL) is a member template, in the
2382 #define DECL_MEMBER_TEMPLATE_P(NODE) \
2383 (DECL_LANG_FLAG_1 (TEMPLATE_DECL_CHECK (NODE)))
2385 /* Nonzero if the NODE corresponds to the template parameters for a
2388 #define TEMPLATE_PARMS_FOR_INLINE(NODE) TREE_LANG_FLAG_1 (NODE)
2392 #define FUNCTION_PARAMETER_PACK_P(NODE) \
2393 (DECL_LANG_FLAG_1 (PARM_DECL_CHECK (NODE)))
2395 /* Determines if NODE is an expansion of one or more parameter packs,
2397 #define PACK_EXPANSION_P(NODE) \
2398 (TREE_CODE (NODE) == TYPE_PACK_EXPANSION \
2399 || TREE_CODE (NODE) == EXPR_PACK_EXPANSION)
2403 #define PACK_EXPANSION_PATTERN(NODE) \
2404 (TREE_CODE (NODE) == TYPE_PACK_EXPANSION? TREE_TYPE (NODE) \
2405 : TREE_OPERAND (NODE, 0))
2409 #define SET_PACK_EXPANSION_PATTERN(NODE,VALUE) \
2410 if (TREE_CODE (NODE) == TYPE_PACK_EXPANSION) \
2411 TREE_TYPE (NODE) = VALUE; \
2413 TREE_OPERAND (NODE, 0) = VALUE
2415 /* The list of parameter packs used in the PACK_EXPANSION_* node. The
2417 #define PACK_EXPANSION_PARAMETER_PACKS(NODE) TREE_CHAIN (NODE)
2420 #define ARGUMENT_PACK_P(NODE) \
2421 (TREE_CODE (NODE) == TYPE_ARGUMENT_PACK \
2422 || TREE_CODE (NODE) == NONTYPE_ARGUMENT_PACK)
2426 #define ARGUMENT_PACK_ARGS(NODE) \
2427 (TREE_CODE (NODE) == TYPE_ARGUMENT_PACK? TREE_TYPE (NODE) \
2428 : TREE_OPERAND (NODE, 0))
2432 #define SET_ARGUMENT_PACK_ARGS(NODE,VALUE) \
2433 if (TREE_CODE (NODE) == TYPE_ARGUMENT_PACK) \
2434 TREE_TYPE (NODE) = VALUE; \
2436 TREE_OPERAND (NODE, 0) = VALUE
2444 #define ARGUMENT_PACK_INCOMPLETE_P(NODE) \
2445 TREE_LANG_FLAG_0 (ARGUMENT_PACK_ARGS (NODE))
2449 #define ARGUMENT_PACK_EXPLICIT_ARGS(NODE) \
2450 TREE_TYPE (ARGUMENT_PACK_ARGS (NODE))
2454 #define ARGUMENT_PACK_SELECT_FROM_PACK(NODE) \
2455 (((struct tree_argument_pack_select *)ARGUMENT_PACK_SELECT_CHECK (NODE))->argument_pack)
2459 #define ARGUMENT_PACK_SELECT_INDEX(NODE) \
2460 (((struct tree_argument_pack_select *)ARGUMENT_PACK_SELECT_CHECK (NODE))->index)
2464 #define ARGUMENT_PACK_SELECT_ARG(NODE) \
2465 TREE_VEC_ELT (ARGUMENT_PACK_ARGS (ARGUMENT_PACK_SELECT_FROM_PACK (NODE)), \
2466 ARGUMENT_PACK_SELECT_INDEX (NODE));
2469 #define DECL_SAVED_FUNCTION_DATA(NODE) \
2470 (DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (NODE)) \
2474 #define REFERENCE_REF_P(NODE) \
2475 TREE_LANG_FLAG_0 (INDIRECT_REF_CHECK (NODE))
2477 #define NEW_EXPR_USE_GLOBAL(NODE) \
2478 TREE_LANG_FLAG_0 (NEW_EXPR_CHECK (NODE))
2479 #define DELETE_EXPR_USE_GLOBAL(NODE) \
2480 TREE_LANG_FLAG_0 (DELETE_EXPR_CHECK (NODE))
2481 #define DELETE_EXPR_USE_VEC(NODE) \
2482 TREE_LANG_FLAG_1 (DELETE_EXPR_CHECK (NODE))
2486 #define COMPOUND_EXPR_OVERLOADED(NODE) \
2487 TREE_LANG_FLAG_0 (COMPOUND_EXPR_CHECK (NODE))
2491 #define KOENIG_LOOKUP_P(NODE) TREE_LANG_FLAG_0 (CALL_EXPR_CHECK (NODE))
2496 #define PAREN_STRING_LITERAL_P(NODE) \
2497 TREE_LANG_FLAG_0 (STRING_CST_CHECK (NODE))
2501 #define AGGR_INIT_VIA_CTOR_P(NODE) \
2502 TREE_LANG_FLAG_0 (AGGR_INIT_EXPR_CHECK (NODE))
2506 #define AGGR_INIT_ZERO_FIRST(NODE) \
2507 TREE_LANG_FLAG_2 (AGGR_INIT_EXPR_CHECK (NODE))
2513 #define AGGR_INIT_EXPR_FN(NODE) TREE_OPERAND (AGGR_INIT_EXPR_CHECK (NODE), 1)
2514 #define AGGR_INIT_EXPR_SLOT(NODE) \
2515 TREE_OPERAND (AGGR_INIT_EXPR_CHECK (NODE), 2)
2516 #define AGGR_INIT_EXPR_ARG(NODE, I) \
2517 TREE_OPERAND (AGGR_INIT_EXPR_CHECK (NODE), (I) + 3)
2518 #define aggr_init_expr_nargs(NODE) (VL_EXP_OPERAND_LENGTH(NODE) - 3)
2520 /* AGGR_INIT_EXPR_ARGP returns a pointer to the argument vector for NODE.
2521 We can't use &AGGR_INIT_EXPR_ARG (NODE, 0) because that will complain if
2526 #define AGGR_INIT_EXPR_ARGP(NODE) \
2527 (&(TREE_OPERAND (AGGR_INIT_EXPR_CHECK (NODE), 0)) + 3)
2540 arguments from AGGR_INIT_EXPR node EXP. */
2592 #define CLASSTYPE_IS_TEMPLATE(NODE) \
2593 (CLASSTYPE_TEMPLATE_INFO (NODE) \
2594 && !CLASSTYPE_USE_TEMPLATE (NODE) \
2595 && PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (NODE)))
2601 #define TYPENAME_TYPE_FULLNAME(NODE) (TYPENAME_TYPE_CHECK (NODE))->type.values
2604 #define TYPENAME_IS_ENUM_P(NODE) \
2605 (TREE_LANG_FLAG_0 (TYPENAME_TYPE_CHECK (NODE)))
2609 #define TYPENAME_IS_CLASS_P(NODE) \
2610 (TREE_LANG_FLAG_1 (TYPENAME_TYPE_CHECK (NODE)))
2613 #define TYPENAME_IS_RESOLVING_P(NODE) \
2614 (TREE_LANG_FLAG_2 (TYPENAME_TYPE_CHECK (NODE)))
2618 #define TREE_NEGATED_INT(NODE) TREE_LANG_FLAG_0 (INTEGER_CST_CHECK (NODE))
2624 #define TYPE_POLYMORPHIC_P(NODE) (TREE_LANG_FLAG_2 (NODE))
2627 #define TYPE_CONTAINS_VPTR_P(NODE) \
2628 (TYPE_POLYMORPHIC_P (NODE) || CLASSTYPE_VBASECLASSES (NODE))
2632 #define DECL_DEAD_FOR_LOCAL(NODE) DECL_LANG_FLAG_7 (VAR_DECL_CHECK (NODE))
2636 #define DECL_ERROR_REPORTED(NODE) DECL_LANG_FLAG_0 (VAR_DECL_CHECK (NODE))
2638 /* Nonzero if NODE is a FUNCTION_DECL (for a function with global
2640 #define DECL_LOCAL_FUNCTION_P(NODE) \
2641 DECL_LANG_FLAG_0 (FUNCTION_DECL_CHECK (NODE))
2643 /* Nonzero if NODE is a DECL which we know about but which has not
2647 #define DECL_ANTICIPATED(NODE) \
2648 (DECL_LANG_SPECIFIC (DECL_COMMON_CHECK (NODE))->decl_flags.anticipated_p)
2650 /* Nonzero if NODE is a FUNCTION_DECL which was declared as a friend
2653 #define DECL_HIDDEN_FRIEND_P(NODE) \
2654 (DECL_LANG_SPECIFIC (DECL_COMMON_CHECK (NODE))->decl_flags.hidden_friend_p)
2801 #define TYPE_HAS_USER_CONSTRUCTOR(NODE) (TYPE_LANG_FLAG_1 (NODE))
2817 #define TREE_HAS_CONSTRUCTOR(NODE) (TREE_LANG_FLAG_4 (NODE))
2819 /* True if NODE is a brace-enclosed initializer. */
2820 #define BRACE_ENCLOSED_INITIALIZER_P(NODE) \
2821 (TREE_CODE (NODE) == CONSTRUCTOR && TREE_TYPE (NODE) == init_list_type_node)
2823 /* True if NODE is a compound-literal, i.e., a brace-enclosed
2825 #define COMPOUND_LITERAL_P(NODE) \
2826 (TREE_CODE (NODE) == CONSTRUCTOR && TREE_HAS_CONSTRUCTOR (NODE))
2828 #define EMPTY_CONSTRUCTOR_P(NODE) (TREE_CODE (NODE) == CONSTRUCTOR \
2830 CONSTRUCTOR_ELTS (NODE)) \
2831 && !TREE_HAS_CONSTRUCTOR (NODE))
2833 /* True if NODE is a init-list used as a direct-initializer, i.e.
2835 #define CONSTRUCTOR_IS_DIRECT_INIT(NODE) (TREE_LANG_FLAG_0 (CONSTRUCTOR_CHECK (NODE)))
2839 #define CLASSTYPE_NON_AGGREGATE(NODE) \
2840 (LANG_TYPE_CLASS_CHECK (NODE)->non_aggregate)
2841 #define TYPE_NON_AGGREGATE_CLASS(NODE) \
2842 (CLASS_TYPE_P (NODE) && CLASSTYPE_NON_AGGREGATE (NODE))
2845 #define TYPE_HAS_COMPLEX_ASSIGN_REF(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->has_complex_assign_ref)
2848 #define TYPE_HAS_COMPLEX_INIT_REF(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->has_complex_init_ref)
2851 #define TYPE_HAS_COMPLEX_DFLT(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->has_complex_dflt)
2864 #define TYPE_HAS_TRIVIAL_DESTRUCTOR(NODE) \
2865 (!TYPE_HAS_NONTRIVIAL_DESTRUCTOR (NODE))
2867 /* Nonzero for _TYPE node means that this type does not have a trivial
2871 #define TYPE_HAS_NONTRIVIAL_DESTRUCTOR(NODE) \
2872 (TYPE_LANG_FLAG_4 (NODE))
2875 #define TYPE_HAS_TRIVIAL_DFLT(NODE) \
2876 (TYPE_HAS_DEFAULT_CONSTRUCTOR (NODE) && ! TYPE_HAS_COMPLEX_DFLT (NODE))
2880 #define TYPE_HAS_TRIVIAL_INIT_REF(NODE) \
2881 (TYPE_HAS_INIT_REF (NODE) && ! TYPE_HAS_COMPLEX_INIT_REF (NODE))
2885 #define TYPE_HAS_TRIVIAL_ASSIGN_REF(NODE) \
2886 (TYPE_HAS_ASSIGN_REF (NODE) && ! TYPE_HAS_COMPLEX_ASSIGN_REF (NODE))
2888 /* Returns true if NODE is a pointer-to-data-member. */
2889 #define TYPE_PTRMEM_P(NODE) \
2890 (TREE_CODE (NODE) == OFFSET_TYPE)
2891 /* Returns true if NODE is a pointer. */
2892 #define TYPE_PTR_P(NODE) \
2893 (TREE_CODE (NODE) == POINTER_TYPE)
2895 /* Returns true if NODE is an object type:
2903 #define TYPE_OBJ_P(NODE) \
2904 (TREE_CODE (NODE) != REFERENCE_TYPE \
2905 && TREE_CODE (NODE) != VOID_TYPE \
2906 && TREE_CODE (NODE) != FUNCTION_TYPE \
2907 && TREE_CODE (NODE) != METHOD_TYPE)
2909 /* Returns true if NODE is a pointer to an object. Keep these checks
2911 #define TYPE_PTROB_P(NODE) \
2912 (TYPE_PTR_P (NODE) && TYPE_OBJ_P (TREE_TYPE (NODE)))
2914 /* Returns true if NODE is a reference to an object. Keep these checks
2916 #define TYPE_REF_OBJ_P(NODE) \
2917 (TREE_CODE (NODE) == REFERENCE_TYPE && TYPE_OBJ_P (TREE_TYPE (NODE)))
2919 /* True if reference type NODE is an rvalue reference */
2920 #define TYPE_REF_IS_RVALUE(NODE) \
2921 TREE_LANG_FLAG_0 (REFERENCE_TYPE_CHECK (NODE))
2923 /* Returns true if NODE is a pointer to an object, or a pointer to
2925 #define TYPE_PTROBV_P(NODE) \
2926 (TYPE_PTR_P (NODE) \
2927 && !(TREE_CODE (TREE_TYPE (NODE)) == FUNCTION_TYPE \
2928 || TREE_CODE (TREE_TYPE (NODE)) == METHOD_TYPE))
2930 /* Returns true if NODE is a pointer to function. */
2931 #define TYPE_PTRFN_P(NODE) \
2932 (TREE_CODE (NODE) == POINTER_TYPE \
2933 && TREE_CODE (TREE_TYPE (NODE)) == FUNCTION_TYPE)
2935 /* Returns true if NODE is a reference to function. */
2936 #define TYPE_REFFN_P(NODE) \
2937 (TREE_CODE (NODE) == REFERENCE_TYPE \
2938 && TREE_CODE (TREE_TYPE (NODE)) == FUNCTION_TYPE)
2940 /* Nonzero for _TYPE node means that this type is a pointer to member
2942 #define TYPE_PTRMEMFUNC_P(NODE) \
2943 (TREE_CODE (NODE) == RECORD_TYPE \
2944 && TYPE_LANG_SPECIFIC (NODE) \
2945 && TYPE_PTRMEMFUNC_FLAG (NODE))
2947 #define TYPE_PTRMEMFUNC_FLAG(NODE) \
2948 (LANG_TYPE_CLASS_CHECK (NODE)->ptrmemfunc_flag)
2950 /* Returns true if NODE is a pointer-to-member. */
2951 #define TYPE_PTR_TO_MEMBER_P(NODE) \
2952 (TYPE_PTRMEM_P (NODE) || TYPE_PTRMEMFUNC_P (NODE))
2956 #define PTRMEM_OK_P(NODE) \
2957 TREE_LANG_FLAG_0 (TREE_CHECK2 ((NODE), ADDR_EXPR, OFFSET_REF))
2962 #define TYPE_PTRMEMFUNC_FN_TYPE(NODE) \
2963 (TREE_TYPE (TYPE_FIELDS (NODE)))
2966 #define TYPE_PTRMEMFUNC_OBJECT_TYPE(NODE) \
2967 TYPE_METHOD_BASETYPE (TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (NODE)))
2971 #define TYPE_GET_PTRMEMFUNC_TYPE(NODE) \
2972 (TYPE_LANG_SPECIFIC (NODE) ? LANG_TYPE_PTRMEM_CHECK (NODE)->record : NULL)
2973 #define TYPE_SET_PTRMEMFUNC_TYPE(NODE, VALUE) \
2975 if (TYPE_LANG_SPECIFIC (NODE) == NULL) \
2977 TYPE_LANG_SPECIFIC (NODE) = GGC_CNEWVAR \
2979 TYPE_LANG_SPECIFIC (NODE)->u.ptrmem.h.is_lang_type_class = 0; \
2981 TYPE_LANG_SPECIFIC (NODE)->u.ptrmem.record = (VALUE); \
2989 #define TYPE_PTRMEM_CLASS_TYPE(NODE) \
2990 (TYPE_PTRMEM_P (NODE) \
2991 ? TYPE_OFFSET_BASETYPE (NODE) \
2992 : TYPE_PTRMEMFUNC_OBJECT_TYPE (NODE))
2995 #define TYPE_PTRMEM_POINTED_TO_TYPE(NODE) \
2996 (TYPE_PTRMEM_P (NODE) \
2997 ? TREE_TYPE (NODE) \
2998 : TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (NODE)))
3002 #define PTRMEM_CST_CLASS(NODE) \
3003 TYPE_PTRMEM_CLASS_TYPE (TREE_TYPE (PTRMEM_CST_CHECK (NODE)))
3007 #define PTRMEM_CST_MEMBER(NODE) (((ptrmem_cst_t)PTRMEM_CST_CHECK (NODE))->member)
3010 #define TYPEOF_TYPE_EXPR(NODE) (TYPEOF_TYPE_CHECK (NODE))->type.values
3013 #define DECLTYPE_TYPE_EXPR(NODE) (DECLTYPE_TYPE_CHECK (NODE))->type.values
3015 /* Whether the DECLTYPE_TYPE_EXPR of NODE was originally parsed as an
3018 #define DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P(NODE) \
3019 (DECLTYPE_TYPE_CHECK (NODE))->type.string_flag
3021 /* Nonzero for VAR_DECL and FUNCTION_DECL node means that `extern' was
3024 #define DECL_THIS_EXTERN(NODE) \
3025 DECL_LANG_FLAG_2 (VAR_FUNCTION_OR_PARM_DECL_CHECK (NODE))
3027 /* Nonzero for VAR_DECL and FUNCTION_DECL node means that `static' was
3030 #define DECL_THIS_STATIC(NODE) \
3031 DECL_LANG_FLAG_6 (VAR_FUNCTION_OR_PARM_DECL_CHECK (NODE))
3033 /* Nonzero for FIELD_DECL node means that this field is a base class
3035 #define DECL_FIELD_IS_BASE(NODE) \
3036 DECL_LANG_FLAG_6 (FIELD_DECL_CHECK (NODE))
3041 #define ANON_AGGR_TYPE_P(NODE) \
3042 (CLASS_TYPE_P (NODE) && LANG_TYPE_CLASS_CHECK (NODE)->anon_aggr)
3043 #define SET_ANON_AGGR_TYPE_P(NODE) \
3044 (LANG_TYPE_CLASS_CHECK (NODE)->anon_aggr = 1)
3047 #define ANON_UNION_TYPE_P(NODE) \
3048 (TREE_CODE (NODE) == UNION_TYPE && ANON_AGGR_TYPE_P (NODE))
3054 #define TYPE_WAS_ANONYMOUS(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->was_anonymous)
3058 /* The format of each node in the DECL_FRIENDLIST is as follows:
3063 #define DECL_FRIENDLIST(NODE) (DECL_INITIAL (NODE))
3068 each node is a type; the TREE_VALUE is the access granted for this
3072 protected_access_node will appear in the DECL_ACCESS for the node. */
3073 #define DECL_ACCESS(NODE) (LANG_DECL_U2_CHECK (NODE, 0)->access)
3076 #define DECL_GLOBAL_CTOR_P(NODE) \
3077 (DECL_LANG_SPECIFIC (NODE)->decl_flags.global_ctor_p)
3080 #define DECL_GLOBAL_DTOR_P(NODE) \
3081 (DECL_LANG_SPECIFIC (NODE)->decl_flags.global_dtor_p)
3085 /* The DECL_TEMPLATE_PARMS are a list. The TREE_PURPOSE of each node
3096 #define DECL_TEMPLATE_PARMS(NODE) DECL_NON_COMMON_CHECK (NODE)->decl_non_common.arguments
3097 #define DECL_INNERMOST_TEMPLATE_PARMS(NODE) \
3098 INNERMOST_TEMPLATE_PARMS (DECL_TEMPLATE_PARMS (NODE))
3099 #define DECL_NTPARMS(NODE) \
3100 TREE_VEC_LENGTH (DECL_INNERMOST_TEMPLATE_PARMS (NODE))
3102 #define DECL_TEMPLATE_RESULT(NODE) DECL_RESULT_FLD (NODE)
3113 In both cases, the TREE_PURPOSE of each node contains the arguments
3128 #define DECL_TEMPLATE_INSTANTIATIONS(NODE) DECL_VINDEX (NODE)
3156 example above.) The TREE_TYPE is the _TYPE node for the partial
3160 #define DECL_TEMPLATE_SPECIALIZATIONS(NODE) DECL_SIZE (NODE)
3164 #define DECL_TEMPLATE_PARM_P(NODE) \
3165 (DECL_LANG_FLAG_0 (NODE) \
3166 && (TREE_CODE (NODE) == CONST_DECL \
3167 || TREE_CODE (NODE) == PARM_DECL \
3168 || TREE_CODE (NODE) == TYPE_DECL \
3169 || TREE_CODE (NODE) == TEMPLATE_DECL))
3171 /* Mark NODE as a template parameter. */
3172 #define SET_DECL_TEMPLATE_PARM_P(NODE) \
3173 (DECL_LANG_FLAG_0 (NODE) = 1)
3175 /* Nonzero if NODE is a template template parameter. */
3176 #define DECL_TEMPLATE_TEMPLATE_PARM_P(NODE) \
3177 (TREE_CODE (NODE) == TEMPLATE_DECL && DECL_TEMPLATE_PARM_P (NODE))
3179 /* Nonzero if NODE is a TEMPLATE_DECL representing an
3180 UNBOUND_CLASS_TEMPLATE tree node. */
3181 #define DECL_UNBOUND_CLASS_TEMPLATE_P(NODE) \
3182 (TREE_CODE (NODE) == TEMPLATE_DECL && !DECL_TEMPLATE_RESULT (NODE))
3184 #define DECL_FUNCTION_TEMPLATE_P(NODE) \
3185 (TREE_CODE (NODE) == TEMPLATE_DECL \
3186 && !DECL_UNBOUND_CLASS_TEMPLATE_P (NODE) \
3187 && TREE_CODE (DECL_TEMPLATE_RESULT (NODE)) == FUNCTION_DECL)
3190 #define DECL_CLASS_TEMPLATE_P(NODE) \
3191 (TREE_CODE (NODE) == TEMPLATE_DECL \
3192 && !DECL_UNBOUND_CLASS_TEMPLATE_P (NODE) \
3193 && TREE_CODE (DECL_TEMPLATE_RESULT (NODE)) == TYPE_DECL \
3194 && !DECL_TEMPLATE_TEMPLATE_PARM_P (NODE))
3196 /* Nonzero if NODE which declares a type. */
3197 #define DECL_DECLARES_TYPE_P(NODE) \
3198 (TREE_CODE (NODE) == TYPE_DECL || DECL_CLASS_TEMPLATE_P (NODE))
3200 /* Nonzero if NODE is the typedef implicitly generated for a type when
3207 #define DECL_IMPLICIT_TYPEDEF_P(NODE) \
3208 (TREE_CODE (NODE) == TYPE_DECL && DECL_LANG_FLAG_2 (NODE))
3209 #define SET_DECL_IMPLICIT_TYPEDEF_P(NODE) \
3210 (DECL_LANG_FLAG_2 (NODE) = 1)
3211 #define DECL_SELF_REFERENCE_P(NODE) \
3212 (TREE_CODE (NODE) == TYPE_DECL && DECL_LANG_FLAG_4 (NODE))
3213 #define SET_DECL_SELF_REFERENCE_P(NODE) \
3214 (DECL_LANG_FLAG_4 (NODE) = 1)
3221 #define DECL_PRIMARY_TEMPLATE(NODE) \
3222 (TREE_TYPE (DECL_INNERMOST_TEMPLATE_PARMS (NODE)))
3224 /* Returns nonzero if NODE is a primary template. */
3225 #define PRIMARY_TEMPLATE_P(NODE) (DECL_PRIMARY_TEMPLATE (NODE) == (NODE))
3227 /* Nonzero iff NODE is a specialization of a template. The value
3240 Note that NODE will be marked as a specialization even if the
3253 #define DECL_USE_TEMPLATE(NODE) (DECL_LANG_SPECIFIC (NODE)->decl_flags.use_template)
3256 #define CLASSTYPE_USE_TEMPLATE(NODE) \
3257 (LANG_TYPE_CLASS_CHECK (NODE)->use_template)
3259 /* True if NODE is a specialization of a primary template. */
3260 #define CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P(NODE) \
3261 (CLASS_TYPE_P (NODE) \
3262 && CLASSTYPE_USE_TEMPLATE (NODE) \
3265 #define DECL_TEMPLATE_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) & 1)
3266 #define CLASSTYPE_TEMPLATE_INSTANTIATION(NODE) \
3267 (CLASSTYPE_USE_TEMPLATE (NODE) & 1)
3269 #define DECL_TEMPLATE_SPECIALIZATION(NODE) (DECL_USE_TEMPLATE (NODE) == 2)
3270 #define SET_DECL_TEMPLATE_SPECIALIZATION(NODE) (DECL_USE_TEMPLATE (NODE) = 2)
3274 #define CLASSTYPE_TEMPLATE_SPECIALIZATION(NODE) \
3275 (CLASSTYPE_USE_TEMPLATE (NODE) == 2)
3276 #define SET_CLASSTYPE_TEMPLATE_SPECIALIZATION(NODE) \
3277 (CLASSTYPE_USE_TEMPLATE (NODE) = 2)
3279 #define DECL_IMPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) == 1)
3280 #define SET_DECL_IMPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) = 1)
3281 #define CLASSTYPE_IMPLICIT_INSTANTIATION(NODE) \
3282 (CLASSTYPE_USE_TEMPLATE (NODE) == 1)
3283 #define SET_CLASSTYPE_IMPLICIT_INSTANTIATION(NODE) \
3284 (CLASSTYPE_USE_TEMPLATE (NODE) = 1)
3286 #define DECL_EXPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) == 3)
3287 #define SET_DECL_EXPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) = 3)
3288 #define CLASSTYPE_EXPLICIT_INSTANTIATION(NODE) \
3289 (CLASSTYPE_USE_TEMPLATE (NODE) == 3)
3290 #define SET_CLASSTYPE_EXPLICIT_INSTANTIATION(NODE) \
3291 (CLASSTYPE_USE_TEMPLATE (NODE) = 3)
3312 #define DECL_TEMPLATE_INSTANTIATED(NODE) \
3313 DECL_LANG_FLAG_1 (VAR_OR_FUNCTION_DECL_CHECK (NODE))
3316 #define DECL_INTERFACE_KNOWN(NODE) DECL_LANG_FLAG_5 (NODE)
3325 #define DECL_NOT_REALLY_EXTERN(NODE) \
3326 (DECL_LANG_SPECIFIC (NODE)->decl_flags.not_really_extern)
3328 #define DECL_REALLY_EXTERN(NODE) \
3329 (DECL_EXTERNAL (NODE) && ! DECL_NOT_REALLY_EXTERN (NODE))
3392 /* For thunk NODE, this is the FUNCTION_DECL thunked to. It is
3394 #define THUNK_TARGET(NODE) \
3395 (DECL_LANG_SPECIFIC (NODE)->u.f.befriending_classes)
3399 #define QUALIFIED_NAME_IS_TEMPLATE(NODE) \
3400 (TREE_LANG_FLAG_0 (SCOPE_REF_CHECK (NODE)))
3404 #define OMP_ATOMIC_DEPENDENT_P(NODE) \
3405 (TREE_CODE (TREE_OPERAND (OMP_ATOMIC_CHECK (NODE), 0)) == INTEGER_CST)
3408 #define OMP_FOR_GIMPLIFYING_P(NODE) \
3409 (TREE_LANG_FLAG_0 (OMP_FOR_CHECK (NODE)))
3414 #define CP_OMP_CLAUSE_INFO(NODE) \
3415 TREE_TYPE (OMP_CLAUSE_RANGE_CHECK (NODE, OMP_CLAUSE_PRIVATE, \
3420 #define TRY_STMTS(NODE) TREE_OPERAND (TRY_BLOCK_CHECK (NODE), 0)
3421 #define TRY_HANDLERS(NODE) TREE_OPERAND (TRY_BLOCK_CHECK (NODE), 1)
3423 #define EH_SPEC_STMTS(NODE) TREE_OPERAND (EH_SPEC_BLOCK_CHECK (NODE), 0)
3424 #define EH_SPEC_RAISES(NODE) TREE_OPERAND (EH_SPEC_BLOCK_CHECK (NODE), 1)
3426 #define USING_STMT_NAMESPACE(NODE) TREE_OPERAND (USING_STMT_CHECK (NODE), 0)
3429 #define FN_TRY_BLOCK_P(NODE) TREE_LANG_FLAG_3 (TRY_BLOCK_CHECK (NODE))
3430 #define HANDLER_PARMS(NODE) TREE_OPERAND (HANDLER_CHECK (NODE), 0)
3431 #define HANDLER_BODY(NODE) TREE_OPERAND (HANDLER_CHECK (NODE), 1)
3432 #define HANDLER_TYPE(NODE) TREE_TYPE (HANDLER_CHECK (NODE))
3436 #define CLEANUP_BODY(NODE) TREE_OPERAND (CLEANUP_STMT_CHECK (NODE), 0)
3437 #define CLEANUP_EXPR(NODE) TREE_OPERAND (CLEANUP_STMT_CHECK (NODE), 1)
3438 #define CLEANUP_DECL(NODE) TREE_OPERAND (CLEANUP_STMT_CHECK (NODE), 2)
3443 #define IF_COND(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 0)
3444 #define THEN_CLAUSE(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 1)
3445 #define ELSE_CLAUSE(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 2)
3449 #define WHILE_COND(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 0)
3450 #define WHILE_BODY(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 1)
3454 #define DO_COND(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 0)
3455 #define DO_BODY(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 1)
3460 #define FOR_INIT_STMT(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 0)
3461 #define FOR_COND(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 1)
3462 #define FOR_EXPR(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 2)
3463 #define FOR_BODY(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 3)
3465 #define SWITCH_STMT_COND(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 0)
3466 #define SWITCH_STMT_BODY(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 1)
3467 #define SWITCH_STMT_TYPE(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 2)
3470 #define STMT_EXPR_STMT(NODE) TREE_OPERAND (STMT_EXPR_CHECK (NODE), 0)
3474 #define EXPR_STMT_EXPR(NODE) TREE_OPERAND (EXPR_STMT_CHECK (NODE), 0)
3478 #define TARGET_EXPR_IMPLICIT_P(NODE) \
3479 TREE_LANG_FLAG_0 (TARGET_EXPR_CHECK (NODE))
3483 #define TARGET_EXPR_LIST_INIT_P(NODE) \
3484 TREE_LANG_FLAG_1 (TARGET_EXPR_CHECK (NODE))
3629 /* Node for "pointer to (virtual) function".
3902 #define TEMPLATE_PARM_INDEX_CAST(NODE) \
3903 ((template_parm_index*)TEMPLATE_PARM_INDEX_CHECK (NODE))
3904 #define TEMPLATE_PARM_IDX(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->index)
3905 #define TEMPLATE_PARM_LEVEL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->level)
3906 #define TEMPLATE_PARM_DESCENDANTS(NODE) (TREE_CHAIN (NODE))
3907 #define TEMPLATE_PARM_ORIG_LEVEL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->orig_level)
3908 #define TEMPLATE_PARM_DECL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->decl)
3909 #define TEMPLATE_PARM_PARAMETER_PACK(NODE) \
3910 (TREE_LANG_FLAG_0 (TEMPLATE_PARM_INDEX_CHECK (NODE)))
3914 #define TEMPLATE_TYPE_PARM_INDEX(NODE) \
3915 (TREE_CHECK3 ((NODE), TEMPLATE_TYPE_PARM, TEMPLATE_TEMPLATE_PARM, \
3917 #define TEMPLATE_TYPE_IDX(NODE) \
3918 (TEMPLATE_PARM_IDX (TEMPLATE_TYPE_PARM_INDEX (NODE)))
3919 #define TEMPLATE_TYPE_LEVEL(NODE) \
3920 (TEMPLATE_PARM_LEVEL (TEMPLATE_TYPE_PARM_INDEX (NODE)))
3921 #define TEMPLATE_TYPE_ORIG_LEVEL(NODE) \
3922 (TEMPLATE_PARM_ORIG_LEVEL (TEMPLATE_TYPE_PARM_INDEX (NODE)))
3923 #define TEMPLATE_TYPE_DECL(NODE) \
3924 (TEMPLATE_PARM_DECL (TEMPLATE_TYPE_PARM_INDEX (NODE)))
3925 #define TEMPLATE_TYPE_PARAMETER_PACK(NODE) \
3926 (TEMPLATE_PARM_PARAMETER_PACK (TEMPLATE_TYPE_PARM_INDEX (NODE)))
3962 node. */
3963 #define TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL(NODE) \
3964 ((TREE_CODE (NODE) == BOUND_TEMPLATE_TEMPLATE_PARM) \
3965 ? TYPE_TI_TEMPLATE (NODE) \
3966 : TYPE_NAME (NODE))
4172 /* The original node. Can be either a DECL (for a function or static