]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[libcpp] fix some line map comments
authorNathan Sidwell <nathan@acm.org>
Thu, 30 Aug 2018 15:16:21 +0000 (15:16 +0000)
committerNathan Sidwell <nathan@gcc.gnu.org>
Thu, 30 Aug 2018 15:16:21 +0000 (15:16 +0000)
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01978.html
* include/line-map.h (enum lc_reason): Comment each member
separately.
(struct line_maps): Fix reallocator comment.

From-SVN: r263987

libcpp/ChangeLog
libcpp/include/line-map.h

index 471d6b72387ee23bafb087b87316c88c5177e358..59052be1ba6a1132ebafbe2f69f5378f46e3e5d5 100644 (file)
@@ -1,3 +1,9 @@
+2018-08-30  Nathan Sidwell  <nathan@acm.org>
+
+       * include/line-map.h (enum lc_reason): Comment each member
+       separately.
+       (struct line_maps): Fix reallocator comment.
+
 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
 
        PR 87091
index e74ccbb5703e869806638f29c16c0067c2b68108..fd067589b63e8d56de85d27795f279869b31485d 100644 (file)
@@ -61,20 +61,14 @@ inline int compare (linenum_type lhs, linenum_type rhs)
   return 0;
 }
 
-/* Reason for creating a new line map with linemap_add.  LC_ENTER is
-   when including a new file, e.g. a #include directive in C.
-   LC_LEAVE is when reaching a file's end.  LC_RENAME is when a file
-   name or line number changes for neither of the above reasons
-   (e.g. a #line directive in C); LC_RENAME_VERBATIM is like LC_RENAME
-   but a filename of "" is not specially interpreted as standard
-   input. LC_ENTER_MACRO is when a macro expansion is about to start.  */
+/* Reason for creating a new line map with linemap_add.  */
 enum lc_reason
 {
-  LC_ENTER = 0,
-  LC_LEAVE,
-  LC_RENAME,
-  LC_RENAME_VERBATIM,
-  LC_ENTER_MACRO,
+  LC_ENTER = 0,                /* Begin #include.  */
+  LC_LEAVE,            /* Return to including file.  */
+  LC_RENAME,           /* Other reason for name change.  */
+  LC_RENAME_VERBATIM,  /* Likewise, but "" != stdin.  */
+  LC_ENTER_MACRO,      /* Begin macro expansion.  */
   /* FIXME: add support for stringize and paste.  */
   LC_HWM /* High Water Mark.  */
 };
@@ -777,8 +771,7 @@ struct GTY(()) line_maps {
      may require allocating a new line_map.  */
   unsigned int max_column_hint;
 
-  /* If non-null, the allocator to use when resizing 'maps'.  If null,
-     xrealloc is used.  */
+  /* The allocator to use when resizing 'maps', defaults to xrealloc.  */
   line_map_realloc reallocator;
 
   /* The allocators' function used to know the actual size it