[PATCH] D72826: [clangd] Make output order of allTargetDecls deterministic
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 16 05:51:24 PST 2020
kadircet added inline comments.
================
Comment at: clang-tools-extra/clangd/FindTarget.cpp:224
+ using ValTy = std::pair<const NamedDecl *, RelSet>;
+ llvm::SmallVector<ValTy, 1> Result;
+ for (const auto &Elem : Decls)
----------------
sammccall wrote:
> no need for lookups I think
> ```
> Result.resize(Decls.size());
> for (auto& Elem : Decls)
> Result[Elem.second.second] = {Elem.first, Elem.second.first};
> ```
ah right, sorry I was in a rush :/
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72826/new/
https://reviews.llvm.org/D72826
More information about the cfe-commits
mailing list