Merge pull request #39209 from xedin/rdar-81228501

[Diagnostics] Ignore warnings while diagnosing ambiguities
This commit is contained in:
Pavel Yaskevich
2021-09-09 09:32:01 -07:00
committed by GitHub
2 changed files with 17 additions and 1 deletions

View File

@@ -3990,8 +3990,14 @@ bool ConstraintSystem::diagnoseAmbiguityWithFixes(
llvm::SmallSetVector<FixInContext, 4> fixes;
for (auto &solution : solutions) {
for (auto *fix : solution.Fixes)
for (auto *fix : solution.Fixes) {
// Ignore warnings in favor of actual error fixes,
// because they are not the source of ambiguity/failures.
if (fix->isWarning())
continue;
fixes.insert({&solution, fix});
}
}
llvm::MapVector<ConstraintLocator *, SmallVector<FixInContext, 4>>