[PATCH] D51949: [WIP][clang-tidy] initial ideas to isolate variable declarations

Eugene Zelenko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 11 15:53:01 PDT 2018


Eugene.Zelenko added inline comments.


================
Comment at: clang-tidy/readability/IsolateDeclCheck.cpp:29
+
+namespace {
+std::string GetIsolatedDecl(const VarDecl *D, const SourceManager &SM,
----------------
Please use static instead.


================
Comment at: clang-tidy/readability/IsolateDeclCheck.cpp:37
+      VarType.getAsString(TypePrinter) + " " + D->getNameAsString();
+  std::string Initializer = "";
+
----------------
See readability-redundant-string-init.


================
Comment at: clang-tidy/readability/IsolateDeclCheck.cpp:60
+  const auto *WholeDecl = Result.Nodes.getNodeAs<DeclStmt>("decl_stmt");
+  std::string Replacement = "";
+
----------------
See readability-redundant-string-init.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D51949





More information about the cfe-commits mailing list