[05/11] Rename declaration-definition change category.

Message ID 20200610115940.26035-6-gprocida@google.com
State Committed
Headers
Series Add incomplete enum support. |

Commit Message

Giuliano Procida June 10, 2020, 11:59 a.m. UTC
  This patch renames CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY to
TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY.

Signed-off-by: Giuliano Procida <gprocida@google.com>
---
 include/abg-comparison.h    | 10 +++++-----
 src/abg-comp-filter.cc      |  2 +-
 src/abg-comparison.cc       |  6 +++---
 src/abg-default-reporter.cc |  2 +-
 src/abg-leaf-reporter.cc    |  2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)
  

Comments

Dodji Seketeli June 29, 2020, 4:17 p.m. UTC | #1
Hello,

Giuliano Procida <gprocida@google.com> a écrit:

> This patch renames CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY to
> TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY.

This patch lacks a ChangeLog part in the commit log, so I took the
liberty to add it.

> Signed-off-by: Giuliano Procida <gprocida@google.com>

Applied to master, thanks!

Cheers,
  

Patch

diff --git a/include/abg-comparison.h b/include/abg-comparison.h
index bb510a18..a46c7184 100644
--- a/include/abg-comparison.h
+++ b/include/abg-comparison.h
@@ -418,10 +418,9 @@  enum diff_category
   /// present as a child of a other nodes in the diff tree.
   REDUNDANT_CATEGORY = 1 << 13,
 
-  /// This means that a diff node in the sub-tree carries a class type
-  /// that was declaration-only and that is now defined, or vice
-  /// versa.
-  CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY = 1 << 14,
+  /// This means that a diff node in the sub-tree carries a type that
+  /// was declaration-only and that is now defined, or vice versa.
+  TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY = 1 << 14,
 
   /// A diff node in this category is a function parameter type which
   /// top cv-qualifiers change.
@@ -447,6 +446,7 @@  enum diff_category
   /// array type of a global variable, but the ELF size of the
   /// variable didn't change.
   BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY = 1 << 20,
+
   /// A special enumerator that is the logical 'or' all the
   /// enumerators above.
   ///
@@ -467,7 +467,7 @@  enum diff_category
   | SIZE_OR_OFFSET_CHANGE_CATEGORY
   | VIRTUAL_MEMBER_CHANGE_CATEGORY
   | REDUNDANT_CATEGORY
-  | CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY
+  | TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY
   | FN_PARM_TYPE_TOP_CV_CHANGE_CATEGORY
   | FN_PARM_TYPE_CV_CHANGE_CATEGORY
   | FN_RETURN_TYPE_CV_CHANGE_CATEGORY
diff --git a/src/abg-comp-filter.cc b/src/abg-comp-filter.cc
index 36fca73d..81548427 100644
--- a/src/abg-comp-filter.cc
+++ b/src/abg-comp-filter.cc
@@ -1518,7 +1518,7 @@  categorize_harmless_diff_node(diff *d, bool pre)
 	s = is_decl(d->second_subject());
 
       if (has_class_decl_only_def_change(d))
-	category |= CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY;
+	category |= TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY;
 
       if (access_changed(f, s))
 	category |= ACCESS_CHANGE_CATEGORY;
diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc
index 857ffa8a..f77799f2 100644
--- a/src/abg-comparison.cc
+++ b/src/abg-comparison.cc
@@ -2957,7 +2957,7 @@  get_default_harmless_categories_bitmap()
 	  | abigail::comparison::HARMLESS_SYMBOL_ALIAS_CHANGE_CATEORY
 	  | abigail::comparison::HARMLESS_UNION_CHANGE_CATEGORY
 	  | abigail::comparison::HARMLESS_DATA_MEMBER_CHANGE_CATEGORY
-	  | abigail::comparison::CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY
+	  | abigail::comparison::TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY
 	  | abigail::comparison::FN_PARM_TYPE_TOP_CV_CHANGE_CATEGORY
 	  | abigail::comparison::FN_PARM_TYPE_CV_CHANGE_CATEGORY
 	  | abigail::comparison::FN_RETURN_TYPE_CV_CHANGE_CATEGORY
@@ -3108,11 +3108,11 @@  operator<<(ostream& o, diff_category c)
       emitted_a_category |= true;
     }
 
-  if (c & CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY)
+  if (c & TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY)
     {
       if (emitted_a_category)
 	o << "|";
-      o << "CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY";
+      o << "TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY";
       emitted_a_category |= true;
     }
 
diff --git a/src/abg-default-reporter.cc b/src/abg-default-reporter.cc
index 42851346..2acb6954 100644
--- a/src/abg-default-reporter.cc
+++ b/src/abg-default-reporter.cc
@@ -846,7 +846,7 @@  default_reporter::report(const class_or_union_diff& d,
   const diff_context_sptr& ctxt = d.context();
 
   // Report class decl-only <-> definition change.
-  if (ctxt->get_allowed_category() & CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY)
+  if (ctxt->get_allowed_category() & TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY)
     if (filtering::has_class_decl_only_def_change(first, second))
       {
 	string was =
diff --git a/src/abg-leaf-reporter.cc b/src/abg-leaf-reporter.cc
index f9d905ab..37d0fde3 100644
--- a/src/abg-leaf-reporter.cc
+++ b/src/abg-leaf-reporter.cc
@@ -461,7 +461,7 @@  leaf_reporter::report(const class_or_union_diff& d,
   const diff_context_sptr& ctxt = d.context();
 
   // Report class decl-only -> definition change.
-  if (ctxt->get_allowed_category() & CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY)
+  if (ctxt->get_allowed_category() & TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY)
     if (filtering::has_class_decl_only_def_change(first, second))
       {
 	string was =