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