[PATCH] D18149: Add check for unneeded copies of locals

Alexander Kornienko via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 22 07:58:52 PDT 2016


alexfh accepted this revision.
alexfh added a comment.

LG


================
Comment at: clang-tidy/performance/UnnecessaryCopyInitialization.cpp:21
@@ +20,3 @@
+
+void recordFixes(const VarDecl &Var, ASTContext &Context,
+                 DiagnosticBuilder &Diagnostic) {
----------------
nit: Alternatively, you could return llvm::Optional<FixItHint> and apply it in the caller. Might result in a bit better separation of responsibilities.


http://reviews.llvm.org/D18149





More information about the cfe-commits mailing list