This is an archive of the discontinued LLVM Phabricator instance.

[clang] Fix diagnostics for defaulted, implicitly deleted 'operator=='.
ClosedPublic

Authored by AMP999 on Jul 19 2023, 8:13 AM.

Details

Summary

https://godbolt.org/z/cMKE3o1aG

According to the issue https://github.com/llvm/llvm-project/issues/63960 , compiler falsely complains that no viable operator<=> was found while we are actually looking for a operator==.
This bug has been fixed through adding a check of the OverloadedOperatorKind type's object, OO, to see if it is OO_EqualEqual in addition to OO_ExclaimEqual.

Diff Detail

Event Timeline

AMP999 created this revision.Jul 19 2023, 8:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 19 2023, 8:13 AM
AMP999 requested review of this revision.Jul 19 2023, 8:13 AM
AMP999 updated this revision to Diff 542136.Jul 19 2023, 11:48 AM
AMP999 updated this revision to Diff 542240.Jul 19 2023, 4:33 PM

Revised the formatting of the change.

shafik added reviewers: royjacobson, Restricted Project.Jul 20 2023, 3:30 PM

Looks generally good to me. can you add an entry in clang/docs/ReleaseNotes.rst? Thanks!

AMP999 updated this revision to Diff 542909.Jul 21 2023, 7:25 AM

An entry added to clang/docs/ReleaseNotes.rst
Thank You for the review!

I appreciate if you take a look at another patch I sent to address the ci build failure when calling clang/utils/ci/run-buildbot check-format caused by some extra white spaces.
https://reviews.llvm.org/D155814

By the way I don't have permissions to commit so I'll send you my name and email:
Name: Amirreza Ashouri
Email: ar.ashouri999@gmail.com

cor3ntin accepted this revision.Jul 23 2023, 1:44 AM

Thanks for the patch, it looks good to me. I'll commit on your behalf

This revision is now accepted and ready to land.Jul 23 2023, 1:44 AM
This revision was landed with ongoing or failed builds.Jul 23 2023, 1:58 AM
This revision was automatically updated to reflect the committed changes.