jbcoe added a comment.
The method I'm using to insert after a function declaration is flawed.
Advancing by one character is not always the right thing to do and won't handle
cases where there is a space before a semi-colon. I'll add extra tests and see
if I can come up with a neater way of hand
jbcoe planned changes to this revision.
jbcoe added a comment.
If the destructor is user-declared then I need to `=delete` the
compiler-generated copy constructor and copy assignment operator (if they are
not defined, if either is defined then they are already handled by this check).
The move
On Wed, Feb 3, 2016 at 1:40 PM, Aaron Ballman
wrote:
> On Wed, Feb 3, 2016 at 4:13 PM, David Blaikie wrote:
> >
> >
> > On Wed, Feb 3, 2016 at 1:03 PM, Jonathan Coe wrote:
> >>
> >>
> >>
> >> On 3 February 2016 at 18:44, David Blaikie wrote:
> >>>
> >>>
> >>>
> >>> On Wed, Feb 3, 2016 at 10:23
On Wed, Feb 3, 2016 at 4:13 PM, David Blaikie wrote:
>
>
> On Wed, Feb 3, 2016 at 1:03 PM, Jonathan Coe wrote:
>>
>>
>>
>> On 3 February 2016 at 18:44, David Blaikie wrote:
>>>
>>>
>>>
>>> On Wed, Feb 3, 2016 at 10:23 AM, Jonathan Coe wrote:
All the C++ compilers I have tried using (G
On Wed, Feb 3, 2016 at 1:03 PM, Jonathan Coe wrote:
>
>
> On 3 February 2016 at 18:44, David Blaikie wrote:
>
>>
>>
>> On Wed, Feb 3, 2016 at 10:23 AM, Jonathan Coe wrote:
>>
>>> All the C++ compilers I have tried using (GCC,Clang,MSVC) will generate
>>> assignment operators even if the user de
On 3 February 2016 at 18:44, David Blaikie wrote:
>
>
> On Wed, Feb 3, 2016 at 10:23 AM, Jonathan Coe wrote:
>
>> All the C++ compilers I have tried using (GCC,Clang,MSVC) will generate
>> assignment operators even if the user defines a copy-constructor. This is
>> the behaviour I set out to wri
On Wed, Feb 3, 2016 at 10:23 AM, Jonathan Coe wrote:
> All the C++ compilers I have tried using (GCC,Clang,MSVC) will generate
> assignment operators even if the user defines a copy-constructor. This is
> the behaviour I set out to write a check for.
>
> The cpp core guide lines recommend definin
All the C++ compilers I have tried using (GCC,Clang,MSVC) will generate
assignment operators even if the user defines a copy-constructor. This is
the behaviour I set out to write a check for.
The cpp core guide lines recommend defining all or none of the special
functions
https://github.com/isocpp
Is this really that useful of a rule? The language does the right thing for
the most part already (you don't need to explicitly delete them - they're
implicitly deleted if you define any others - except for backcompat with
C++98, but those cases are deprecated & we should probably split out the
war
alexfh added inline comments.
Comment at: clang-tidy/misc/RuleOfFiveCheck.cpp:30
@@ +29,3 @@
+.bind("copy-ctor")),
+ unless(hasDescendant(cxxMethodDecl(isCopyAssignmentOperator(),
+ this);
Why is `hasDe
alexfh added a comment.
In http://reviews.llvm.org/D16376#342901, @jbcoe wrote:
> I think I'll move this check to `cppcoreguidelines` and call it
> `rule-of-five`.
Yes, please move it to cppcoreguidelines.
> https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c21-if-y
jbcoe marked an inline comment as done.
jbcoe added a comment.
I think I'll move this check to `cppcoreguidelines` and call it `rule-of-five`.
https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#c21-if-you-define-or-delete-any-default-operation-define-or-delete-them-all
jbcoe retitled this revision from "clang-tidy check: Assignment and
Construction" to "clang-tidy check: rule-of-five".
jbcoe removed rL LLVM as the repository for this revision.
jbcoe updated this revision to Diff 46775.
jbcoe added a comment.
I've responded to review comments (thanks for those)
13 matches
Mail list logo