[NFC] Minor fix for deferred diagnostics emitter

Differential Revision: https://reviews.llvm.org/D77028
This commit is contained in:
Yaxun (Sam) Liu 2020-04-06 13:52:47 -04:00
parent 2c5d6dfda9
commit 77e2493602
1 changed files with 1 additions and 2 deletions

View File

@ -1555,7 +1555,7 @@ public:
emitDeferredDiags(FD, Caller);
// Do not revisit a function if the function body has been completely
// visited before.
if (Done.count(FD))
if (!Done.insert(FD).second)
return;
InUsePath.insert(FD);
UsePath.push_back(FD);
@ -1564,7 +1564,6 @@ public:
}
UsePath.pop_back();
InUsePath.erase(FD);
Done.insert(FD);
}
void checkRecordedDecl(Decl *D) {