OSDN Git Service

PR44723: Trigger return type deduction for operator<=>s whose return
authorRichard Smith <richard@metafoo.co.uk>
Fri, 31 Jan 2020 21:05:07 +0000 (13:05 -0800)
committerRichard Smith <richard@metafoo.co.uk>
Fri, 31 Jan 2020 21:06:48 +0000 (13:06 -0800)
commit42d4a55f227a1cc78ab8071062d869abe88655d9
tree7a842c061af4908b0c7132764942c5af347d2f8e
parentf9fa9e1f0e9508abb7b11b161a4c1509a6933d2b
PR44723: Trigger return type deduction for operator<=>s whose return
types are needed to compute the return type of a defaulted operator<=>.

This raises the question of what to do if return type deduction fails.
The standard doesn't say, and implementations vary, so for now reject
that case eagerly to keep our options open.
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaDeclCXX.cpp
clang/test/CXX/class/class.compare/class.spaceship/p2.cpp