File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -143,17 +143,8 @@ void Parser::performCodeCompletionSecondPassImpl(
143
143
// Disable libSyntax creation in the delayed parsing.
144
144
SyntaxContext->disable ();
145
145
146
- auto BeginParserPosition = getParserPosition (info.BodyPos );
147
-
148
- // ParserPositionRAII needs a primed parser to restore to.
149
- if (Tok.is (tok::NUM_TOKENS))
150
- consumeTokenWithoutFeedingReceiver ();
151
-
152
- // Ensure that we restore the parser state at exit.
153
- ParserPositionRAII PPR (*this );
154
-
155
- // Rewind to the beginning of the top-level code.
156
- restoreParserPosition (BeginParserPosition);
146
+ // Set the parser position to the start of the delayed decl or the body.
147
+ restoreParserPosition (getParserPosition (info.BodyPos ));
157
148
158
149
// Do not delay parsing in the second pass.
159
150
llvm::SaveAndRestore<bool > DisableDelayedBody (DelayBodyParsing, false );
You can’t perform that action at this time.
0 commit comments