summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/class/class.compare/class.compare.default/p3.cpp
Commit message (Collapse)AuthorAgeFilesLines
* PR44721: Don't consider overloaded operators for built-in comparisonsRichard Smith2020-02-041-0/+12
| | | | | | | | | | | | | | | | | | | | when building a defaulted comparison. As a convenient way of asking whether `x @ y` is valid and building it, we previouly always performed overload resolution and built an overloaded expression, which would both end up picking a builtin operator candidate when given a non-overloadable type. But that's not quite right, because it can result in our finding a user-declared operator overload, which we should never do when applying operators non-overloadable types. Handle this more correctly: skip overload resolution when building `x @ y` if the operands are not overloadable. But still perform overload resolution (considering only builtin candidates) when checking validity, as we don't have any other good way to ask whether a binary operator expression would be valid. (cherry picked from commit 1f3f8c369a5067a132c871f33a955a7feaea8534)
* [c++20] Compute exception specifications for defaulted comparisons.Richard Smith2019-12-151-8/+8
| | | | | | | | This requires us to essentially fully form the body of the defaulted comparison, but from an unevaluated context. Naively this would require generating the function definition twice; instead, we ensure that the function body is implicitly defined before performing the check, and walk the actual body where possible.
* [c++20] Determine whether a defaulted comparison should be deleted orRichard Smith2019-12-061-0/+192
constexpr.
OpenPOWER on IntegriCloud