[PATCH] D141144: [clang-tidy][doc] Improve clang-tidy documentation

Carlos Galvez via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sun Jan 29 11:16:23 PST 2023


carlosgalvezp marked an inline comment as done.
carlosgalvezp added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/tool/ClangTidyMain.cpp:34
 
+static StringRef TrimFirstChar(StringRef x) { return x.substr(1); }
+
----------------
ClockMan wrote:
> 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()); }
Really good idea, much better! Done.


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