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:
@@ -52,18 +52,18 @@ static bool isResolvableScope(ScopeKind SK) {
|
||||
llvm_unreachable("Unhandled ScopeKind in switch.");
|
||||
}
|
||||
|
||||
Scope::Scope(Parser *P, ScopeKind SC, bool IsStaticallyInactiveConfigBlock)
|
||||
Scope::Scope(Parser *P, ScopeKind SC, bool isInactiveConfigBlock)
|
||||
: SI(P->getScopeInfo()),
|
||||
HTScope(SI.HT, SI.CurScope ? &SI.CurScope->HTScope : nullptr),
|
||||
PrevScope(SI.CurScope),
|
||||
PrevResolvableDepth(SI.ResolvableDepth),
|
||||
Kind(SC),
|
||||
IsStaticallyInactiveConfigBlock(IsStaticallyInactiveConfigBlock) {
|
||||
IsInactiveConfigBlock(isInactiveConfigBlock) {
|
||||
assert(PrevScope || Kind == ScopeKind::TopLevel);
|
||||
|
||||
if (SI.CurScope) {
|
||||
Depth = SI.CurScope->Depth + 1;
|
||||
IsStaticallyInactiveConfigBlock |= SI.CurScope->IsStaticallyInactiveConfigBlock;
|
||||
IsInactiveConfigBlock |= SI.CurScope->IsInactiveConfigBlock;
|
||||
} else {
|
||||
Depth = 0;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ Scope::Scope(Parser *P, SavedScope &&SS):
|
||||
PrevResolvableDepth(SI.ResolvableDepth),
|
||||
Depth(SS.Depth),
|
||||
Kind(SS.Kind),
|
||||
IsStaticallyInactiveConfigBlock(SS.IsStaticallyInactiveConfigBlock) {
|
||||
IsInactiveConfigBlock(SS.IsInactiveConfigBlock) {
|
||||
|
||||
SI.CurScope = this;
|
||||
if (!isResolvableScope(Kind))
|
||||
|
||||
Reference in New Issue
Block a user