[PATCH] D129466: [clang-format][NFC] Replace most of std::vector with SmallVector

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 15 01:18:42 PDT 2022


owenpan added inline comments.


================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:40
 static unsigned getLengthToMatchingParen(const FormatToken &Tok,
-                                         const std::vector<ParenState> &Stack) {
+                                         const SmallVector<ParenState> &Stack) {
   // Normally whether or not a break before T is possible is calculated and
----------------
curdeius wrote:
> Sorry for a late comment. I think that in a parameter list, we should use `SmallVectorBase` to avoid changing the type if the inplace element count changes. That's not important now though.
Hmm. I can't find an example of `SmallVectorBase` in llvm-project sources, though.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129466/new/

https://reviews.llvm.org/D129466



More information about the cfe-commits mailing list