[PATCH] D40543: Pass by reference NewQualifiedName in QualifiedRenameRule

Haojian Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 28 00:35:33 PST 2017


hokein added inline comments.


================
Comment at: include/clang/Tooling/Refactoring/Rename/RenamingAction.h:79
   QualifiedRenameRule(const NamedDecl *ND,
-                      std::string NewQualifiedName)
+                      const std::string &NewQualifiedName)
       : ND(ND), NewQualifiedName(std::move(NewQualifiedName)) {}
----------------
Passing `std::string` object is fine here -- because we use std::move below to avoid the extra copy.

Is the warning caught by the clang-tidy check?


https://reviews.llvm.org/D40543





More information about the cfe-commits mailing list