Skip to content

Commit 3321794

Browse files
authored
Merge pull request swiftlang#26902 from davidungar/lazy-cleanup
2 parents d30ec5b + 2ae2006 commit 3321794

File tree

4 files changed

+2
-8
lines changed

4 files changed

+2
-8
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ namespace swift {
259259
bool WarnIfASTScopeLookup = false;
260260

261261
/// Build the ASTScope tree lazily
262-
bool LazyASTScopes = false;
262+
bool LazyASTScopes = true;
263263

264264
/// Whether to use the import as member inference system
265265
///

include/swift/Frontend/Frontend.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,6 @@ class CompilerInvocation {
297297
/// Called from lldb, see rdar://53971116
298298
void disableASTScopeLookup() {
299299
LangOpts.EnableASTScopeLookup = false;
300-
LangOpts.LazyASTScopes = false;
301300
}
302301

303302
CodeCompletionCallbacksFactory *getCodeCompletionFactory() const {

lib/Frontend/CompilerInvocation.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
339339
Opts.DisableParserLookup;
340340
Opts.CompareToASTScopeLookup |= Args.hasArg(OPT_compare_to_astscope_lookup);
341341
Opts.WarnIfASTScopeLookup |= Args.hasArg(OPT_warn_if_astscope_lookup);
342-
Opts.LazyASTScopes |=
343-
Opts.EnableASTScopeLookup && Args.hasArg(OPT_lazy_astscopes);
342+
Opts.LazyASTScopes |= Args.hasArg(OPT_lazy_astscopes);
344343

345344
Opts.DebugConstraintSolver |= Args.hasArg(OPT_debug_constraints);
346345
Opts.NamedLazyMemberLoading &= !Args.hasArg(OPT_disable_named_lazy_member_loading);

test/NameBinding/scope_map_top_level.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@ var i: Int = b.my_identity()
5151
// CHECK-EXPANDED-NEXT: |-TypeAliasDeclScope {{.*}}, [15:1 - 15:15]
5252
// CHECK-EXPANDED-NEXT: |-ExtensionDeclScope {{.*}}, [17:1 - 19:1]
5353
// CHECK-EXPANDED-NEXT: `-ExtensionBodyScope {{.*}}, [17:15 - 19:1]
54-
// CHECK-EXPANDED-NEXT: `-AbstractFunctionDeclScope {{.*}}, [18:3 - 18:43] 'my_identity()'
55-
// CHECK-EXPANDED-NEXT: `-ParameterListScope {{.*}}, [18:19 - 18:43]
56-
// CHECK-EXPANDED-NEXT: `-MethodBodyScope {{.*}}, [18:29 - 18:43]
57-
// CHECK-EXPANDED-NEXT: `-BraceStmtScope {{.*}}, [18:29 - 18:43]
5854
// CHECK-EXPANDED-NEXT: `-TopLevelCodeScope {{.*}}, [21:1 - 21:28]
5955
// CHECK-EXPANDED-NEXT: `-BraceStmtScope {{.*}}, [21:1 - 21:28]
6056
// CHECK-EXPANDED-NEXT: `-PatternEntryDeclScope {{.*}}, [21:5 - 21:28] entry 0 'i'

0 commit comments

Comments
 (0)