From dd1c60812093ad17f81e79ed26620d8c52d140fe Mon Sep 17 00:00:00 2001 From: Giuliano Procida Date: Mon, 29 Jun 2020 17:24:34 +0200 Subject: [PATCH] Rename declaration-definition change category. This patch renames CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY to TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY. * include/abg-comparison.h (TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY): Rename CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY into this. (EVERYTHING_CATEGORY): In the value of this enumerator, rename CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY into TYPE_DECL_ONLY_DEF_CHANGE_CATEGORY. * src/abg-comp-filter.cc (categorize_harmless_diff_node): Likewise. * src/abg-comparison.cc (get_default_harmless_categories_bitmap): Likewise. (operator<<(ostream& o, diff_category c)): Likewise. * src/abg-default-reporter.cc (default_reporter::report): Likewise in the overload for class_or_union_diff. * src/abg-leaf-reporter.cc (leaf_reporter::report): Likewise in the overload for class_or_union_diff. Signed-off-by: Giuliano Procida Signed-off-by: Dodji Seketeli --- 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(-) diff --git a/include/abg-comparison.h b/include/abg-comparison.h index 51a78d29..d107bf9f 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 372da8e9..702d223f 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 50bc9611..d0f1d21b 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_CATEGORY | 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 0c20ee41..783ffbc0 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 = -- 2.43.5