mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-19 16:30:04 +00:00
Remove useless overloads of is_type
Now that there is a is_type predicate that takes a a type_or_decl_base type, the overloads that take a decl_base or a type_base are useless and can even lead to overload resolution issues. This patch removes those useless overloads. * include/abg-fwd.h (is_type): Remove the overloads that take decl_base and type_base types. * src/abg-ir.cc (is_type): Likewise. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
593a8c1956
commit
ae3c88da13
@ -375,15 +375,6 @@ is_type(const type_or_decl_base*);
|
||||
type_base_sptr
|
||||
is_type(const type_or_decl_base_sptr& tod);
|
||||
|
||||
bool
|
||||
is_type(const decl_base&);
|
||||
|
||||
type_base_sptr
|
||||
is_type(const decl_base_sptr);
|
||||
|
||||
type_base*
|
||||
is_type(decl_base*);
|
||||
|
||||
bool
|
||||
is_anonymous_type(type_base*);
|
||||
|
||||
|
@ -5874,35 +5874,6 @@ is_type(const type_or_decl_base_sptr& tod)
|
||||
/// @param d the declaration to test for.
|
||||
///
|
||||
/// @return true if the declaration is a type, false otherwise.
|
||||
bool
|
||||
is_type(const decl_base& d)
|
||||
{
|
||||
if (dynamic_cast<const type_base*>(&d))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Tests whether a declaration is a type, and return it properly
|
||||
/// converted into a type in that case.
|
||||
///
|
||||
/// @param decl the declaration to consider.
|
||||
///
|
||||
/// @return the pointer to type_base representing @p decl converted as
|
||||
/// a type, iff it's a type, or NULL otherwise.
|
||||
type_base_sptr
|
||||
is_type(const decl_base_sptr decl)
|
||||
{return dynamic_pointer_cast<type_base>(decl);}
|
||||
|
||||
/// Tests whether a declaration is a type, and return it properly
|
||||
/// converted into a type in that case.
|
||||
///
|
||||
/// @param decl the declaration to consider.
|
||||
///
|
||||
/// @return the pointer to type_base representing @p decl converted as
|
||||
/// a type, iff it's a type, or NULL otherwise.
|
||||
type_base*
|
||||
is_type(decl_base* decl)
|
||||
{return dynamic_cast<type_base*>(decl);}
|
||||
|
||||
/// Test if a given type is anonymous.
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user