Skip to content

Conversation

@ilovepi
Copy link
Contributor

@ilovepi ilovepi commented Apr 30, 2025

No description provided.

Copy link
Contributor Author

ilovepi commented Apr 30, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@llvmbot
Copy link
Member

llvmbot commented Apr 30, 2025

@llvm/pr-subscribers-clang-tools-extra

Author: Paul Kirth (ilovepi)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/138051.diff

1 Files Affected:

  • (modified) clang-tools-extra/clang-doc/Representation.h (+2-2)
diff --git a/clang-tools-extra/clang-doc/Representation.h b/clang-tools-extra/clang-doc/Representation.h
index b0b34fc6f08dd..d9b47cff8609d 100644
--- a/clang-tools-extra/clang-doc/Representation.h
+++ b/clang-tools-extra/clang-doc/Representation.h
@@ -262,8 +262,8 @@ struct Location {
            std::tie(Other.StartLineNumber, Other.EndLineNumber, Other.Filename);
   }
 
-  int StartLineNumber = 0; // Line number of this Location.
-  int EndLineNumber = 0;
+  int StartLineNumber = 0;      // Line number of this Location.
+  int EndLineNumber = 0;        // End line number of this Location.
   SmallString<32> Filename;     // File for this Location.
   bool IsFileInRootDir = false; // Indicates if file is inside root directory
 };


int StartLineNumber = 0; // Line number of this Location.
int EndLineNumber = 0;
int StartLineNumber = 0; // Line number of this Location.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly comments like this are a bit of a pet peeve. None of these have any information that isn't already in the symbol name. I'd say that these comments should either provide some contextual hints about why this information is necessary, a more detailed description of their semantics, etc., or otherwise, should be removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair, but I'd say that's fairly typical in LLVM as a whole. The missing comment for this field stands out more to me than the presence of the other comments.

@ilovepi
Copy link
Contributor Author

ilovepi commented Aug 29, 2025

Eh, this isn't really needed.

@ilovepi ilovepi closed this Aug 29, 2025
@ilovepi ilovepi deleted the users/ilovepi/clang-doc-comment-endline branch August 29, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants