Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-25 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/misc/UserDefinedCopyWithoutAssignmentCheck.cpp:22 @@ +21,3 @@ +void UserDefinedCopyWithoutAssignmentCheck::registerMatchers( +MatchFinder *Finder) { + Finder->addMatcher( Before registering the match

Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-22 Thread Jonathan B Coe via cfe-commits
jbcoe added inline comments. Comment at: clang-tidy/misc/UserDefinedCopyWithoutAssignmentCheck.cpp:52 @@ +51,3 @@ + hasDescendant( + cxxMethodDecl(isMoveAssignmentOperator(), unless(isImplicit())) + .bind("move-assignment")),

Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-22 Thread Jonathan B Coe via cfe-commits
jbcoe updated this revision to Diff 45729. jbcoe added a comment. Added handling for move-constructor/move-assignment pairs. http://reviews.llvm.org/D16376 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/UserDefinedCopyWithoutAssignmentCheck.cpp

Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-22 Thread Jonathan B Coe via cfe-commits
jbcoe planned changes to this revision. jbcoe added a comment. i need the matcher from http://reviews.llvm.org/D16470 to add a corresponding pair of checks and fixes for move-constructors and move-assignment. http://reviews.llvm.org/D16376 ___ cfe-

Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-22 Thread Jonathan B Coe via cfe-commits
jbcoe added inline comments. Comment at: clang-tidy/misc/UserDefinedCopyWithoutAssignmentCheck.h:25 @@ +24,3 @@ +/// assignment operator to be `= delete`. +/// +/// For the user-facing documentation see: jbcoe wrote: > The standard says that compiler generation of

Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-21 Thread Jonathan B Coe via cfe-commits
jbcoe updated this revision to Diff 45573. jbcoe added a comment. Added symmetric check for user-defined assignment but no copy constructor. Check now adds '=default' to the missing special function if the user-specified one was specified as '=default'. Check needs renaming, I'll update it alon

Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-21 Thread Jonathan B Coe via cfe-commits
jbcoe marked 2 inline comments as done. jbcoe added a comment. http://reviews.llvm.org/D16376 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-21 Thread Jonathan B Coe via cfe-commits
jbcoe marked 5 inline comments as done. Comment at: clang-tidy/misc/UserDefinedCopyWithoutAssignmentCheck.h:25 @@ +24,3 @@ +/// assignment operator to be `= delete`. +/// +/// For the user-facing documentation see: The standard says that compiler generation of the

Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-21 Thread Jonathan B Coe via cfe-commits
jbcoe removed rL LLVM as the repository for this revision. jbcoe updated this revision to Diff 45554. jbcoe added a comment. Made requested changes. http://reviews.llvm.org/D16376 Files: clang-tidy/misc/CMakeLists.txt clang-tidy/misc/MiscTidyModule.cpp clang-tidy/misc/UserDefinedCopyWitho

Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-21 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: docs/clang-tidy/checks/misc-user-defined-copy-without-assignment.rst:6 @@ +5,3 @@ + +MSVC 2015 will generate an assignment operator even if the user defines a copy constructor. +This check finds classes with a user-defined (including del

Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-21 Thread Aaron Ballman via cfe-commits
aaron.ballman added subscribers: dblaikie, rsmith. Comment at: clang-tidy/misc/UserDefinedCopyWithoutAssignmentCheck.cpp:51 @@ +50,3 @@ + + Diag << FixItHint::CreateInsertion(CCtorEnd, Insertion.str()); +} alexfh wrote: > aaron.ballman wrote: > > We probably do n

Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-21 Thread Alexander Kornienko via cfe-commits
alexfh added inline comments. Comment at: clang-tidy/misc/UserDefinedCopyWithoutAssignmentCheck.cpp:32 @@ +31,3 @@ + + if (MatchedDecl->isImplicit()) +return; This check should be done in the matcher. Comment at: clang-tidy/misc/UserDefinedC

Re: [PATCH] D16376: clang-tidy check: User-defined copy without assignment

2016-01-21 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: clang-tidy/misc/UserDefinedCopyWithoutAssignmentCheck.cpp:37 @@ +36,3 @@ + + DiagnosticBuilder Diag = diag(MatchedDecl->getLocation(), "class '%0' defines a copy-constructor but not an assignment operator") + << ClassName; --