mirror of
git://sourceware.org/git/libabigail.git
synced 2025-02-06 00:31:34 +00:00
Do not forget to traverse member types
* include/abg-ir.h (class_decl::member_type::traverse): Declare new virtual function. (ir_node_visitor::visit): Declare new virtual function * src/abg-ir.cc (class_decl::member_type::traverse): Implement the traversal of a member type. (ir_node_visitor::visit): Provide a default implementation for the visitor of member type. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
cc5af46601
commit
9b1e3cd86a
@ -1885,6 +1885,9 @@ public:
|
||||
virtual string
|
||||
get_pretty_representation() const;
|
||||
|
||||
virtual void
|
||||
traverse(ir_node_visitor& v);
|
||||
|
||||
void
|
||||
set_access_specifier(access_specifier);
|
||||
|
||||
@ -2486,6 +2489,7 @@ struct ir_node_visitor : public node_visitor_base
|
||||
virtual void visit(class_tdecl*);
|
||||
virtual void visit(class_decl*);
|
||||
virtual void visit(class_decl::data_member*);
|
||||
virtual void visit(class_decl::member_type*);
|
||||
virtual void visit(class_decl::member_function*);
|
||||
virtual void visit(class_decl::member_function_template*);
|
||||
virtual void visit(class_decl::member_class_template*);
|
||||
|
@ -3270,6 +3270,21 @@ const type_base_sptr&
|
||||
class_decl::member_type::get_underlying_type() const
|
||||
{return type_;}
|
||||
|
||||
/// Traverse a class_decl::member_type IR Node all the way to its
|
||||
/// underlying type.
|
||||
///
|
||||
/// @param v the visitor to use to visit the current node and its
|
||||
/// underlying nodes.
|
||||
void
|
||||
class_decl::member_type::traverse(ir_node_visitor& v)
|
||||
{
|
||||
v.visit(this);
|
||||
type_base_sptr t = get_underlying_type();
|
||||
decl_base_sptr decl = get_type_declaration(t);
|
||||
assert(decl);
|
||||
decl->traverse(v);
|
||||
}
|
||||
|
||||
/// Set the scope of a member type.
|
||||
///
|
||||
/// @param scope the new scope to set.
|
||||
@ -3916,6 +3931,10 @@ void
|
||||
ir_node_visitor::visit(class_decl::data_member*)
|
||||
{}
|
||||
|
||||
void
|
||||
ir_node_visitor::visit(class_decl::member_type*)
|
||||
{}
|
||||
|
||||
void
|
||||
ir_node_visitor::visit(class_decl::member_function*)
|
||||
{}
|
||||
|
Loading…
Reference in New Issue
Block a user