Skip to content

Commit 2ad0360

Browse files
authored
Merge pull request swiftlang#26618 from marcrasi/syntax-data-sized-deallocation
2 parents ed0d5dd + 00c0a03 commit 2ad0360

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/swift/Syntax/SyntaxData.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ class SyntaxData final
133133
}
134134

135135
public:
136+
/// Disable sized deallocation for SyntaxData, because it has tail-allocated
137+
/// data.
138+
void operator delete(void *p) { ::operator delete(p); }
139+
136140
/// Get the node immediately before this current node that does contain a
137141
/// non-missing token. Return nullptr if we cannot find such node.
138142
RC<SyntaxData> getPreviousNode() const;

0 commit comments

Comments
 (0)