Skip to content

Commit 5559cff

Browse files
committed
Revert "Merge pull request swiftlang#26664 from rintaro/syntaxparse-memoryleak"
This reverts commit 9f6b3e2, reversing changes made to e3e01cb.
1 parent 570ed93 commit 5559cff

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/Parse/SyntaxParsingContext.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,13 +259,10 @@ ParsedRawSyntaxNode SyntaxParsingContext::finalizeSourceFile() {
259259
Parts = Parts.drop_back();
260260

261261
for (auto RawNode : Parts) {
262-
if (RawNode.getKind() != SyntaxKind::CodeBlockItem) {
262+
if (RawNode.getKind() != SyntaxKind::CodeBlockItem)
263263
// FIXME: Skip toplevel garbage nodes for now. we shouldn't emit them in
264264
// the first place.
265-
if (RawNode.isRecorded())
266-
getSyntaxCreator().finalizeNode(RawNode.getOpaqueNode());
267265
continue;
268-
}
269266

270267
AllTopLevel.push_back(RawNode);
271268
}

0 commit comments

Comments
 (0)