EricWF added inline comments.

================
Comment at: lib/AST/ExprConstant.cpp:8829
+  return EvaluateComparisonBinaryOperator(Info, E, OnSuccess, [&]() {
+    return ExprEvaluatorBaseTy::VisitBinaryOperator(E);
+  });
----------------
rsmith wrote:
> It'd be clearer to call `VisitBinCmp` rather than `VisitBinaryOperator`.
@rsmith: OK, so I'm confused about this. Originally I had an `llvm_unreachable` 
that the continuation was never reached, but you suggested it was. I'm not sure 
how. Could you provide an example?

The precondition of calling `VisitBinCmp` is that we have a call to a builtin 
operator. For `<=>`,  where the composite type is either an arithmetic type, 
pointer type, or member pointer type (which includes enum types after 
conversions),  *All* of these cases should be handled before reaching the 
function.

Is there a control flow path I'm missing? 


https://reviews.llvm.org/D45476



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to