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,
1915
1915
1916
1916
std::unique_ptr<CompilerInstance> Instance =
1917
1917
std::make_unique<CompilerInstance>();
1918
+
1919
+ // In parseable output, avoid printing diagnostics
1918
1920
Instance->addDiagnosticConsumer (&PDC);
1919
1921
1920
1922
struct FinishDiagProcessingCheckRAII {
@@ -2022,6 +2024,11 @@ int swift::performFrontend(ArrayRef<const char *> Args,
2022
2024
Invocation.getFrontendOptions ().InputsAndOutputs ,
2023
2025
FileSpecificDiagnostics);
2024
2026
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 );
2025
2032
}
2026
2033
2027
2034
// Because the serialized diagnostics consumer is initialized here,
You can’t perform that action at this time.
0 commit comments