[PATCH] D84814: [clang-tidy] readability-identifier-naming checks configs for included files

Dmitri Gribenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 28 21:51:41 PDT 2020


gribozavr2 added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.cpp:124
+static void
+populateNaimgStyle(std::vector<IdentifierNamingCheck::OptionalStyle> &Styles,
+                   const ClangTidyCheck::OptionsView &Options) {
----------------
I think it would be better to return the vector by value.


================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h:62
 
+  using OptionalStyle = llvm::Optional<NamingStyle>;
+
----------------
I'd suggest to inline the definition of this typedef, because it makes code more obscure for the benefit of shortening the name by a couple of characters.


================
Comment at: clang-tools-extra/clang-tidy/readability/IdentifierNamingCheck.h:76
+
+  mutable llvm::StringMap<std::vector<OptionalStyle>> NamingStylesCache;
+
----------------
It would be nice to add the comment that explains what the keys for the map and the vector are.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84814/new/

https://reviews.llvm.org/D84814



More information about the cfe-commits mailing list