[clang-tools-extra] 0d661e9 - [clangd] Use DenseMap::contains (NFC)

Kazu Hirata via cfe-commits cfe-commits at lists.llvm.org
Sat Oct 14 22:11:17 PDT 2023


Author: Kazu Hirata
Date: 2023-10-14T22:11:09-07:00
New Revision: 0d661e965ad1a54e46317f38677bd88875bfcf1d

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

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

Added: 
    

Modified: 
    clang-tools-extra/clangd/index/SymbolCollector.cpp

Removed: 
    


################################################################################
diff  --git a/clang-tools-extra/clangd/index/SymbolCollector.cpp b/clang-tools-extra/clangd/index/SymbolCollector.cpp
index 74aca9b99c8a584..aac6676a995fedf 100644
--- a/clang-tools-extra/clangd/index/SymbolCollector.cpp
+++ b/clang-tools-extra/clangd/index/SymbolCollector.cpp
@@ -893,7 +893,7 @@ void SymbolCollector::finish() {
     const Symbol *S = Symbols.find(SID);
     if (!S)
       continue;
-    assert(IncludeFiles.find(SID) != IncludeFiles.end());
+    assert(IncludeFiles.contains(SID));
 
     const auto FID = IncludeFiles.at(SID);
     // Determine if the FID is #include'd or #import'ed.


        


More information about the cfe-commits mailing list