[PATCH] D153205: [clang-format] Support block indenting array/struct list initializers
Gedare Bloom via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jul 5 09:55:05 PDT 2023
gedare requested review of this revision.
gedare marked 8 inline comments as done.
gedare added inline comments.
================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:365-367
+ (Current.is(tok::r_brace) && Style.Cpp11BracedListStyle &&
+ Current.MatchingParen->isOneOf(BK_BracedInit, BK_ListInit) &&
+ Style.AlignAfterOpenBracket == FormatStyle::BAS_BlockIndent))) {
----------------
owenpan wrote:
> And `isBlockIndentedInitRBrace()` returns true only if the matching `l_brace` is of `BK_BracedInit` or preceded by an `=`.
yes, this works nicely. thanks for spotting it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153205/new/
https://reviews.llvm.org/D153205
More information about the cfe-commits
mailing list