Add test for the SwiftSyntax tree produced when parsing '= super' in a module interface

This commit is contained in:
Nathan Hawes
2019-04-16 14:11:37 -07:00
parent 1d4b6df411
commit 1e1025291d
3 changed files with 50 additions and 0 deletions

View File

@@ -600,6 +600,8 @@ int parseFile(
Invocation.getLangOptions().VerifySyntaxTree = options::VerifySyntaxTree;
Invocation.getLangOptions().RequestEvaluatorGraphVizPath = options::GraphVisPath;
Invocation.getFrontendOptions().InputsAndOutputs.addInputFile(InputFileName);
if (InputFileName.endswith(".swiftinterface"))
Invocation.setInputKind(InputFileKind::SwiftModuleInterface);
Invocation.setMainExecutablePath(
llvm::sys::fs::getMainExecutable(MainExecutablePath,
reinterpret_cast<void *>(&anchorForGetMainExecutable)));