[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant

Eric Fiselier via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 13 11:29:30 PDT 2018


EricWF added inline comments.


================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:9384-9385
+def err_spaceship_comparison_of_void_ptr : Error<
+  "three-way comparison with void pointer %select{operand type|operand types}0 "
+  "(%1 and %2)">;
+def err_spaceship_comparison_of_invalid_comp_type : Error<
----------------
rsmith wrote:
> EricWF wrote:
> > rsmith wrote:
> > > Why are you diagnosing this case as an error?
> > [expr.spaceship]p9 seems to require it. The composite pointer type is not a function/member/null pointer type, neither is it a object pointer type, so the program is ill-formed.
> > 
> > Unless I'm missing something.
> void* is an object pointer type.
Oh. right. 'object pointer' vs 'pointer-to-object'.


https://reviews.llvm.org/D45476





More information about the cfe-commits mailing list