mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Syntax] Don't rebuild Syntax with RawSyntax in SyntaxVisitor (#14057)
We don't guarantee RawSyntax nodes as unique object in the tree, while we do that for SyntaxData. We shouldn't recreate SyntaxData once it was built.
This commit is contained in:
@@ -264,7 +264,7 @@ int dumpEOFSourceLoc(const char *MainExecutablePath,
|
||||
auto BufferId = *SF->getBufferID();
|
||||
SyntaxPrintOptions Opts;
|
||||
auto Root = SF->getSyntaxRoot();
|
||||
auto AbPos = Root.getEOFToken().getAbsolutePosition(Root);
|
||||
auto AbPos = Root.getEOFToken().getAbsolutePosition();
|
||||
|
||||
SourceManager &SourceMgr = SF->getASTContext().SourceMgr;
|
||||
auto StartLoc = SourceMgr.getLocForBufferStart(BufferId);
|
||||
|
||||
Reference in New Issue
Block a user