Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-09-14 Thread Martin Böhme via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL281453: [clang-tidy] Add check 'misc-use-after-move' (authored by mboehme). Changed prior to commit: https://reviews.llvm.org/D23353?vs=71312&id=71313#toc Repository: rL LLVM https://reviews.llvm.or

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

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

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-09-14 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 71312. mboehme marked 6 inline comments as done. mboehme added a comment. Herald added subscribers: mgorny, beanz. Responses to reviewer comments. https://reviews.llvm.org/D23353 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-09-07 Thread Alexander Kornienko via cfe-commits
alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. LG Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:30 @@ +29,3 @@ +/// a `CFGBlock`. +/// +/// While a `CFGBlock` does contain individual `CFGElement`s for some

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-09-01 Thread Piotr Padlewski via cfe-commits
Prazek added inline comments. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:191 @@ +190,3 @@ + +if (const Stmt *S = Node.get()) { + Result.push_back(S); Dry: const auto * https://reviews.llvm.org/D23353 __

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-25 Thread Martin Böhme via cfe-commits
mboehme marked 9 inline comments as done. mboehme added a comment. > > > 2. Also it would be good to make link in cppcoreguidelines. > > > > > > > > > How exactly would I create such a "link"? Are you just thinking of a link > > in the documentation, or is there a way to have one clang

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-25 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 69206. mboehme added a comment. Responses to reviewer comments. https://reviews.llvm.org/D23353 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/UseAfterMoveCheck.cpp clang-tidy/misc/UseAfterMoveCheck.h docs

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-17 Thread Alexander Kornienko via cfe-commits
alexfh requested changes to this revision. This revision now requires changes to proceed. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:29 @@ +28,3 @@ +/// Provides information about the evaluation order of (sub-)expressions within +/// a CFGBlock. +/// Please

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-17 Thread Piotr Padlewski via cfe-commits
Prazek added a comment. In https://reviews.llvm.org/D23353#516314, @mboehme wrote: > In https://reviews.llvm.org/D23353#511362, @Prazek wrote: > > > I will review it later, but my first thoughts: > > > > 1. I think we should make some other group, because misc seems to be > > overloaded. I discu

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-17 Thread Martin Böhme via cfe-commits
mboehme marked 2 inline comments as done. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:659 @@ +658,3 @@ + UseAfterMove Use; + if (finder.find(FunctionBody, MovingCall, MovedVariable, &Use)) { +emitDiagnostic(MovingCall, MovedVariable, Use, this, Result.Context); ---

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-17 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 68366. mboehme added a comment. Remove braces around another single-line if statement block https://reviews.llvm.org/D23353 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/UseAfterMoveCheck.cpp clang-tidy/mis

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-17 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 68365. mboehme added a comment. Remove braces around single-line bodies of if statements https://reviews.llvm.org/D23353 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/UseAfterMoveCheck.cpp clang-tidy/misc/U

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-17 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:659 @@ +658,3 @@ + UseAfterMove Use; + if (finder.find(FunctionBody, MovingCall, MovedVariable, &Use)) { +emitDiagnostic(MovingCall, MovedVariable, Use, this, Result.Context); om

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-16 Thread Kirill Bobyrev via cfe-commits
omtcyfz added a subscriber: omtcyfz. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:659 @@ +658,3 @@ + UseAfterMove Use; + if (finder.find(FunctionBody, MovingCall, MovedVariable, &Use)) { +emitDiagnostic(MovingCall, MovedVariable, Use, this, Result.Context);

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-16 Thread Martin Böhme via cfe-commits
mboehme marked 4 inline comments as done. mboehme added a comment. In https://reviews.llvm.org/D23353#511362, @Prazek wrote: > I will review it later, but my first thoughts: > > 1. I think we should make some other group, because misc seems to be > overloaded. I discussed it with Alex months ago

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-16 Thread Martin Böhme via cfe-commits
mboehme marked 9 inline comments as done. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:493 @@ +492,3 @@ +if (!S) + continue; + For some reason, I thought I had read that they weren't compatible with CFG / CFGBlock -- but obviously I must have been i

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-16 Thread Martin Böhme via cfe-commits
mboehme updated this revision to Diff 68147. mboehme added a comment. Responses to reviewer comments. https://reviews.llvm.org/D23353 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/UseAfterMoveCheck.cpp clang-tidy/misc/UseAfterMoveCheck.h docs

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-12 Thread Alexander Kornienko via cfe-commits
alexfh added a comment. A few initial comments. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:492 @@ +491,3 @@ + DeclRefs->clear(); + for (CFGBlock::const_iterator I = Block->begin(), E = Block->end(); I != E; + ++I) { Any reason to avoid range-based

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-10 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added inline comments. Comment at: clang-tidy/misc/UseAfterMoveCheck.cpp:512 @@ +511,3 @@ +} +void UseAfterMoveFinder::getReinits( +const CFGBlock *Block, const ValueDecl *MovedVariable, Please insert empty line before. Repository: rL LLVM

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-10 Thread Eugene Zelenko via cfe-commits
Eugene.Zelenko added a subscriber: Eugene.Zelenko. Comment at: docs/ReleaseNotes.rst:75 @@ +74,3 @@ + + This check warns if an object is used after it has been moved, without an + intervening reinitialization. Please remove //This check// and capitalize //warns/

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-10 Thread Piotr Padlewski via cfe-commits
Prazek added a subscriber: Prazek. Prazek added a reviewer: Prazek. Prazek added a comment. I will review it later, but my first thoughts: 1. I think we should make some other group, because misc seems to be overloaded. I discussed it with Alex months ago - something like bugprone would be good

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-10 Thread Matt Kulukundis via cfe-commits
fowles added a subscriber: fowles. Comment at: test/clang-tidy/misc-use-after-move.cpp:158 @@ +157,3 @@ +std::move(ptr); +ptr.get(); + } would this warn on: std::unique_ptr ptr; std::move(ptr); ptr->Foo(); I would like it to since that is a likely segfa

Re: [PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-10 Thread Martin Böhme via cfe-commits
mboehme added a comment. Apologies for the size of this patch. alexfh@ said he was willing to review it as-is -- however, I'm happy to resubmit in smaller pieces if necessary. https://reviews.llvm.org/D23353 ___ cfe-commits mailing list cfe-commits

[PATCH] D23353: [clang-tidy] Add check 'misc-use-after-move'

2016-08-10 Thread Martin Böhme via cfe-commits
mboehme created this revision. mboehme added a reviewer: alexfh. mboehme added a subscriber: cfe-commits. The check warns if an object is used after it has been moved, without an intervening reinitialization. See user-facing documentation for details. https://reviews.llvm.org/D23353 Files: cl