[PATCH] D45476: [C++2a] Implement operator<=> CodeGen and ExprConstant
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 23 21:05:29 PDT 2018
rjmccall added inline comments.
================
Comment at: lib/CodeGen/CGExprAgg.cpp:1002
+ return EmitFinalDestCopy(
+ E->getType(), CGF.MakeNaturalAlignAddrLValue(Select, E->getType()));
+}
----------------
Is there something in Sema actually validating that the comparison types is trivially copyable? Because EmitFinalDestCopy does not work on non-trivial types.
Also, are we certain that we're allowed to do a copy from an actual global variable here instead of potentially a constexpr evaluation of the variable reference? And if we are doing a copy, are we registering ODR-uses of all the variables in Sema?
I don't think you should worry about trying to generate a select between the "actual" comparison result values. At least not yet.
https://reviews.llvm.org/D45476
More information about the cfe-commits
mailing list