aaron.ballman added a comment.
In https://reviews.llvm.org/D30610#934891, @malcolm.parsons wrote:
> I have 1000s of warnings from this check.
>
> A lot of them are about google tests:
> warning: class 'Foo_Bar_Test' defines a copy constructor and a copy
> assignment operator but does not
malcolm.parsons added a comment.
I have 1000s of warnings from this check.
A lot of them are about google tests:
warning: class 'Foo_Bar_Test' defines a copy constructor and a copy assignment
operator but does not define a destructor
[cppcoreguidelines-special-member-functions]
I'd like an
fgross added a comment.
> If you've written your own copy functions then you probably want to write
> your own move functions to allow moving, so `AllowMissingMoveFunctions`
> doesn't make sense.
The scenario I had in mind was legacy code which was written back when it still
was the "rule of
aaron.ballman added a comment.
In https://reviews.llvm.org/D30610#934704, @malcolm.parsons wrote:
> In https://reviews.llvm.org/D30610#934617, @aaron.ballman wrote:
>
> > In https://reviews.llvm.org/D30610#934452, @malcolm.parsons wrote:
> >
> > > I'd like an `AllowDeletedCopyFunctions` option
malcolm.parsons added a comment.
In https://reviews.llvm.org/D30610#934617, @aaron.ballman wrote:
> In https://reviews.llvm.org/D30610#934452, @malcolm.parsons wrote:
>
> > I'd like an `AllowDeletedCopyFunctions` option that allows move and
> > destructor functions to be missing when copying is
aaron.ballman added a comment.
In https://reviews.llvm.org/D30610#934452, @malcolm.parsons wrote:
> I'd like an `AllowDeletedCopyFunctions` option that allows move and
> destructor functions to be missing when copying is disabled.
>
> struct A {
> A(const A&) = delete;
> A&
malcolm.parsons added a comment.
I'd like an `AllowDeletedCopyFunctions` option that allows move and destructor
functions to be missing when copying is disabled.
struct A {
A(const A&) = delete;
A& operator=(const A&) = delete;
}
https://reviews.llvm.org/D30610
aaron.ballman closed this revision.
aaron.ballman added a comment.
I've commit in r297671, thanks!
https://reviews.llvm.org/D30610
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
fgross added a comment.
No commit access, could someone please take care of this? Thanks!
https://reviews.llvm.org/D30610
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
alexfh added inline comments.
Comment at: clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:184
+ if (!MissingMembers.empty())
+diag(ID.first, "class '%0' defines %1 but does not define %2")
+<< ID.second << join(DefinedMembers, " and ")
aaron.ballman accepted this revision.
aaron.ballman added a comment.
This revision is now accepted and ready to land.
LGTM!
https://reviews.llvm.org/D30610
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
fgross updated this revision to Diff 91188.
fgross added a comment.
Diff was missing cppcoreguidelines-special-member-functions-relaxed.cpp...
https://reviews.llvm.org/D30610
Files:
clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp
fgross updated this revision to Diff 91183.
fgross added a comment.
Added examples to options doc.
https://reviews.llvm.org/D30610
Files:
clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp
clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
aaron.ballman added inline comments.
Comment at: clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:116
+
+ if (auto Dtor = Result.Nodes.getNodeAs("dtor")) {
+StoreMember(Dtor->isDefaulted()
`const auto *Dtor`
Comment at:
fgross updated this revision to Diff 90607.
fgross marked an inline comment as done.
fgross added a comment.
reformatted
https://reviews.llvm.org/D30610
Files:
clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp
clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
fgross marked 6 inline comments as done.
fgross added inline comments.
Comment at: clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:110
+ClassWithSpecialMembers[ID];
+if (find(Members, Kind) == Members.end())
+ Members.push_back(Kind);
fgross updated this revision to Diff 90593.
fgross added a comment.
Updated documentation, got rid of code duplication.
https://reviews.llvm.org/D30610
Files:
clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp
clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.h
aaron.ballman requested changes to this revision.
aaron.ballman added a comment.
This revision now requires changes to proceed.
Missing documentation changes for the new options.
Comment at: clang-tidy/cppcoreguidelines/SpecialMemberFunctionsCheck.cpp:110
+
fgross created this revision.
Herald added subscribers: JDevlieghere, nemanjai.
Added two options to cppcoreguidelines-special-member-functions to allow a more
relaxed checking.
With 'AllowSoleDefaultDtor' set to 1, classes with explicitly defaulted
destructors but no other special members are
19 matches
Mail list logo