Skip to content

Commit aee4cf7

Browse files
committed
fix quick OOM in FormatDiagnostic
1 parent b35bb7b commit aee4cf7

File tree

15 files changed

+174
-297
lines changed

15 files changed

+174
-297
lines changed

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

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

460-
Context.DiagEngine->Clear();
461459
for (const auto &Error : SuppressionErrors)
462460
Context.diag(Error);
463461
}

0 commit comments

Comments
 (0)