TYPE FIELDS

#define TYPE_FIELDS(NODE) (RECORD_OR_UNION_CHECK (NODE)->type_non_common.values)

Returns a list of declarations for a class. Almost all non-function members are available on this list. Given one member, the next can be found by following the TREE_CHAIN. You should not depend in any way on the order in which fields appear on this list.

A FIELD_DECL is used to represent a non-static data member.

A VAR_DECL is used to represent a static data members.

A TYPE_DECL is used to represent a type.

Note that the CONST_DECL for an enumeration constant will appear on this list, if the enumeration type was declared in the class (of course, the TYPE_DECL for the enumeration type will appear here as well).

TYPE_FIELDS does NOT return declarations which were declared in a parent class. So if you use TYPE_FIELDS(class_b), where class B inherits from A, none of the members of class A will be returned. In other words, inherited variables and methods are not shown.

Defined in tree.h.