[PATCH] D141144: [clang-tidy][doc] Improve clang-tidy documentation
Piotr Zegar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 28 10:59:11 PST 2023
ClockMan added inline comments.
================
Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:34
+static StringRef TrimFirstChar(StringRef x) { return x.substr(1); }
+
----------------
Looks like usecase of this is more like rtrim, then probably rtrim should be used instead of substr.
And probably better would be to replace entire cl::desc. instead of adding new additional wrap.
more like:
static auto desc(llvm::StringRef description) { return cl::desc(description.rtrim()); }
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141144/new/
https://reviews.llvm.org/D141144
More information about the cfe-commits
mailing list