Skip to content

Commit d41eec9

Browse files
committed
Parse: Simplify Parser::canDelayMemberDeclParsing()
1 parent 93c386d commit d41eec9

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

lib/Parse/ParseDecl.cpp

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3498,28 +3498,10 @@ bool Parser::canDelayMemberDeclParsing() {
34983498
// If explicitly disabled, respect the flag.
34993499
if (!DelayBodyParsing)
35003500
return false;
3501-
// There's no fundamental reasons that SIL cannnot be lasily parsed. We need
3502-
// to keep SILParserTUStateBase persistent to make it happen.
3503-
if (isInSILMode())
3504-
return false;
3505-
// Calculating interface hash requires tokens consumed in the original order.
3506-
if (SF.hasInterfaceHash())
3507-
return false;
3508-
if (SF.Kind == SourceFileKind::REPL)
3509-
return false;
3510-
// We always collect the entire syntax tree for IDE uses.
3511-
if (SF.shouldCollectToken())
3512-
return false;
3513-
if (SF.shouldBuildSyntaxTree())
3514-
return false;
3515-
// Recovering parser status later for #sourceLocaion is not-trivial and
3501+
// Recovering parser status later for #sourceLocation is not-trivial and
35163502
// it may not worth it.
35173503
if (InPoundLineEnvironment)
35183504
return false;
3519-
// The first code completion pass looks for code completion tokens extensively,
3520-
// so we cannot lazily parse members.
3521-
if (isCodeCompletionFirstPass())
3522-
return false;
35233505

35243506
// Skip until the matching right curly bracket; if we find a pound directive,
35253507
// we can't lazily parse.

0 commit comments

Comments
 (0)