📄 cp-tree.h
字号:
/* For FUNCTION_DECLs: nonzero means that this function is a default implementation of a signature method. */#define IS_DEFAULT_IMPLEMENTATION(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.is_default_implementation)/* Nonzero for _DECL means that this decl appears in (or will appear in) as a member in a RECORD_TYPE or UNION_TYPE node. It is also for detecting circularity in case members are multiply defined. In the case of a VAR_DECL, it is also used to determine how program storage should be allocated. */#define DECL_IN_AGGR_P(NODE) (DECL_LANG_FLAG_3(NODE))/* Nonzero if the DECL was defined in the class definition itself, rather than outside the class. */#define DECL_DEFINED_IN_CLASS_P(DECL) \ (DECL_LANG_SPECIFIC (DECL)->decl_flags.defined_in_class)/* Nonzero for FUNCTION_DECL means that this decl is just a friend declaration, and should not be added to the list of member functions for this class. */#define DECL_FRIEND_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.friend_attr)/* A TREE_LIST of the types which have befriended this FUNCTION_DECL. */#define DECL_BEFRIENDING_CLASSES(NODE) \ (DECL_LANG_SPECIFIC(NODE)->befriending_classes)/* Nonzero for FUNCTION_DECL means that this decl is a static member function. */#define DECL_STATIC_FUNCTION_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.static_function)/* Nonzero for a class member means that it is shared between all objects of that class. */#define SHARED_MEMBER_P(NODE) \ (TREE_CODE (NODE) == VAR_DECL || TREE_CODE (NODE) == TYPE_DECL \ || TREE_CODE (NODE) == CONST_DECL) /* Nonzero for FUNCTION_DECL means that this decl is a non-static member function. */#define DECL_NONSTATIC_MEMBER_FUNCTION_P(NODE) \ (TREE_CODE (TREE_TYPE (NODE)) == METHOD_TYPE)/* Nonzero for FUNCTION_DECL means that this decl is a member function (static or non-static). */#define DECL_FUNCTION_MEMBER_P(NODE) \ (DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE) || DECL_STATIC_FUNCTION_P (NODE))/* Nonzero for FUNCTION_DECL means that this member function has `this' as const X *const. */#define DECL_CONST_MEMFUNC_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.const_memfunc)/* Nonzero for FUNCTION_DECL means that this member function has `this' as volatile X *const. */#define DECL_VOLATILE_MEMFUNC_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.volatile_memfunc)/* Nonzero for a DECL means that this member is a non-static member. */#define DECL_NONSTATIC_MEMBER_P(NODE) \ ((TREE_CODE (NODE) == FUNCTION_DECL \ && DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE)) \ || TREE_CODE (NODE) == FIELD_DECL)/* Nonzero for _DECL means that this member object type is mutable. */#define DECL_MUTABLE_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.mutable_flag)/* Nonzero for _DECL means that this constructor is a non-converting constructor. */#define DECL_NONCONVERTING_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.nonconverting)/* Nonzero for FUNCTION_DECL means that this member function exists as part of an abstract class's interface. */#define DECL_ABSTRACT_VIRTUAL_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.abstract_virtual)/* Nonzero for FUNCTION_DECL means that this member function must be overridden by derived classes. */#define DECL_NEEDS_FINAL_OVERRIDER_P(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.needs_final_overrider)/* Nonzero if allocated on permanent_obstack. */#define LANG_DECL_PERMANENT(LANGDECL) ((LANGDECL)->decl_flags.permanent_attr)/* The _TYPE context in which this _DECL appears. This field holds the class where a virtual function instance is actually defined, and the lexical scope of a friend function defined in a class body. */#define DECL_CLASS_CONTEXT(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.context)#define DECL_REAL_CONTEXT(NODE) \ ((TREE_CODE (NODE) == FUNCTION_DECL && DECL_FUNCTION_MEMBER_P (NODE)) \ ? DECL_CLASS_CONTEXT (NODE) : CP_DECL_CONTEXT (NODE))/* NULL_TREE in DECL_CONTEXT represents the global namespace. */#define CP_DECL_CONTEXT(NODE) \ (DECL_CONTEXT (NODE) ? DECL_CONTEXT (NODE) : global_namespace)#define FROB_CONTEXT(NODE) ((NODE) == global_namespace ? NULL_TREE : (NODE))/* For a virtual function, the base where we find its vtable entry. For a non-virtual function, the base where it is defined. */#define DECL_VIRTUAL_CONTEXT(NODE) DECL_CONTEXT (NODE)/* 1 iff NODE has namespace scope, including the global namespace. */#define DECL_NAMESPACE_SCOPE_P(NODE) \ (DECL_CONTEXT (NODE) == NULL_TREE \ || TREE_CODE (DECL_CONTEXT (NODE)) == NAMESPACE_DECL)/* 1 iff NODE is a class member. */#define DECL_CLASS_SCOPE_P(NODE) \ (DECL_CONTEXT (NODE) \ && TREE_CODE_CLASS (TREE_CODE (DECL_CONTEXT (NODE))) == 't')/* 1 iff NODE is function-local. */#define DECL_FUNCTION_SCOPE_P(NODE) \ (DECL_CONTEXT (NODE) \ && TREE_CODE (DECL_CONTEXT (NODE)) == FUNCTION_DECL) /* For a NAMESPACE_DECL: the list of using namespace directives The PURPOSE is the used namespace, the value is the namespace that is the common ancestor. */#define DECL_NAMESPACE_USING(NODE) DECL_VINDEX(NODE)/* In a NAMESPACE_DECL, the DECL_INITIAL is used to record all users of a namespace, to record the transitive closure of using namespace. */#define DECL_NAMESPACE_USERS(NODE) DECL_INITIAL (NODE)/* In a NAMESPACE_DECL, points to the original namespace if this is a namespace alias. */#define DECL_NAMESPACE_ALIAS(NODE) DECL_ABSTRACT_ORIGIN (NODE)#define ORIGINAL_NAMESPACE(NODE) \ (DECL_NAMESPACE_ALIAS (NODE) ? DECL_NAMESPACE_ALIAS (NODE) : (NODE))/* In a non-local VAR_DECL with static storage duration, this is the initialization priority. If this value is zero, the NODE will be initialized at the DEFAULT_INIT_PRIORITY. */#define DECL_INIT_PRIORITY(NODE) (DECL_FIELD_SIZE ((NODE)))/* In a TREE_LIST concatenating using directives, indicate indirekt directives */#define TREE_INDIRECT_USING(NODE) ((NODE)->common.lang_flag_0)/* In a VAR_DECL for a variable declared in a for statement, this is the shadowed (local) variable. */#define DECL_SHADOWED_FOR_VAR(NODE) DECL_RESULT(NODE)/* Points back to the decl which caused this lang_decl to be allocated. */#define DECL_MAIN_VARIANT(NODE) (DECL_LANG_SPECIFIC(NODE)->main_decl_variant)/* For a FUNCTION_DECL: if this function was declared inline inside of a class declaration, this is where the text for the function is squirreled away. */#define DECL_PENDING_INLINE_INFO(NODE) (DECL_LANG_SPECIFIC(NODE)->pending_inline_info)/* True if on the saved_inlines (see decl2.c) list. */#define DECL_SAVED_INLINE(DECL) \ (DECL_LANG_SPECIFIC(DECL)->decl_flags.saved_inline)/* For a FUNCTION_DECL: if this function was declared inside a signature declaration, this is the corresponding member function pointer that was created for it. */#define DECL_MEMFUNC_POINTER_TO(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.memfunc_pointer_to)/* For a FIELD_DECL: this points to the signature member function from which this signature member function pointer was created. */#define DECL_MEMFUNC_POINTING_TO(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.memfunc_pointer_to)/* For a VAR_DECL or FUNCTION_DECL: template-specific information. */#define DECL_TEMPLATE_INFO(NODE) (DECL_LANG_SPECIFIC(NODE)->decl_flags.template_info)/* Template information for a RECORD_TYPE or UNION_TYPE. */#define CLASSTYPE_TEMPLATE_INFO(NODE) (TYPE_LANG_SPECIFIC(NODE)->template_info)/* Template information for an ENUMERAL_TYPE. Although an enumeration may not be a primary template, it may be declared within the scope of a primary template and the enumeration constants may depend on non-type template parameters. */#define ENUM_TEMPLATE_INFO(NODE) (TYPE_BINFO (NODE))/* Template information for a template template parameter. */#define TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO(NODE) (TYPE_BINFO (NODE))/* Template information for an ENUMERAL_, RECORD_, or UNION_TYPE. */#define TYPE_TEMPLATE_INFO(NODE) \ (TREE_CODE (NODE) == ENUMERAL_TYPE \ ? ENUM_TEMPLATE_INFO (NODE) : \ (TREE_CODE (NODE) == TEMPLATE_TEMPLATE_PARM \ ? TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (NODE) \ : CLASSTYPE_TEMPLATE_INFO (NODE)))/* Set the template information for an ENUMERAL_, RECORD_, or UNION_TYPE to VAL. */#define SET_TYPE_TEMPLATE_INFO(NODE, VAL) \ (TREE_CODE (NODE) == ENUMERAL_TYPE \ ? (ENUM_TEMPLATE_INFO (NODE) = VAL) \ : (CLASSTYPE_TEMPLATE_INFO (NODE) = VAL))#define TI_TEMPLATE(NODE) (TREE_PURPOSE (NODE))#define TI_ARGS(NODE) (TREE_VALUE (NODE))#define TI_SPEC_INFO(NODE) (TREE_CHAIN (NODE))#define TI_PENDING_TEMPLATE_FLAG(NODE) TREE_LANG_FLAG_1 (NODE)/* The TEMPLATE_DECL instantiated or specialized by NODE. This TEMPLATE_DECL will be the immediate parent, not the most general template. For example, in: template <class T> struct S { template <class U> void f(U); } the FUNCTION_DECL for S<int>::f<double> will have, as its DECL_TI_TEMPLATE, `template <class U> S<int>::f<U>'. As a special case, for a member friend template of a template class, this value will not be a TEMPLATE_DECL, but rather a LOOKUP_EXPR or IDENTIFIER_NODE indicating the name of the template and any explicit template arguments provided. For example, in: template <class T> struct S { friend void f<int>(int, double); } the DECL_TI_TEMPLATE will be a LOOKUP_EXPR for `f' and the DECL_TI_ARGS will be {int}. */ #define DECL_TI_TEMPLATE(NODE) TI_TEMPLATE (DECL_TEMPLATE_INFO (NODE))/* The template arguments used to obtain this decl from the most general form of DECL_TI_TEMPLATE. For the example given for DECL_TI_TEMPLATE, the DECL_TI_ARGS will be {int, double}. These are always the full set of arguments required to instantiate this declaration from the most general template specialized here. */#define DECL_TI_ARGS(NODE) TI_ARGS (DECL_TEMPLATE_INFO (NODE))#define CLASSTYPE_TI_TEMPLATE(NODE) TI_TEMPLATE (CLASSTYPE_TEMPLATE_INFO (NODE))#define CLASSTYPE_TI_ARGS(NODE) TI_ARGS (CLASSTYPE_TEMPLATE_INFO (NODE))#define CLASSTYPE_TI_SPEC_INFO(NODE) TI_SPEC_INFO (CLASSTYPE_TEMPLATE_INFO (NODE))#define ENUM_TI_TEMPLATE(NODE) \ TI_TEMPLATE (ENUM_TEMPLATE_INFO (NODE))#define ENUM_TI_ARGS(NODE) \ TI_ARGS (ENUM_TEMPLATE_INFO (NODE))/* Like DECL_TI_TEMPLATE, but for an ENUMERAL_, RECORD_, or UNION_TYPE. */#define TYPE_TI_TEMPLATE(NODE) \ (TI_TEMPLATE (TYPE_TEMPLATE_INFO (NODE)))/* Like DECL_TI_ARGS, , but for an ENUMERAL_, RECORD_, or UNION_TYPE. */#define TYPE_TI_ARGS(NODE) \ (TI_ARGS (TYPE_TEMPLATE_INFO (NODE)))#define INNERMOST_TEMPLATE_PARMS(NODE) TREE_VALUE(NODE)/* Nonzero if the NODE corresponds to the template parameters for a member template, whose inline definition is being processed after the class definition is complete. */#define TEMPLATE_PARMS_FOR_INLINE(NODE) TREE_LANG_FLAG_1 (NODE)#define DECL_SAVED_TREE(NODE) DECL_MEMFUNC_POINTER_TO (NODE)#define COMPOUND_STMT_NO_SCOPE(NODE) TREE_LANG_FLAG_0 (NODE)#define NEW_EXPR_USE_GLOBAL(NODE) TREE_LANG_FLAG_0 (NODE)#define DELETE_EXPR_USE_GLOBAL(NODE) TREE_LANG_FLAG_0 (NODE)#define DELETE_EXPR_USE_VEC(NODE) TREE_LANG_FLAG_1 (NODE)#define LOOKUP_EXPR_GLOBAL(NODE) TREE_LANG_FLAG_0 (NODE)/* The TYPE_MAIN_DECL for a class template type is a TYPE_DECL, not a TEMPLATE_DECL. This macro determines whether or not a given class type is really a template type, as opposed to an instantiation or specialization of one. */#define CLASSTYPE_IS_TEMPLATE(NODE) \ (CLASSTYPE_TEMPLATE_INFO (NODE) \ && !CLASSTYPE_USE_TEMPLATE (NODE) \ && PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (NODE)))/* The name used by the user to name the typename type. Typically, this is an IDENTIFIER_NODE, and the same as the DECL_NAME on the corresponding TYPE_DECL. However, this may also be a TEMPLATE_ID_EXPR if we had something like `typename X::Y<T>'. */#define TYPENAME_TYPE_FULLNAME(NODE) TYPE_BINFO (NODE)/* Nonzero if NODE is an implicit typename. */#define IMPLICIT_TYPENAME_P(NODE) \ (TREE_CODE (NODE) == TYPENAME_TYPE && TREE_TYPE (NODE))/* Nonzero in INTEGER_CST means that this int is negative by dint of using a twos-complement negated operand. */#define TREE_NEGATED_INT(NODE) (TREE_LANG_FLAG_0 (NODE))#if 0 /* UNUSED *//* Nonzero in any kind of _EXPR or _REF node means that it is a call to a storage allocation routine. If, later, alternate storage is found to hold the object, this call can be ignored. */#define TREE_CALLS_NEW(NODE) (TREE_LANG_FLAG_1 (NODE))#endif/* Nonzero in any kind of _TYPE that uses multiple inheritance or virtual baseclasses. */#define TYPE_USES_COMPLEX_INHERITANCE(NODE) (TREE_LANG_FLAG_1 (NODE))#if 0 /* UNUSED *//* Nonzero in IDENTIFIER_NODE means that this name is not the name the user gave; it's a DECL_NESTED_TYPENAME. Someone may want to set this on mangled function names, too, but it isn't currently. */#define TREE_MANGLED(NODE) (FOO)#endif#if 0 /* UNUSED *//* Nonzero in IDENTIFIER_NODE means that this name is overloaded, and should be looked up in a non-standard way. */#define DECL_OVERLOADED(NODE) (FOO)#endif/* Nonzero if this (non-TYPE)_DECL has its virtual attribute set. For a FUNCTION_DECL, this is when the function is a virtual function. For a VAR_DECL, this is when the variable is a virtual function table. For a FIELD_DECL, when the field is the field for the virtual function table. For an IDENTIFIER_NODE, nonzero if any function with this name has been declared virtual. For a _TYPE if it uses virtual functions (or is derived from one that does). */#define TYPE_VIRTUAL_P(NODE) (TREE_LANG_FLAG_2 (NODE))extern int flag_new_for_scope;/* This flag is true of a local VAR_DECL if it was declared in a for statement, but we are no longer in the scope of the for. */#define DECL_DEAD_FOR_LOCAL(NODE) DECL_LANG_FLAG_7 (NODE)/*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -