Support the combination of -enable-educational-notes and -enable-experimental-diagnostic-formatting

This commit is contained in:
Owen Voorhees
2020-03-04 19:01:43 -08:00
parent c7155bc527
commit 592ce68c55
3 changed files with 30 additions and 0 deletions

View File

@@ -37,6 +37,9 @@ class PrintingDiagnosticConsumer : public DiagnosticConsumer {
// implicitly associated with it. Uses `std::unique_ptr` so that
// `AnnotatedSourceSnippet` can be forward declared.
std::unique_ptr<AnnotatedSourceSnippet> currentSnippet;
// Educational notes which are buffered until the consumer is finished
// constructing a snippet.
SmallVector<std::string, 1> BufferedEducationalNotes;
public:
PrintingDiagnosticConsumer(llvm::raw_ostream &stream = llvm::errs());