diff --git a/clang/lib/Format/ContinuationIndenter.h b/clang/lib/Format/ContinuationIndenter.h --- a/clang/lib/Format/ContinuationIndenter.h +++ b/clang/lib/Format/ContinuationIndenter.h @@ -434,7 +434,7 @@ /// A stack keeping track of properties applying to parenthesis /// levels. - std::vector Stack; + SmallVector Stack; /// Ignore the stack of \c ParenStates for state comparison. /// diff --git a/clang/lib/Format/ContinuationIndenter.cpp b/clang/lib/Format/ContinuationIndenter.cpp --- a/clang/lib/Format/ContinuationIndenter.cpp +++ b/clang/lib/Format/ContinuationIndenter.cpp @@ -37,7 +37,7 @@ // Returns the length of everything up to the first possible line break after // the ), ], } or > matching \c Tok. static unsigned getLengthToMatchingParen(const FormatToken &Tok, - const std::vector &Stack) { + const SmallVector &Stack) { // Normally whether or not a break before T is possible is calculated and // stored in T.CanBreakBefore. Braces, array initializers and text proto // messages like `key: < ... >` are an exception: a break is possible diff --git a/clang/lib/Format/Format.cpp b/clang/lib/Format/Format.cpp --- a/clang/lib/Format/Format.cpp +++ b/clang/lib/Format/Format.cpp @@ -2386,7 +2386,7 @@ tooling::Replacements generateFixes() { tooling::Replacements Fixes; - std::vector Tokens; + SmallVector Tokens; std::copy(DeletedTokens.begin(), DeletedTokens.end(), std::back_inserter(Tokens)); @@ -2580,7 +2580,7 @@ StringRef Identifier; StringRef Text; unsigned Offset; - std::vector AssociatedCommentLines; + SmallVector AssociatedCommentLines; bool IsStatic; }; @@ -2983,7 +2983,7 @@ llvm::Regex ImportRegex(JavaImportRegexPattern); SmallVector Matches; SmallVector ImportsInBlock; - std::vector AssociatedCommentLines; + SmallVector AssociatedCommentLines; bool FormattingOff = false; diff --git a/clang/lib/Format/FormatToken.cpp b/clang/lib/Format/FormatToken.cpp --- a/clang/lib/Format/FormatToken.cpp +++ b/clang/lib/Format/FormatToken.cpp @@ -264,7 +264,7 @@ // We can never place more than ColumnLimit / 3 items in a row (because of the // spaces and the comma). unsigned MaxItems = Style.ColumnLimit / 3; - std::vector MinSizeInColumn; + SmallVector MinSizeInColumn; MinSizeInColumn.reserve(MaxItems); for (unsigned Columns = 1; Columns <= MaxItems; ++Columns) { ColumnFormat Format; diff --git a/clang/lib/Format/Macros.h b/clang/lib/Format/Macros.h --- a/clang/lib/Format/Macros.h +++ b/clang/lib/Format/Macros.h @@ -128,7 +128,7 @@ const FormatStyle &Style; llvm::SpecificBumpPtrAllocator &Allocator; IdentifierTable &IdentTable; - std::vector> Buffers; + SmallVector> Buffers; llvm::StringMap Definitions; }; diff --git a/clang/lib/Format/UnwrappedLineFormatter.cpp b/clang/lib/Format/UnwrappedLineFormatter.cpp --- a/clang/lib/Format/UnwrappedLineFormatter.cpp +++ b/clang/lib/Format/UnwrappedLineFormatter.cpp @@ -1132,7 +1132,7 @@ typedef std::pair QueueItem; /// The BFS queue type. - typedef std::priority_queue, + typedef std::priority_queue, std::greater> QueueType;