[PATCH] D72284: [clang-tidy] Factor out renaming logic from readability-identifier-naming

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 6 14:07:14 PST 2020


Eugene.Zelenko added inline comments.


================
Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp:272
+      if (const auto *Typedef =
+              Value->getReturnType().getTypePtr()->getAs<TypedefType>()) {
+        addUsage(NamingCheckFailures, Typedef->getDecl(),
----------------
Please elide braces.


================
Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.cpp:280
+                                             .getTypePtr()
+                                             ->getAs<TypedefType>()) {
+          addUsage(NamingCheckFailures, Typedef->getDecl(),
----------------
Please elide braces.


================
Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.h:47
+    ShouldFix,
+    ConflictsWithKeyword, /// The fixup will conflict with a language keyword,
+                          /// so we can't fix it automatically.
----------------
It'll be reasonable to place all comments consistently: before definition or after.


================
Comment at: clang-tools-extra/clang-tidy/utils/RenamerClangTidyCheck.h:94
+
+  typedef std::pair<SourceLocation, std::string> NamingCheckId;
+
----------------
Please use using. Same below. See modernize-use-using.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72284





More information about the cfe-commits mailing list