mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
libSyntax: optionally emit diagnostics for unknown expressions and declarations. (#13973)
With more syntax nodes being specialized, we'd like this straight-forward way to pinpoint unknown entities. This diagnostics is only issued in -emit-syntax frontend action and swift-syntax-test invocation.
This commit is contained in:
@@ -145,6 +145,7 @@ SourceFile *getSourceFile(CompilerInstance &Instance,
|
||||
const char *MainExecutablePath) {
|
||||
CompilerInvocation Invocation;
|
||||
Invocation.getLangOptions().KeepSyntaxInfoInSourceFile = true;
|
||||
Invocation.getLangOptions().VerifySyntaxTree = true;
|
||||
Invocation.getFrontendOptions().Inputs.addInputFile(InputFileName);
|
||||
Invocation.setMainExecutablePath(
|
||||
llvm::sys::fs::getMainExecutable(MainExecutablePath,
|
||||
|
||||
Reference in New Issue
Block a user