PandA-2024.02
|
struct definition of the field attr on function_decl, field_decl, var_decl tree node. More...
#include <tree_node.hpp>
Public Member Functions | |
virtual | ~attr () |
Destructor. More... | |
void | add (const TreeVocabularyTokenTypes_TokenEnum a) |
Add an attribute to list of attribute. More... | |
bool | is_constructor () const |
Return true if there is TOK_CONSTRUCTOR in the list of attributes. More... | |
bool | is_destructor () const |
Return true if there is TOK_DESTRUCTOR in the list of attributes. More... | |
bool | is_member () const |
Return true if there is TOK_MEMBER in the list of attributes. More... | |
bool | is_call () const |
returns true if there is a TOK_CALL in the list of attributes More... | |
bool | is_new () const |
returns true if there is a TOK_NEW in the list of attributes More... | |
bool | is_public () const |
returns true if there is a TOK_PUBLIC in the list of attributes More... | |
bool | is_private () const |
returns true if there is a TOK_PRIVATE in the list of attributes More... | |
bool | is_protected () const |
returns true if there is a TOK_PROTECTED in the list of attributes More... | |
bool | is_bitfield () const |
returns true if there is a TOK_BITFIELD in the list of attributes More... | |
virtual void | visit (tree_node_visitor *const v) const |
virtual function used to traverse the tree_node data structure. More... | |
Data Fields | |
CustomOrderedSet< TreeVocabularyTokenTypes_TokenEnum > | list_attr |
list of TOKEN, represented as int, associated to the tree_node More... | |
struct definition of the field attr on function_decl, field_decl, var_decl tree node.
The tree walker structure of this field is: (TOK_NEW | TOK_DELETE | TOK_ASSIGN | TOK_MEMBER | TOK_PUBLIC | TOK_PRIVATE | TOK_PROTECTED | TOK_NORETURN | TOK_VOLATILE | TOK_NOINLINE | TOK_ALWAYS_INLINE | TOK_USED | TOK_UNUSED | TOK_CONST | TOK_TRANSPARENT_UNION | TOK_CONSTRUCTOR | TOK_DESTRUCTOR | TOK_MODE | TOK_SECTION | TOK_ALIGNED | TOK_WEAK | TOK_ALIAS | TOK_NO_INSTRUMENT_FUNCTION | TOK_MALLOC | TOK_NO_STACK_LIMIT | TOK_PURE | TOK_DEPRECATED | TOK_VECTOR_SIZE | TOK_VISIBILITY | TOK_TLS_MODEL | TOK_NONNULL | TOK_NOTHROW | TOK_MAY_ALIAS | TOK_WARN_UNUSED_RES | TOK_FORMAT | TOK_FORMAT_ARG | TOK_NULL | TOK_GLOBAL_INIT | TOK_GLOBAL_FINI | TOK_CONVERSION | TOK_VIRTUAL | TOK_LSHIFT | TOK_PSEUDO | TOK_TEMPL | TOK_MUTABLE TOK_VECNEW | TOK_VECDELETE | TOK_POS | TOK_NEG | TOK_ADDR | TOK_DEREF | TOK_NOT | TOK_LNOT | TOK_PREINC | TOK_PREDEC | TOK_PLUSASSIGN | TOK_PLUS | TOK_MINUSASSIGN | TOK_MINUS | TOK_MULTASSIGN | TOK_MULT | TOK_DIVASSIGN | TOK_DIV | TOK_MODASSIGN | TOK_MOD | TOK_ANDASSIGN | TOK_AND | TOK_ORASSIGN |TOK_OR | TOK_XORASSIGN | TOK_XOR | TOK_LSHIFTASSIGN | TOK_RSHIFTASSIGN | TOK_RSHIFT | TOK_EQ | TOK_NE | TOK_LT | TOK_GT | TOK_LE | TOK_GE | TOK_LAND | TOK_LOR | TOK_COMPOUND | TOK_MEMREF | TOK_REF | TOK_SUBS | TOK_POSTINC | TOK_POSTDEC | TOK_CALL | TOK_THUNK | TOK_THIS_ADJUSTING | TOK_RESULT_ADJUSTING )*
Definition at line 774 of file tree_node.hpp.
|
virtualdefault |
|
inline |
Add an attribute to list of attribute.
a | is the token number of the token attribute. |
Definition at line 788 of file tree_node.hpp.
bool attr::is_bitfield | ( | ) | const |
returns true if there is a TOK_BITFIELD in the list of attributes
Definition at line 257 of file tree_node.cpp.
References TOK_BITFIELD, and srcp::~srcp().
bool attr::is_call | ( | ) | const |
returns true if there is a TOK_CALL in the list of attributes
Definition at line 232 of file tree_node.cpp.
References TOK_CALL.
bool attr::is_constructor | ( | ) | const |
Return true if there is TOK_CONSTRUCTOR in the list of attributes.
Definition at line 217 of file tree_node.cpp.
References TOK_CONSTRUCTOR.
Referenced by function_decl::is_constructor().
bool attr::is_destructor | ( | ) | const |
Return true if there is TOK_DESTRUCTOR in the list of attributes.
Definition at line 222 of file tree_node.cpp.
References TOK_DESTRUCTOR.
Referenced by function_decl::is_destructor().
bool attr::is_member | ( | ) | const |
Return true if there is TOK_MEMBER in the list of attributes.
Definition at line 227 of file tree_node.cpp.
References TOK_MEMBER.
bool attr::is_new | ( | ) | const |
returns true if there is a TOK_NEW in the list of attributes
Definition at line 237 of file tree_node.cpp.
References TOK_NEW.
bool attr::is_private | ( | ) | const |
returns true if there is a TOK_PRIVATE in the list of attributes
Definition at line 252 of file tree_node.cpp.
References TOK_PRIVATE.
Referenced by function_decl::is_private().
bool attr::is_protected | ( | ) | const |
returns true if there is a TOK_PROTECTED in the list of attributes
Definition at line 247 of file tree_node.cpp.
References TOK_PROTECTED.
Referenced by function_decl::is_protected().
bool attr::is_public | ( | ) | const |
returns true if there is a TOK_PUBLIC in the list of attributes
Definition at line 242 of file tree_node.cpp.
References TOK_PUBLIC.
Referenced by function_decl::is_public().
|
virtual |
virtual function used to traverse the tree_node data structure.
v | is a reference to the tree_node visitor class |
Reimplemented in var_decl, function_decl, and field_decl.
Definition at line 211 of file tree_node.cpp.
References ALL_VISIT.
CustomOrderedSet<TreeVocabularyTokenTypes_TokenEnum> attr::list_attr |
list of TOKEN, represented as int, associated to the tree_node
Definition at line 777 of file tree_node.hpp.
Referenced by tree_helper::print_function_name(), and raw_writer::write_when_not_null_point_to().