[02/11] Improve code comments and whitespace.

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

Commit Message

Giuliano Procida June 10, 2020, 11:59 a.m. UTC
  These are zero impact changes.

	* include/abg-fwd.h: Correct doc-comment reference to
	enum_type_decl.
	* src/abg-comp-filter.cc: Fix doc-comment syntax.
	* src/abg-comparison.cc (operator<<): In the diff_category
	overload, fix code indentation.
	* src/abg-default-reporter.cc (report): In the
	class_or_union_diff overload, adjust comment to reflect that
	the code is reporting changes between declaration-only and
	defined types, in either direction.

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

Comments

Dodji Seketeli June 29, 2020, 8:26 a.m. UTC | #1
Giuliano Procida <gprocida@google.com> a écrit:

> These are zero impact changes.
>
> 	* include/abg-fwd.h: Correct doc-comment reference to
> 	enum_type_decl.
> 	* src/abg-comp-filter.cc: Fix doc-comment syntax.
> 	* src/abg-comparison.cc (operator<<): In the diff_category
> 	overload, fix code indentation.
> 	* src/abg-default-reporter.cc (report): In the
> 	class_or_union_diff overload, adjust comment to reflect that
> 	the code is reporting changes between declaration-only and
> 	defined types, in either direction.
>
> Signed-off-by: Giuliano Procida <gprocida@google.com>

Applied to master.  Thanks!

Cheers,
  

Patch

diff --git a/include/abg-fwd.h b/include/abg-fwd.h
index f6e0c5b2..999b071b 100644
--- a/include/abg-fwd.h
+++ b/include/abg-fwd.h
@@ -152,7 +152,7 @@  typedef weak_ptr<typedef_decl> typedef_decl_wptr;
 
 class enum_type_decl;
 
-/// Convenience typedef for shared pointer on enum_type_decl.
+/// Convenience typedef for shared pointer to a @ref enum_type_decl.
 typedef shared_ptr<enum_type_decl> enum_type_decl_sptr;
 
 class class_or_union;
diff --git a/src/abg-comp-filter.cc b/src/abg-comp-filter.cc
index 67c2a180..36fca73d 100644
--- a/src/abg-comp-filter.cc
+++ b/src/abg-comp-filter.cc
@@ -961,8 +961,8 @@  has_class_decl_only_def_change(const class_or_union_sptr& first,
 /// other one is defined.
 ///
 /// @param diff the diff node to consider.
-////
-//// @return true if the class_or_union_diff carries a change in which
+///
+/// @return true if the class_or_union_diff carries a change in which
 /// the two classes are different by the fact that one is a decl-only
 /// and the other one is defined.
 bool
diff --git a/src/abg-comparison.cc b/src/abg-comparison.cc
index 7305a71a..857ffa8a 100644
--- a/src/abg-comparison.cc
+++ b/src/abg-comparison.cc
@@ -3132,7 +3132,7 @@  operator<<(ostream& o, diff_category c)
       emitted_a_category |= true;
     }
 
-    if (c & FN_RETURN_TYPE_CV_CHANGE_CATEGORY)
+  if (c & FN_RETURN_TYPE_CV_CHANGE_CATEGORY)
     {
       if (emitted_a_category)
 	o << "|";
@@ -3140,7 +3140,7 @@  operator<<(ostream& o, diff_category c)
       emitted_a_category |= true;
     }
 
-   if (c & VAR_TYPE_CV_CHANGE_CATEGORY)
+  if (c & VAR_TYPE_CV_CHANGE_CATEGORY)
     {
       if (emitted_a_category)
 	o << "|";
@@ -3148,7 +3148,7 @@  operator<<(ostream& o, diff_category c)
       emitted_a_category |= true;
     }
 
-    if (c & VOID_PTR_TO_PTR_CHANGE_CATEGORY)
+  if (c & VOID_PTR_TO_PTR_CHANGE_CATEGORY)
     {
       if (emitted_a_category)
 	o << "|";
@@ -3156,7 +3156,7 @@  operator<<(ostream& o, diff_category c)
       emitted_a_category |= true;
     }
 
-    if (c & BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY)
+  if (c & BENIGN_INFINITE_ARRAY_CHANGE_CATEGORY)
     {
       if (emitted_a_category)
 	o << "|";
diff --git a/src/abg-default-reporter.cc b/src/abg-default-reporter.cc
index 80cb6638..7c98d8d7 100644
--- a/src/abg-default-reporter.cc
+++ b/src/abg-default-reporter.cc
@@ -844,7 +844,7 @@  default_reporter::report(const class_or_union_diff& d,
 
   const diff_context_sptr& ctxt = d.context();
 
-  // Report class decl-only -> definition change.
+  // Report class decl-only <-> definition change.
   if (ctxt->get_allowed_category() & CLASS_DECL_ONLY_DEF_CHANGE_CATEGORY)
     if (filtering::has_class_decl_only_def_change(first, second))
       {