This patch tackles long hanging fruit for the builtin operator<=> expressions. It is currently needs some cleanup before landing, but I want to get some initial feedback.
The main changes are:
- Lookup, build, and store the required standard library types and expressions in ASTContext. By storing them in ASTContext we don't need to store (and duplicate) the required expressions in the BinaryOperator AST nodes.
- Implement [expr.spaceship] checking, including diagnosing narrowing conversions.
- Implement ExprConstant for builtin spaceship operators.
- Implement builitin operator<=> support in CodeGenAgg. Initially I emitted the required comparisons using ScalarExprEmitter::VisitBinaryOperator, but this caused the operand expressions to be emitted once for every required cmp.
- Implement [builtin.over] with modifications to support the intent of P0946R0. See the note on BuiltinOperatorOverloadBuilder::addThreeWayArithmeticOverloads for more information about the workaround.
We don't generally indent comments after a \brief like this. Also, we enable autobrief, so these \briefs are redundant.