[PATCH] D61445: [FileCheck] Fix code style of method comments
Paul Robinson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 8 09:51:11 PDT 2019
probinson added a comment.
Sorry, I should have been more thorough about this previously: My understanding is that if a function description mentions any parameters with \p, then it needs to mention all of them.
For some of the one-liner descriptions, if you prefer to just remove the \p that's okay with me. You've been suffering a lot through this process and I don't want to create more work than we really need to!
================
Comment at: llvm/include/llvm/Support/FileCheck.h:271
const SourceMgr &SM) const;
+ /// Parses the pattern in \p PatternStr and initialize this FileCheckPattern
+ /// instance accordingly.
----------------
"initializes"
================
Comment at: llvm/include/llvm/Support/FileCheck.h:286
+ /// If there is a match, \returns the size of the matched string in \p
+ /// MatchLen.
+ ///
----------------
"\returns" describes the function return value, not the effect on other parameters. So:
\returns the position that ...
If there is a match, updates \p MatchLen with the size of the matched string.
================
Comment at: llvm/include/llvm/Support/FileCheck.h:318
+ /// opening sequence). Returns the offset of the closing sequence within Str,
+ /// or npos if it was not found.
size_t FindRegexVarEnd(StringRef Str, SourceMgr &SM);
----------------
Returns -> \returns
Description is missing parameter SM.
================
Comment at: llvm/include/llvm/Support/FileCheck.h:402
+ /// Verifies that there is a single line in the given \p Buffer.
bool CheckNext(const SourceMgr &SM, StringRef Buffer) const;
----------------
If you cite any parameters with \p you need to cite all of them.
================
Comment at: llvm/include/llvm/Support/FileCheck.h:404
bool CheckNext(const SourceMgr &SM, StringRef Buffer) const;
+ /// Verifies that there is no newline in the given \p Buffer.
bool CheckSame(const SourceMgr &SM, StringRef Buffer) const;
----------------
If you cite any parameters with \p you need to cite all of them.
================
Comment at: llvm/include/llvm/Support/FileCheck.h:406
bool CheckSame(const SourceMgr &SM, StringRef Buffer) const;
+ /// Verifies that there are no "not strings" in the given \p Buffer.
bool CheckNot(const SourceMgr &SM, StringRef Buffer,
----------------
If you cite any parameters with \p you need to cite all of them.
================
Comment at: llvm/include/llvm/Support/FileCheck.h:438
+ /// Only expected strings whose prefix is one of those listed in \p PrefixRE
+ /// are recorded. \returns true in case of an error, false otherwise.
bool ReadCheckFile(SourceMgr &SM, StringRef Buffer, Regex &PrefixRE,
----------------
Need to mention \p SM
================
Comment at: llvm/include/llvm/Support/FileCheck.h:451
+ /// \p CheckStrings read from the check file and record diagnostics emitted
+ /// in \p Diags.
///
----------------
Needs to cite \p SM
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D61445/new/
https://reviews.llvm.org/D61445
More information about the llvm-commits
mailing list