[clang] [clang] Apply internal buffering to clang diagnostics printing (PR #113440)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 3 09:37:29 PST 2024
================
@@ -656,15 +656,19 @@ static bool printWordWrapped(raw_ostream &OS, StringRef Str, unsigned Columns,
TextDiagnostic::TextDiagnostic(raw_ostream &OS, const LangOptions &LangOpts,
DiagnosticOptions *DiagOpts,
const Preprocessor *PP)
- : DiagnosticRenderer(LangOpts, DiagOpts), OS(OS), PP(PP) {}
+ : DiagnosticRenderer(LangOpts, DiagOpts), Out(OS), PP(PP),
+ OS(InternalBuffer) {
+ this->OS.buffer().clear();
+ this->OS.enable_colors(true);
----------------
AaronBallman wrote:
Shouldn't this be looking at `DiagOpts->ShowColors`?
https://github.com/llvm/llvm-project/pull/113440
More information about the cfe-commits
mailing list