Skip to content

Commit 1415f2f

Browse files
author
David Ungar
committed
LazyASTScopes only matters when ASTScopes are enabled
1 parent 10fd6fb commit 1415f2f

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
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);

0 commit comments

Comments
 (0)