[clang-tools-extra] bd253a6 - [clangd] Fix -Wunused-variable of 'FIDIt' (NFC)
Jie Fu via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 19 07:01:17 PDT 2023
Author: Jie Fu
Date: 2023-07-19T21:59:53+08:00
New Revision: bd253a6a039937fbd0f2ba1f7dd5338a2920e24d
URL: https://github.com/llvm/llvm-project/commit/bd253a6a039937fbd0f2ba1f7dd5338a2920e24d
DIFF: https://github.com/llvm/llvm-project/commit/bd253a6a039937fbd0f2ba1f7dd5338a2920e24d.diff
LOG: [clangd] Fix -Wunused-variable of 'FIDIt' (NFC)
/data/llvm-project/clang-tools-extra/clangd/index/SymbolCollector.cpp:878:16: error: unused variable 'FIDIt' [-Werror,-Wunused-variable]
const auto FIDIt = IncludeFiles.find(SID);
^
1 error generated.
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 5389a0e31b81bb..214991a0674cc6 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.
More information about the cfe-commits
mailing list