[clang-include-fixer] Pre-reserve vector size. NFC

This commit is contained in:
Sam McCall 2021-02-03 08:30:45 +01:00
parent cdc60a3b9a
commit 08274d7d5d
1 changed files with 1 additions and 0 deletions

View File

@ -149,6 +149,7 @@ SymbolIndexManager::search(llvm::StringRef Identifier,
rank(MatchedSymbols, FileName);
// Strip signals, they are no longer needed.
std::vector<SymbolInfo> Res;
Res.reserve(MatchedSymbols.size());
for (auto &SymAndSig : MatchedSymbols)
Res.push_back(std::move(SymAndSig.Symbol));
return Res;