]> sourceware.org Git - libabigail.git/commitdiff
Add a new corpus_diff::has_net_changes() entry point
authorDodji Seketeli <dodji@redhat.com>
Tue, 21 Jul 2015 10:48:19 +0000 (12:48 +0200)
committerDodji Seketeli <dodji@redhat.com>
Tue, 21 Jul 2015 10:48:19 +0000 (12:48 +0200)
This entry point is to test if there are still ABI changes between two
corpora after applying suppression specifications.

* include/abg-comparison.h (corpus_diff::has_net_changes): Declare
new member function.
* src/abg-comparison.cc (corpus_diff::has_net_changes): Define it.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
include/abg-comparison.h
src/abg-comparison.cc

index 8950b194c7f31da46d5f85e5e3affe8a102dea83..f0c9efca8d74dbe1419f344e021c19f2a47e168f 100644 (file)
@@ -2635,6 +2635,9 @@ public:
   bool
   has_net_subtype_changes() const;
 
+  bool
+  has_net_changes() const;
+
   const diff_stats&
   apply_filters_and_suppressions_before_reporting();
 
index 4258d9e1ed8b3bfbc2769f7f1da026b472fbd29e..4776806ef6ac4c5fbf317c0152b76fee4a4cb373 100644 (file)
@@ -13887,6 +13887,29 @@ corpus_diff::has_net_subtype_changes() const
          || stats.net_num_vars_changed() != 0);
 }
 
+/// Test if the current instance of @ref corpus_diff carries changes
+/// whose reports are not suppressed by any suppression specification.
+/// In effect, these are deemed incompatible ABI changes.
+///
+/// @return true iff the the current instance of @ref corpus_diff
+/// carries subtype changes that are deemed incompatible ABI changes.
+bool
+corpus_diff::has_net_changes() const
+{
+    const diff_stats& stats = const_cast<corpus_diff*>(this)->
+      apply_filters_and_suppressions_before_reporting();
+
+  return (stats.net_num_func_changed()
+         || stats.net_num_vars_changed()
+         || stats.net_num_func_added()
+         || stats.net_num_added_func_syms()
+         || stats.net_num_func_removed()
+         || stats.net_num_removed_func_syms()
+         || stats.net_num_vars_added()
+         || stats.net_num_added_var_syms()
+         || stats.net_num_removed_var_syms());
+}
+
 /// "Less than" functor to compare instances of @ref function_decl.
 struct function_comp
 {
This page took 0.047798 seconds and 5 git commands to generate.