[PATCH] D60374: clang-format incorrectly indents wrapped closing parenthesis
Owen Pan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Apr 7 12:52:30 PDT 2019
owenpan planned changes to this revision.
owenpan added inline comments.
================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:968
if (Current.is(tok::r_paren) && State.Stack.size() > 1 &&
- (!Current.Next || Current.Next->isOneOf(tok::semi, tok::l_brace)))
+ (!Current.Next || Current.Next->isOneOf(tok::semi, tok::colon,
+ tok::kw_const, tok::l_brace)))
----------------
MyDeveloperDay wrote:
> Do you think the colon you have here in your example is really a TT_CtorInitializerColon, I'm not sure if you need to be specific?
>
> I wonder how this might interfere with the Style.BreakConstructorInitializers, I'm a little unclear of the before and after you are trying to fix, could you add something to the description to help me understand?
Good point with using TT_CtorInitializerColon instead!
Although I had tested it with different combinations of Style.BreakConstructorInitializers settings and didn't find any interference, it's probably not an inconsistency in the case of the colon based on your and @klimek's comments.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60374/new/
https://reviews.llvm.org/D60374
More information about the cfe-commits
mailing list