[msan] Advance before destroying entry

-fsanitize-memory-use-after-dtor reports this memory access.
This commit is contained in:
Vitaly Buka 2022-04-19 16:22:37 -07:00
parent 153dee34f1
commit 0d0a99cb96
1 changed files with 2 additions and 2 deletions

View File

@ -434,8 +434,8 @@ void PathDiagnosticConsumer::FlushDiagnostics(
}
PathDiagnosticConsumer::FilesMade::~FilesMade() {
for (PDFileEntry &Entry : Set)
Entry.~PDFileEntry();
for (auto It = Set.begin(); It != Set.end();)
(It++)->~PDFileEntry();
}
void PathDiagnosticConsumer::FilesMade::addDiagnostic(const PathDiagnostic &PD,