[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:
Rintaro Ishizaki
2018-01-23 07:24:20 +09:00
committed by Xi Ge
parent cc783dc45a
commit 98fc073e2e
7 changed files with 32 additions and 45 deletions

View File

@@ -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);