We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e316a8e commit 4ae5262Copy full SHA for 4ae5262
lib/ClangImporter/ImporterImpl.h
@@ -763,7 +763,12 @@ class LLVM_LIBRARY_VISIBILITY ClangImporter::Implementation
763
/// already in flight.
764
template<typename ...Args>
765
void diagnose(SourceLoc loc, Args &&...args) {
766
- diagnose(loc, std::forward<Args>(args)...);
+ // If we're in the middle of pretty-printing, suppress diagnostics.
767
+ if (SwiftContext.Diags.isPrettyPrintingDecl()) {
768
+ return;
769
+ }
770
+
771
+ SwiftContext.Diags.diagnose(loc, std::forward<Args>(args)...);
772
}
773
774
/// Import the given Clang identifier into Swift.
0 commit comments