================ @@ -1874,9 +1874,11 @@ ExprResult Sema::CreateGenericSelectionExpr( if (D != 0) { Diag(Types[i]->getTypeLoc().getBeginLoc(), D) - << Types[i]->getTypeLoc().getSourceRange() - << Types[i]->getType(); - TypeErrorFound = true; + << Types[i]->getTypeLoc().getSourceRange() << Types[i]->getType(); + if (getDiagnostics().getDiagnosticLevel( ---------------- erichkeane wrote:
Right, I think I'm being unclear. I'm not criticizing the functionality here, just the interface in which we're using it. IF the action we care about is always/often "is this an error", then that is the question we should allow ourselves to ask. So something like: `getDiagnostics().willEmitError(SemaDiagnosticsBuilder&)` (or, `(S.Diag(...)<<...).isErrorDiag(getDiagnostics())`. Again, sorta noodling on a 'if we do this more often, we should come up with a more natural interface'. https://github.com/llvm/llvm-project/pull/141596 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits