[PATCH] D97990: [clang] Always provide relevant subobject for 'no viable comparison'

2021-03-08 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov updated this revision to Diff 329178. mizvekov added a comment. Now this a patch just about improving the diagnostic as rsmith suggested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D97990/new/ https://reviews.llvm.org/D97990 Files: cl

[PATCH] D97990: [clang] Always provide relevant subobject for 'no viable comparison'

2021-03-08 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I don't think this change is right: for struct A { int &r; bool operator==(const A&) const = default; }; we should warn about the reference member (as we do), but for struct A { int &r; bool operator<(const A&) const = default; }; ... we shouldn'

[PATCH] D97990: [clang] Always provide relevant subobject for 'no viable comparison'

2021-03-04 Thread Matheus Izvekov via Phabricator via cfe-commits
mizvekov created this revision. mizvekov requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Diagnostics for defaulted no viable not-equal and relational operators where not providing relevant subobject in diagnostics, unlike the cases for equa