[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-05-16 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D45766#1101533, @ksu.shadura wrote: > Thanks for your opinion, your guess was right! It is a unit-test, so seems we > need to try to suppress warnings on our side. Ok, great that this time it got resolved this trivially! > In https://rev

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-05-16 Thread Oksana Shadura via Phabricator via cfe-commits
ksu.shadura added a comment. In https://reviews.llvm.org/D45766#1098823, @Quuxplusone wrote: > In https://reviews.llvm.org/D45766#1097797, @ksu.shadura wrote: > > > Thank you for the test example! I got your point, but I wanted to ask if it > > should be like this for commutative operations? > >

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-05-14 Thread Arthur O'Dwyer via Phabricator via cfe-commits
Quuxplusone added a comment. In https://reviews.llvm.org/D45766#1097797, @ksu.shadura wrote: > Thank you for the test example! I got your point, but I wanted to ask if it > should be like this for commutative operations? > In our case it is actually matrix, and subtraction of matrices is not >

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-05-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D45766#1097797, @ksu.shadura wrote: > Thank you for the test example! I got your point, but I wanted to ask if it > should be like this for commutative operations? > In our case it is actually matrix, and subtraction of matrices is not

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-05-14 Thread Oksana Shadura via Phabricator via cfe-commits
ksu.shadura added a comment. Thank you for the test example! I got your point, but I wanted to ask if it should be like this for commutative operations? In our case it is actually matrix, and subtraction of matrices is not commutative operation.. Repository: rL LLVM https://reviews.llvm.org

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-05-14 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In https://reviews.llvm.org/D45766#1097736, @ksu.shadura wrote: > Hi, Hi. > we see the false-positive behavior of -Wno-self-assign-overloaded flag in > case of subtraction assignment operator. > The minimal reproducer that we got: https://godbolt.org/g/8PQMpR >

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-05-14 Thread Oksana Shadura via Phabricator via cfe-commits
ksu.shadura added a comment. Hi, we see the false-positive behavior of -Wno-self-assign-overloaded flag in case of subtraction assignment operator. The minimal reproducer that we got: https://godbolt.org/g/8PQMpR typedef int Int_t; typedef double Double_t; class TObject {}; template c

Re: [PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-25 Thread Arthur O'Dwyer via cfe-commits
On Wed, Apr 25, 2018 at 7:10 PM, Richard Smith wrote: > On 23 April 2018 at 20:07, John McCall via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> >> The issue there is that -Wnoisy-in-tests is likely to be useful as a >> cancellation of -Wno-noisy-in-tests, which (as David suggests) migh

Re: [PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-25 Thread Richard Smith via cfe-commits
On 23 April 2018 at 20:07, John McCall via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Mon, Apr 23, 2018 at 8:23 PM, Richard Smith > wrote: > >> On 23 April 2018 at 16:23, David Blaikie via cfe-commits < >> cfe-commits@lists.llvm.org> wrote: >> >>> On Mon, Apr 23, 2018 at 4:12 PM John M

Re: [PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread John McCall via cfe-commits
On Mon, Apr 23, 2018 at 8:23 PM, Richard Smith wrote: > On 23 April 2018 at 16:23, David Blaikie via cfe-commits < > cfe-commits@lists.llvm.org> wrote: > >> On Mon, Apr 23, 2018 at 4:12 PM John McCall wrote: >> >>> On Mon, Apr 23, 2018 at 6:32 PM, David Blaikie >>> wrote: >>> On Mon, Apr 2

Re: [PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread Richard Smith via cfe-commits
On 23 April 2018 at 16:23, David Blaikie via cfe-commits < cfe-commits@lists.llvm.org> wrote: > On Mon, Apr 23, 2018 at 4:12 PM John McCall wrote: > >> On Mon, Apr 23, 2018 at 6:32 PM, David Blaikie >> wrote: >> >>> On Mon, Apr 23, 2018 at 3:29 PM John McCall via Phabricator < >>> revi...@review

Re: [PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread David Blaikie via cfe-commits
On Mon, Apr 23, 2018 at 4:12 PM John McCall wrote: > On Mon, Apr 23, 2018 at 6:32 PM, David Blaikie wrote: > >> On Mon, Apr 23, 2018 at 3:29 PM John McCall via Phabricator < >> revi...@reviews.llvm.org> wrote: >> >>> rjmccall added a comment. >>> >>> In https://reviews.llvm.org/D45766#1076176, @

Re: [PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread John McCall via cfe-commits
On Mon, Apr 23, 2018 at 6:32 PM, David Blaikie wrote: > On Mon, Apr 23, 2018 at 3:29 PM John McCall via Phabricator < > revi...@reviews.llvm.org> wrote: > >> rjmccall added a comment. >> >> In https://reviews.llvm.org/D45766#1076176, @dblaikie wrote: >> >> > Is there anything else in the "-w" nam

Re: [PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread David Blaikie via cfe-commits
On Mon, Apr 23, 2018 at 3:29 PM John McCall via Phabricator < revi...@reviews.llvm.org> wrote: > rjmccall added a comment. > > In https://reviews.llvm.org/D45766#1076176, @dblaikie wrote: > > > Is there anything else in the "-w" namespace other than the literal "-w" > so > > far? > > > No. This w

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D45766#1076176, @dblaikie wrote: > Is there anything else in the "-w" namespace other than the literal "-w" so > far? No. This would be novel. > I mean, I could imagine it might make more sense to default these warnings > off & users can

Re: [PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread David Blaikie via cfe-commits
Is there anything else in the "-w" namespace other than the literal "-w" so far? I mean, I could imagine it might make more sense to default these warnings off & users can turn them on for non-test code, potentially? So "-Wnon-test" might make sense. On Mon, Apr 23, 2018 at 3:22 PM John McCall vi

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. Is there anything else in the "-w" namespace other than the literal "-w" so far? I mean, I could imagine it might make more sense to default these warnings off & users can turn them on for non-test code, potentially? So "-Wnon-test" might make sense. Repository: rL L

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. In https://reviews.llvm.org/D45766#1076090, @dblaikie wrote: > FWIW I don't fundamentalyl object to also having something like -wtest. > Probably needs a better name though (unfortunately the double-negative gets > confusing... - like you want to describe the set of di

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a subscriber: lebedev.ri. dblaikie added a comment. FWIW I don't fundamentalyl object to also having something like -wtest. Probably needs a better name though (unfortunately the double-negative gets confusing... - like you want to describe the set of diagnostics that should not be

Re: [PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread David Blaikie via cfe-commits
FWIW I don't fundamentalyl object to also having something like -wtest. Probably needs a better name though (unfortunately the double-negative gets confusing... - like you want to describe the set of diagnostics that should not be used in test code, so that as a group might be "-Wnon-test" but then

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Sema/SemaExpr.cpp:11527-11528 - S.Diag(OpLoc, diag::warn_self_assignment) - << LHSDeclRef->getType() - << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); + S.Diag(OpLoc, IsBuiltin ? diag::warn_self_assignment

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330651: [Sema] Add -Wno-self-assign-overloaded (authored by lebedevri, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.org/D45766?vs=143645&id=1436

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri updated this revision to Diff 143645. lebedev.ri added a comment. Add negative tests, too. Repository: rC Clang https://reviews.llvm.org/D45766 Files: docs/ReleaseNotes.rst include/clang/Basic/DiagnosticGroups.td include/clang/Basic/DiagnosticSemaKinds.td lib/Sema/SemaExpr

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread David Blaikie via Phabricator via cfe-commits
dblaikie accepted this revision. dblaikie added inline comments. This revision is now accepted and ready to land. Comment at: lib/Sema/SemaExpr.cpp:11527-11528 - S.Diag(OpLoc, diag::warn_self_assignment) - << LHSDeclRef->getType() - << LHSExpr->getSourceRange() << RH

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added inline comments. Comment at: lib/Sema/SemaExpr.cpp:11527-11528 - S.Diag(OpLoc, diag::warn_self_assignment) - << LHSDeclRef->getType() - << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); + S.Diag(OpLoc, IsBuiltin ? diag::warn_self_assignment

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-23 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added inline comments. Comment at: lib/Sema/SemaExpr.cpp:11527-11528 - S.Diag(OpLoc, diag::warn_self_assignment) - << LHSDeclRef->getType() - << LHSExpr->getSourceRange() << RHSExpr->getSourceRange(); + S.Diag(OpLoc, IsBuiltin ? diag::warn_self_assignment_b

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-22 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. Ping. At least one of these needs to land. Repository: rC Clang https://reviews.llvm.org/D45766 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D45766: [Sema] Add -Wno-self-assign-overloaded

2018-04-18 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri created this revision. lebedev.ri added reviewers: dblaikie, aaron.ballman, thakis, rjmccall, rsmith. It seems there isn't much enthusiasm for `-wtest` https://reviews.llvm.org/D45685. This is more conservative version, which i had in the very first revision of https://reviews.llvm.or