[PATCH] D11946: Create clang-tidy module modernize. Add pass-by-value check.

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 13 08:06:10 PDT 2015


alexfh accepted this revision.
alexfh added a comment.
This revision is now accepted and ready to land.

Thanks for the updates.

Looks good with a couple of nits.


================
Comment at: clang-tidy/modernize/PassByValueCheck.cpp:83
@@ +82,3 @@
+       public:
+        ExactlyOneUsageVisitor(const ParmVarDecl *ParamDecl) : ParamDecl(ParamDecl) {}
+
----------------
80 columns limit is exceeded here and below. The whole class is over-indented. Please run clang-tidy on the file.

================
Comment at: clang-tidy/modernize/PassByValueCheck.cpp:131
@@ +130,3 @@
+  : ClangTidyCheck(Name, Context) {
+    std::string IncludeStyleStr = Options.get("IncludeStyle", "llvm");
+    if (IncludeStyleStr == "llvm") {
----------------
Please use `llvm::StringSwitch`.


http://reviews.llvm.org/D11946





More information about the cfe-commits mailing list