Skip to content

Commit 9bf512a

Browse files
committed
[Diagnostics] Remove the C++ formatter for the "Swift" diagnostic style
We'll be using the new swift-syntax diagnostic formatter in the near future, as it is nearly available on all host platforms. So, remove the C++ formatter that did source-line annotation, falling back to the "LLVM" style when swift-syntax is not compiled in.
1 parent c7881fb commit 9bf512a

7 files changed

+54
-880
lines changed

include/swift/Basic/SourceManager.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,8 +410,6 @@ class SourceManager {
410410
SourceLoc();
411411
}
412412

413-
std::string getLineString(unsigned BufferID, unsigned LineNumber);
414-
415413
/// Retrieve the buffer ID for \p Path, loading if necessary.
416414
unsigned getExternalSourceBufferID(StringRef Path);
417415

include/swift/Frontend/PrintingDiagnosticConsumer.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
#include "llvm/Support/Process.h"
2828

2929
namespace swift {
30-
class AnnotatedSourceSnippet;
3130

3231
/// Diagnostic consumer that displays diagnostics to standard error.
3332
class PrintingDiagnosticConsumer : public DiagnosticConsumer {
@@ -38,10 +37,6 @@ class PrintingDiagnosticConsumer : public DiagnosticConsumer {
3837
bool DidErrorOccur = false;
3938
DiagnosticOptions::FormattingStyle FormattingStyle =
4039
DiagnosticOptions::FormattingStyle::LLVM;
41-
// The current snippet used to display an error/warning/remark and the notes
42-
// implicitly associated with it. Uses `std::unique_ptr` so that
43-
// `AnnotatedSourceSnippet` can be forward declared.
44-
std::unique_ptr<AnnotatedSourceSnippet> currentSnippet;
4540
// Educational notes which are buffered until the consumer is finished
4641
// constructing a snippet.
4742
SmallVector<std::string, 1> BufferedEducationalNotes;

0 commit comments

Comments
 (0)