hokein added inline comments. ================ Comment at: clang-tidy/performance/UnnecessaryCopyInitialization.cpp:87 @@ +86,3 @@ + +namespace { +void recordFixes(const VarDecl &Var, ASTContext &Context, ---------------- I prefer to move the anonymous namespace under `namespace performance {` statement.
================ Comment at: test/clang-tidy/performance-unnecessary-copy-initialization.cpp:232 @@ +231,3 @@ + ExpensiveToCopyType orig; + ExpensiveToCopyType copy_1 = orig; + // CHECK-MESSAGES: [[@LINE-1]]:23: warning: local copy 'copy_1' of the variable 'orig' is never modified; consider avoiding the copy [performance-unnecessary-copy-initialization] ---------------- It would be nice to add a test case with `copy_2` like: ``` ExpensiveToCopyType orig; ExpensiveToCopyType copy_1 = orig; ExpensiveToCopyType copy_2 = copy_1; copy_1.constMethod(); copy_2.constMethod(); orig.constMethod(); ``` http://reviews.llvm.org/D18149 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits