[2/3] Remove unused is_reference_or_pointer_diff.
Commit Message
The function is_reference_or_pointer_diff was added in commit
85929105 Fix redundancy marking for change of types used directly
and was updated to peel typedefs as a first step in
ef9d20c9 Fix redundancy detection through fn ptr and typedef paths
which, however, also made it obsolete.
This commit removes the function's declaration and definition.
There are no functional changes.
* include/abg-comparison.h (is_reference_or_pointer_diff):
Drop function declaration.
* src/abg-comparison.cc (is_reference_or_pointer_diff): Drop
function definition.
Signed-off-by: Giuliano Procida <gprocida@google.com>
---
include/abg-comparison.h | 2 --
src/abg-comparison.cc | 15 ---------------
2 files changed, 17 deletions(-)
Comments
On Thu, Jul 09, 2020 at 02:14:28PM +0100, Giuliano Procida wrote:
>The function is_reference_or_pointer_diff was added in commit
>
>85929105 Fix redundancy marking for change of types used directly
>
>and was updated to peel typedefs as a first step in
>
>ef9d20c9 Fix redundancy detection through fn ptr and typedef paths
>
>which, however, also made it obsolete.
>
>This commit removes the function's declaration and definition.
>There are no functional changes.
>
> * include/abg-comparison.h (is_reference_or_pointer_diff):
> Drop function declaration.
> * src/abg-comparison.cc (is_reference_or_pointer_diff): Drop
> function definition.
>
>Signed-off-by: Giuliano Procida <gprocida@google.com>
Reviewed-by: Matthias Maennich <maennich@google.com>
Cheers,
Matthias
>---
> include/abg-comparison.h | 2 --
> src/abg-comparison.cc | 15 ---------------
> 2 files changed, 17 deletions(-)
>
>diff --git a/include/abg-comparison.h b/include/abg-comparison.h
>index 84258209..c4eb5925 100644
>--- a/include/abg-comparison.h
>+++ b/include/abg-comparison.h
>@@ -2852,8 +2852,6 @@ is_reference_diff(const diff* diff);
>
> const qualified_type_diff*
> is_qualified_type_diff(const diff* diff);
>-bool
>-is_reference_or_pointer_diff(const diff* diff);
>
> const fn_parm_diff*
> is_fn_parm_diff(const diff* diff);
>diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc
>index d0f1d21b..0dbe2635 100644
>--- a/src/abg-comparison.cc
>+++ b/src/abg-comparison.cc
>@@ -788,21 +788,6 @@ const qualified_type_diff*
> is_qualified_type_diff(const diff* diff)
> {return dynamic_cast<const qualified_type_diff*>(diff);}
>
>-/// Test if a diff node is either a reference diff node or a pointer
>-/// diff node. Note that this function also works on diffs of
>-/// typedefs of reference or pointer.
>-///
>-/// @param diff the diff node to test.
>-///
>-/// @return true iff @p diff is either reference diff node or a
>-/// pointer diff node.
>-bool
>-is_reference_or_pointer_diff(const diff* diff)
>-{
>- diff = peel_typedef_diff(diff);
>- return is_reference_diff(diff) || is_pointer_diff(diff);
>-}
>-
> /// Test if a diff node is a reference or pointer diff node to a
> /// change that is neither basic type change nor distinct type change.
> ///
>--
>2.27.0.383.g050319c2ae-goog
>
Giuliano Procida <gprocida@google.com> a écrit:
> The function is_reference_or_pointer_diff was added in commit
>
> 85929105 Fix redundancy marking for change of types used directly
>
> and was updated to peel typedefs as a first step in
>
> ef9d20c9 Fix redundancy detection through fn ptr and typedef paths
>
> which, however, also made it obsolete.
>
> This commit removes the function's declaration and definition.
> There are no functional changes.
>
> * include/abg-comparison.h (is_reference_or_pointer_diff):
> Drop function declaration.
> * src/abg-comparison.cc (is_reference_or_pointer_diff): Drop
> function definition.
>
> Signed-off-by: Giuliano Procida <gprocida@google.com>
Applied to master, thanks!
[...]
Cheers,
@@ -2852,8 +2852,6 @@ is_reference_diff(const diff* diff);
const qualified_type_diff*
is_qualified_type_diff(const diff* diff);
-bool
-is_reference_or_pointer_diff(const diff* diff);
const fn_parm_diff*
is_fn_parm_diff(const diff* diff);
@@ -788,21 +788,6 @@ const qualified_type_diff*
is_qualified_type_diff(const diff* diff)
{return dynamic_cast<const qualified_type_diff*>(diff);}
-/// Test if a diff node is either a reference diff node or a pointer
-/// diff node. Note that this function also works on diffs of
-/// typedefs of reference or pointer.
-///
-/// @param diff the diff node to test.
-///
-/// @return true iff @p diff is either reference diff node or a
-/// pointer diff node.
-bool
-is_reference_or_pointer_diff(const diff* diff)
-{
- diff = peel_typedef_diff(diff);
- return is_reference_diff(diff) || is_pointer_diff(diff);
-}
-
/// Test if a diff node is a reference or pointer diff node to a
/// change that is neither basic type change nor distinct type change.
///