[PATCH] D156452: [clang-tidy] Sort options in --dump-config
Carlos Galvez via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jul 27 10:46:21 PDT 2023
carlosgalvezp accepted this revision.
carlosgalvezp added a comment.
This revision is now accepted and ready to land.
LGTM, thanks for fixing!
================
Comment at: clang-tools-extra/clang-tidy/ClangTidyOptions.cpp:90
+ std::vector<std::pair<StringRef, StringRef>> SortedOptions;
+ SortedOptions.reserve(Options.size());
+ for (auto &Key : Options) {
----------------
PiotrZSL wrote:
> carlosgalvezp wrote:
> > I believe you can pass this directly to the constructor in the previous line, to skip the `reserve()` part.
> No, constructor takes `resize` argument, not `reserve`.
You are right!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156452/new/
https://reviews.llvm.org/D156452
More information about the cfe-commits
mailing list