-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[clang-doc][NFC] Fix missing documentation for EndLineNumber #138051
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@llvm/pr-subscribers-clang-tools-extra Author: Paul Kirth (ilovepi) ChangesFull diff: https://github.com/llvm/llvm-project/pull/138051.diff 1 Files Affected:
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
};
|
@@ -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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
No description provided.