summaryrefslogtreecommitdiffstats
path: root/clang/test/CXX/class/class.compare/class.compare.default
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)
* PR44627: Consider reversing == and <=> candidates found by ADL.Richard Smith2020-01-301-1/+1
| | | | (cherry picked from commit 1db66e705f4dbe7dbe17edac804289ef59d5f616)
* [c++20] Compute exception specifications for defaulted comparisons.Richard Smith2019-12-152-10/+10
| | | | | | | | 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] Implement P1946R0: allow defaulted comparisons to take theirRichard Smith2019-12-101-4/+16
| | | | arguments by value.
* [c++20] Implement P1185R2 (as modified by P2002R0).Richard Smith2019-12-101-0/+146
| | | | | | For each defaulted operator<=> in a class that doesn't explicitly declare any operator==, also inject a matching implicit defaulted operator==.
* [c++20] Fix handling of unqualified lookups from a defaulted comparisonRichard Smith2019-12-091-0/+76
| | | | | | | | | | function. We need to perform unqualified lookups from the context of a defaulted comparison, but not until we implicitly define the function, at which point we can't do those lookups any more. So perform the lookup from the end of the class containing the =default declaration and store the lookup results on the defaulted function until we synthesize the body.
* [c++20] Defaulted comparison support for array members.Richard Smith2019-12-091-11/+26
|
* [c++20] Synthesis of defaulted comparison functions.Richard Smith2019-12-082-1/+46
| | | | | | Array members are not yet handled. In addition, defaulted comparisons can't yet find comparison operators by unqualified lookup (only by member lookup and ADL). These issues will be fixed in follow-on changes.
* [c++20] Determine whether a defaulted comparison should be deleted orRichard Smith2019-12-062-42/+307
| | | | constexpr.
* [c++20] Enforce rule that a union-like class or class with referenceRichard Smith2019-10-271-0/+70
| | | | members cannot have defaulted comparisons.
* [c++2a] Allow comparison functions to be explicitly defaulted.Richard Smith2019-10-221-0/+46
This adds some initial syntactic checking that only the appropriate function signatures can be defaulted. No implicit definitions are generated yet.
OpenPOWER on IntegriCloud