Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-16 Thread Alexander Kornienko via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL272896: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being… (authored by alexfh). Changed prior to commit: http://reviews.llvm.org/D21223?vs=60686=60974#toc Repository: rL

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-16 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. BTW, I'll commit the patch for you. http://reviews.llvm.org/D21223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-16 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. LG. Thanks! http://reviews.llvm.org/D21223 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-16 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM, but you should wait for @alexfh to sign off as well since he had some comments. http://reviews.llvm.org/D21223 ___

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-14 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 60686. http://reviews.llvm.org/D21223 Files: clang-tidy/misc/MoveConstantArgumentCheck.cpp docs/clang-tidy/checks/misc-move-const-arg.rst test/clang-tidy/misc-move-const-arg.cpp Index: test/clang-tidy/misc-move-const-arg.cpp

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-14 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/misc-move-const-arg.cpp:75-76 @@ +74,4 @@ + +class NonMoveable { + public: + NonMoveable(); > Can you expand on this? > > The standard says: "If the definition of a class X does not explicitly >

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-14 Thread Martin Böhme via cfe-commits
mboehme added inline comments. Comment at: test/clang-tidy/misc-move-const-arg.cpp:75-76 @@ +74,4 @@ + +struct NonMoveable { + public: + NonMoveable(); aaron.ballman wrote: > This type isn't non-moveable. For that, you need to explicitly delete the > move

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-14 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 60671. http://reviews.llvm.org/D21223 Files: clang-tidy/misc/MoveConstantArgumentCheck.cpp docs/clang-tidy/checks/misc-move-const-arg.rst test/clang-tidy/misc-move-const-arg.cpp Index: test/clang-tidy/misc-move-const-arg.cpp

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-13 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: test/clang-tidy/misc-move-const-arg.cpp:75-76 @@ +74,4 @@ + +struct NonMoveable { + public: + NonMoveable(); This type isn't non-moveable. For that, you need to explicitly delete the move constructor. Perhaps a

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-13 Thread Martin Böhme via cfe-commits
mboehme added inline comments. Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:37 @@ +36,3 @@ + if (BeforeArgumentsRange.isValid() && AfterArgumentsRange.isValid()) { +(*Diag) << FixItHint::CreateRemoval(BeforeArgumentsRange) +<<

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-13 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 60507. http://reviews.llvm.org/D21223 Files: clang-tidy/misc/MoveConstantArgumentCheck.cpp docs/clang-tidy/checks/misc-move-const-arg.rst test/clang-tidy/misc-move-const-arg.cpp Index: test/clang-tidy/misc-move-const-arg.cpp

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-13 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 60506. http://reviews.llvm.org/D21223 Files: clang-tidy/misc/MoveConstantArgumentCheck.cpp docs/clang-tidy/checks/misc-move-const-arg.rst test/clang-tidy/misc-move-const-arg.cpp Index: test/clang-tidy/misc-move-const-arg.cpp

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-13 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. Thank you for working on this! A few more comments in addition to what Aaron has written. Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:22 @@ +21,3 @@ + +void ReplaceCallWithArg(const CallExpr *TheCallExpr, DiagnosticBuilder *Diag, +

Re: [PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: aaron.ballman. aaron.ballman added a reviewer: aaron.ballman. Comment at: clang-tidy/misc/MoveConstantArgumentCheck.cpp:20 @@ -19,1 +19,3 @@ +namespace { + Instead of an unnamed namespace, you should use static functions per

[PATCH] D21223: [clang-tidy] misc-move-const-arg: Detect if result of std::move() is being passed as a const ref argument

2016-06-10 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added reviewers: alexfh, hokein. mboehme added a subscriber: cfe-commits. Conceptually, this is very close to the existing functionality of misc-move-const-arg, which is why I'm adding it here and not creating a new check. For example, for a type A that is