mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Restore local type declarations list
This commit is contained in:
@@ -1850,8 +1850,9 @@ void Parser::setLocalDiscriminator(ValueDecl *D) {
|
||||
if (!CurLocalContext || !D->getDeclContext()->isLocalContext())
|
||||
return;
|
||||
|
||||
if (getScopeInfo().isStaticallyInactiveConfigBlock())
|
||||
return;
|
||||
if (auto TD = dyn_cast<TypeDecl>(D))
|
||||
if (!getScopeInfo().isInactiveConfigBlock())
|
||||
SF.LocalTypeDecls.insert(TD);
|
||||
|
||||
Identifier name = D->getName();
|
||||
unsigned discriminator = CurLocalContext->claimNextNamedDiscriminator(name);
|
||||
@@ -2217,6 +2218,15 @@ ParserStatus Parser::parseDecl(ParseDeclOptions Flags,
|
||||
break;
|
||||
}
|
||||
|
||||
if (auto SF = CurDeclContext->getParentSourceFile()) {
|
||||
if (!getScopeInfo().isInactiveConfigBlock()) {
|
||||
for (auto Attr : Attributes) {
|
||||
if (isa<ObjCAttr>(Attr) || isa<DynamicAttr>(Attr))
|
||||
SF->AttrsRequiringFoundation.insert(Attr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (FoundCCTokenInAttr) {
|
||||
if (CodeCompletion) {
|
||||
CodeCompletion->completeDeclAttrKeyword(DeclResult.getPtrOrNull(),
|
||||
|
||||
Reference in New Issue
Block a user