File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -1915,6 +1915,8 @@ int swift::performFrontend(ArrayRef<const char *> Args,
19151915
19161916 std::unique_ptr<CompilerInstance> Instance =
19171917 std::make_unique<CompilerInstance>();
1918+
1919+ // In parseable output, avoid printing diagnostics
19181920 Instance->addDiagnosticConsumer (&PDC);
19191921
19201922 struct FinishDiagProcessingCheckRAII {
@@ -2022,6 +2024,11 @@ int swift::performFrontend(ArrayRef<const char *> Args,
20222024 Invocation.getFrontendOptions ().InputsAndOutputs ,
20232025 FileSpecificDiagnostics);
20242026 Instance->addDiagnosticConsumer (FileSpecificAccumulatingConsumer.get ());
2027+
2028+ // If we got this far, we need to suppress the output of the
2029+ // PrintingDiagnosticConsumer to ensure that only the parseable-output
2030+ // is emitted
2031+ PDC.setSuppressOutput (true );
20252032 }
20262033
20272034 // Because the serialized diagnostics consumer is initialized here,
You can’t perform that action at this time.
0 commit comments