Incorrect visibility on local globals with public aliases. #2519

This commit is contained in:
Christoffer Lerno
2025-10-07 21:52:15 +02:00
parent 04cd079d4e
commit d6be1cbf65
3 changed files with 25 additions and 0 deletions

View File

@@ -5302,6 +5302,10 @@ static inline bool sema_analyse_alias(SemaContext *context, Decl *decl, bool *er
}
decl->type = symbol->type;
decl->define_decl.alias = symbol;
if (decl_is_externally_visible(decl) && !decl_is_externally_visible(symbol))
{
symbol->is_external_visible = true;
}
return true;
}