Merge pull request #75659 from xymus/shadow-dont-warn-with-alias-workaround

ModuleInterface: Don't warn on name conflict when the alias workaround is enabled
This commit is contained in:
Alexis Laferrière
2024-08-05 12:38:00 -07:00
committed by GitHub
2 changed files with 6 additions and 1 deletions

View File

@@ -184,7 +184,8 @@ static void
diagnoseDeclShadowsModule(ModuleInterfaceOptions const &Opts,
TypeDecl *shadowingDecl, ModuleDecl *shadowedModule,
ModuleDecl *brokenModule) {
if (Opts.PreserveTypesAsWritten || shadowingDecl == shadowedModule)
if (Opts.PreserveTypesAsWritten || Opts.AliasModuleNames ||
shadowingDecl == shadowedModule)
return;
shadowingDecl->diagnose(