[Deserialization] Require labels to match when looking for closely-matching clang declarations

This commit is contained in:
Doug Gregor
2025-11-02 08:32:50 -08:00
parent 38c23bcdda
commit 1bae4da121
3 changed files with 9 additions and 1 deletions

View File

@@ -2013,7 +2013,8 @@ namespace {
return TypeComparison::Equal;
if (nearMatchOk) {
TypeMatchOptions options = TypeMatchFlags::AllowTopLevelOptionalMismatch;
TypeMatchOptions options = TypeMatchFlags::RequireMatchingParameterLabels;
options |= TypeMatchFlags::AllowTopLevelOptionalMismatch;
options |= TypeMatchFlags::AllowNonOptionalForIUOParam;
options |= TypeMatchFlags::IgnoreNonEscapingForOptionalFunctionParam;
options |= TypeMatchFlags::IgnoreFunctionSendability;