mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 01:06:06 +00:00

Discovered by reducing a different problem, we currently assert because we failed to make the constraint expressions not dependent, since a RecoveryExpr cannot be transformed. This patch fixes that, and gets reasonably nice diagnostics by introducing a concept (hah!) of "ContainsErrors" to the Satisfaction types, which causes us to treat the candidate as non-viable. However, just making THAT candidate non-viable would result in choosing the 'next best' canddiate, which can result in awkward errors, where we start evaluating a candidate that is not intended to be selected. Because of this, and to make diagnostics more relevant, we now just cause the entire lookup to result in a 'no-viable-candidates'. This means we will only emit the list of candidates, rather than any cascading failures.