Skip to content

Commit 5cead0c

Browse files
authored
Revert "Fix OOM in FormatDiagnostic" (#108838)
Reverting due to build failures found in #108187
1 parent 76a85b0 commit 5cead0c

File tree

16 files changed

+300
-226
lines changed

16 files changed

+300
-226
lines changed

clang-tools-extra/clang-tidy/ClangTidyDiagnosticConsumer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,7 @@ void ClangTidyDiagnosticConsumer::HandleDiagnostic(
380380
++Context.Stats.ErrorsIgnoredNOLINT;
381381
// Ignored a warning, should ignore related notes as well
382382
LastErrorWasIgnored = true;
383+
Context.DiagEngine->Clear();
383384
for (const auto &Error : SuppressionErrors)
384385
Context.diag(Error);
385386
return;
@@ -456,6 +457,7 @@ void ClangTidyDiagnosticConsumer::HandleDiagnostic(
456457
if (Info.hasSourceManager())
457458
checkFilters(Info.getLocation(), Info.getSourceManager());
458459

460+
Context.DiagEngine->Clear();
459461
for (const auto &Error : SuppressionErrors)
460462
Context.diag(Error);
461463
}

0 commit comments

Comments
 (0)