[Parse] Fix issue with incremental re-parsing for SwiftSyntax emitting bogus parsing error

rdar://60232712
This commit is contained in:
Argyrios Kyrtzidis
2020-03-18 15:08:48 -07:00
parent 1882b50555
commit 791309155d
5 changed files with 18 additions and 1 deletions

View File

@@ -606,6 +606,7 @@ int parseFile(
// Set up the compiler invocation
CompilerInvocation Invocation;
Invocation.getLangOptions().BuildSyntaxTree = true;
Invocation.getLangOptions().ParseForSyntaxTreeOnly = true;
Invocation.getLangOptions().VerifySyntaxTree = options::VerifySyntaxTree;
Invocation.getLangOptions().RequestEvaluatorGraphVizPath = options::GraphVisPath;
Invocation.getFrontendOptions().InputsAndOutputs.addInputFile(InputFileName);