[clang] 77e2493 - [NFC] Minor fix for deferred diagnostics emitter
Yaxun Liu via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 6 11:03:18 PDT 2020
Author: Yaxun (Sam) Liu
Date: 2020-04-06T14:01:41-04:00
New Revision: 77e24936022add9e5a0b4ff3db99148c96d113af
URL: https://github.com/llvm/llvm-project/commit/77e24936022add9e5a0b4ff3db99148c96d113af
DIFF: https://github.com/llvm/llvm-project/commit/77e24936022add9e5a0b4ff3db99148c96d113af.diff
LOG: [NFC] Minor fix for deferred diagnostics emitter
Differential Revision: https://reviews.llvm.org/D77028
Added:
Modified:
clang/lib/Sema/Sema.cpp
Removed:
################################################################################
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index ff184aa7f48d..6c1666162c81 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -1555,7 +1555,7 @@ class DeferredDiagnosticsEmitter
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 @@ class DeferredDiagnosticsEmitter
}
UsePath.pop_back();
InUsePath.erase(FD);
- Done.insert(FD);
}
void checkRecordedDecl(Decl *D) {
More information about the cfe-commits
mailing list