mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-17 07:24:34 +00:00
Make decl_base::set_scope virtual, to work on class_decl::member_type
* include/abg-ir.h (decl_base::set_scope): Make this virtual. (class_decl::member_type::set_scope): Declare an overload here. * src/abg-ir.cc (class_decl::member_type::set_scope): Define new overload. Make this set the scope of the underlying type of the member type as well. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
118a5df30d
commit
f47b1ffd6d
@ -198,7 +198,7 @@ private:
|
||||
// Forbidden
|
||||
decl_base();
|
||||
|
||||
void
|
||||
virtual void
|
||||
set_scope(scope_decl*);
|
||||
|
||||
public:
|
||||
@ -1750,6 +1750,9 @@ public:
|
||||
|
||||
member_type(shared_ptr<type_base> t, access_specifier access);
|
||||
|
||||
virtual void
|
||||
set_scope(scope_decl*);
|
||||
|
||||
virtual bool
|
||||
operator==(const decl_base&) const;
|
||||
|
||||
|
@ -3037,6 +3037,17 @@ class_decl::member_type::member_type(shared_ptr<type_base> t,
|
||||
member_base(access), type_(t)
|
||||
{}
|
||||
|
||||
/// Set the scope of a member type.
|
||||
///
|
||||
/// @param scope the new scope to set.
|
||||
void
|
||||
class_decl::member_type::set_scope(scope_decl* scope)
|
||||
{
|
||||
decl_base::context_ = scope;
|
||||
decl_base_sptr td = get_type_declaration(as_type());
|
||||
td->set_scope(scope);
|
||||
}
|
||||
|
||||
bool
|
||||
class_decl::member_type::operator==(const decl_base& other) const
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user