Merge pull request #30247 from owenv/combined-descriptive-diag-flags

Support the combination of -enable-educational-notes and -enable-experimental-diagnostic-formatting
This commit is contained in:
Pavel Yaskevich
2020-03-18 09:44:29 -07:00
committed by GitHub
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());