alexfh added a comment.

Thank you for working on this!

A few minor comments.


================
Comment at: clang-tidy/performance/UnnecessaryCopyInitialization.cpp:21
@@ +20,3 @@
+namespace {
+AST_MATCHER(VarDecl, isLocalVarDecl) { return Node.isLocalVarDecl(); }
+AST_MATCHER(QualType, isPointerType) { return Node->isPointerType(); }
----------------
Maybe move this to clang-tidy/utils/Matchers.h?

================
Comment at: clang-tidy/performance/UnnecessaryCopyInitialization.cpp:24
@@ +23,3 @@
+
+Token getPreviousNonCommentToken(const ASTContext &Context,
+                                 SourceLocation Location) {
----------------
This might be useful elsewhere. Let's move it to clang-tidy/utils/LexerUtils.h 
/ .cpp.

================
Comment at: clang-tidy/performance/UnnecessaryCopyInitialization.h:16
@@ +15,3 @@
+namespace clang {
+namespace tidy {
+
----------------
This should also be in the `performance` namespace. The `add_new_check.py` 
script has been fixed in the meantime.


http://reviews.llvm.org/D15623



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to