[clang] 0e039fc - [APINotes] Use DenseMap::contains (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 22 14:23:31 PST 2023


Author: Kazu Hirata
Date: 2023-12-22T14:23:25-08:00
New Revision: 0e039fc39e29320c9a0eeadb34a5e83ac51d48ba

URL: https://github.com/llvm/llvm-project/commit/0e039fc39e29320c9a0eeadb34a5e83ac51d48ba
DIFF: https://github.com/llvm/llvm-project/commit/0e039fc39e29320c9a0eeadb34a5e83ac51d48ba.diff

LOG: [APINotes] Use DenseMap::contains (NFC)

Added: 
    

Modified: 
    clang/lib/APINotes/APINotesManager.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/APINotes/APINotesManager.cpp b/clang/lib/APINotes/APINotesManager.cpp
index a921c8b9fce3e0..d3aef09dac9105 100644
--- a/clang/lib/APINotes/APINotesManager.cpp
+++ b/clang/lib/APINotes/APINotesManager.cpp
@@ -125,7 +125,7 @@ APINotesManager::loadAPINotes(StringRef Buffer) {
 
 bool APINotesManager::loadAPINotes(const DirectoryEntry *HeaderDir,
                                    FileEntryRef APINotesFile) {
-  assert(Readers.find(HeaderDir) == Readers.end());
+  assert(!Readers.contains(HeaderDir));
   if (auto Reader = loadAPINotes(APINotesFile)) {
     Readers[HeaderDir] = Reader.release();
     return false;


        


More information about the cfe-commits mailing list