Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-30 Thread Martin Böhme via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL280077: [clang-tidy] Add check 'misc-move-forwarding-reference' (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D0?vs=69665&id=69666#toc Repository: rL LLVM https://revi

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-30 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 69665. mboehme added a comment. Update to current head https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingReferenceCheck.cpp clang-tidy/misc/MoveForwardingReferenceC

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-30 Thread Martin Böhme via cfe-commits
mboehme marked an inline comment as done. mboehme added a comment. https://reviews.llvm.org/D0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-30 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 69662. mboehme added a comment. Fix typo https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingReferenceCheck.cpp clang-tidy/misc/MoveForwardingReferenceCheck.h docs/

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-29 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. One minor typo fix, but otherwise LGTM. Thank you for the check! Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:125-126 @@ +124,4 @@ +

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-26 Thread Martin Böhme via cfe-commits
mboehme marked an inline comment as done. mboehme added a comment. Any more comments here? https://reviews.llvm.org/D0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-17 Thread Martin Böhme via cfe-commits
mboehme marked 2 inline comments as done. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:46-56 @@ +45,13 @@ +// std::move(). This will hopefully prevent erroneous replacements if the +// code does unusual things (e.g. create an alias for std::move() in +/

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-17 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 68322. mboehme added a comment. Reponses to reviewer comments https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingReferenceCheck.cpp clang-tidy/misc/MoveForwardingRef

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-16 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:46-56 @@ +45,13 @@ +// std::move(). This will hopefully prevent erroneous replacements if the +// code does unusual things (e.g. create an alias for std::move() in +// ano

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-12 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 67829. mboehme marked 2 inline comments as done. mboehme added a comment. Fix typo in comment https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingReferenceCheck.cpp c

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-12 Thread Martin Böhme via cfe-commits
mboehme added inline comments. Comment at: test/clang-tidy/misc-move-forwarding-reference.cpp:50 @@ +49,3 @@ +// operator. +template void f5(U &&SomeU) { + { Sorry, that should have been "scope resolution operator". Comment changed. What this is trying to test

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-12 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 67830. mboehme added a comment. Restore spaces around scope resolution operator in test case https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingReferenceCheck.cpp cl

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-12 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 67828. mboehme added a comment. Handle case where the forwarding reference is a parameter of a generic lambda. https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingRefer

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:64 @@ +63,3 @@ +void MoveForwardingReferenceCheck::registerMatchers(MatchFinder *Finder) { + if (!getLangOpts().CPlusPlus11) +return; sbenza wrote: > I'm guessin

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-10 Thread Samuel Benzaquen via cfe-commits
sbenza added inline comments. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:64 @@ +63,3 @@ +void MoveForwardingReferenceCheck::registerMatchers(MatchFinder *Finder) { + if (!getLangOpts().CPlusPlus11) +return; I'm guessing this is checking Lang

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-10 Thread Martin Böhme via cfe-commits
mboehme added a comment. Now that https://reviews.llvm.org/D23004 is submitted, can you take another look? https://reviews.llvm.org/D0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-05 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 66914. mboehme marked 2 inline comments as done. mboehme added a comment. Renamed canReferToDecl to hasAnyDeclaration. This is for consistency with the corresponding change in https://reviews.llvm.org/D23004. https://reviews.llvm.org/D0 Files:

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-01 Thread Martin Böhme via cfe-commits
mboehme marked 7 inline comments as done. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:93 @@ +92,3 @@ + hasArgument(0, ignoringParenImpCasts(declRefExpr( + to(ForwardingReferenceParmMatcher) + .bind("call-

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-08-01 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 66284. mboehme marked 3 inline comments as done. https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingReferenceCheck.cpp clang-tidy/misc/MoveForwardingReferenceCheck.h

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-28 Thread Samuel Benzaquen via cfe-commits
sbenza added inline comments. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:93 @@ +92,3 @@ + hasArgument(0, ignoringParenImpCasts(declRefExpr( + to(ForwardingReferenceParmMatcher) + .bind("call-move"),

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-28 Thread Aaron Ballman via cfe-commits
aaron.ballman added a subscriber: klimek. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:44-54 @@ +43,13 @@ +if (OriginalText == "::std::move") { + Diag << FixItHint::CreateReplacement(CallRange, "::std::" + ForwardName); + // If the original text was s

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-26 Thread Martin Böhme via cfe-commits
mboehme marked 13 inline comments as done. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:20 @@ +19,3 @@ + +static void ReplaceMoveWithForward(const UnresolvedLookupExpr *Callee, + const TemplateTypeParmType *TypeParmType, --

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-26 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 65484. mboehme marked an inline comment as done. mboehme added a comment. Changes in response to reviewer comments https://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingR

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-25 Thread Samuel Benzaquen via cfe-commits
sbenza added inline comments. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:20 @@ +19,3 @@ + +static void ReplaceMoveWithForward(const UnresolvedLookupExpr *Callee, + const TemplateTypeParmType *TypeParmType, aaron.

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-25 Thread Etienne Bergeron via cfe-commits
etienneb added a subscriber: etienneb. etienneb added a comment. thx for the check Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:25 @@ +24,3 @@ + const SourceManager &SM = Context->getSourceManager(); + const LangOptions LangOpts = Context->getLangOpts(); +

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-25 Thread Alexander Kornienko via cfe-commits
alexfh added a subscriber: alexfh. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:36 @@ +35,3 @@ +(llvm::Twine("forward<") + TypeParmType->getDecl()->getName() + + llvm::Twine(">")) +.str(); nit: The second `llvm::Twine` i

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-21 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/MoveForwardingReferenceCheck.cpp:20 @@ +19,3 @@ + +static void ReplaceMoveWithForward(const UnresolvedLookupExpr *Callee, +

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-16 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: docs/clang-tidy/checks/misc-move-forwarding-reference.rst:30 @@ +29,3 @@ +Background +-- + Nothing from me. It's just general comment https://reviews.llvm.org/D0 ___

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-12 Thread Martin Böhme via cfe-commits
mboehme marked 5 inline comments as done. mboehme added a comment. In http://reviews.llvm.org/D0#480415, @mgehre wrote: > Nice check. This should be mentioned in docs/ReleaseNotes.rst Done. Comment at: clang-tidy/misc/MoveForwardingReferenceCheck.cpp:34 @@ +33,3 @@ + if

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-12 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 63663. mboehme added a comment. Addressed Prazek's review comments. http://reviews.llvm.org/D0 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/MoveForwardingReferenceCheck.cpp clang-tidy/misc/MoveForwardi

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-11 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Prazek added a comment. Very usefull check! I don't have enough time right now to check everything, so better wait for review of Alexfh or someone else. I just wanted to leave some thoughts. Comment at: clang-tidy/misc/MoveForwardingReferenceC

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-11 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Eugene.Zelenko added a comment. Please mention this check in docs/ReleaseNotes.rst (in alphabetical order). http://reviews.llvm.org/D0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org htt

Re: [PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-11 Thread Matthias Gehre via cfe-commits
mgehre added a subscriber: mgehre. mgehre added a comment. Nice check. This should be mentioned in docs/ReleaseNotes.rst http://reviews.llvm.org/D0 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/lis

[PATCH] D22220: [clang-tidy] Add check 'misc-move-forwarding-reference'

2016-07-11 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: sbenza. mboehme added a subscriber: cfe-commits. The check emits a warning if std::move() is applied to a forwarding reference, i.e. an rvalue reference of a function template argument type. If a developer is unaware of the special rules f