[PATCH] D46519: [clang-format] Respect BreakBeforeClosingBrace while calculating length

Krasimir Georgiev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue May 8 06:17:36 PDT 2018


krasimir marked an inline comment as done.
krasimir added inline comments.


================
Comment at: lib/Format/ContinuationIndenter.cpp:93
+      break;
+    if (End->Next->is(tok::r_brace)) {
+      const ParenState *State = FindParenState(End->Next->MatchingParen);
----------------
djasper wrote:
> I r_brace enough? Do we have something similar for TT_ArrayInitializer? I'd look at usages of BreakBeforeClosingBrace to determine.
Thanks! Based on:
https://github.com/llvm-mirror/clang/blob/bf81db4ab70b45a77fba0d9f7d43190f1ad91bb9/lib/Format/ContinuationIndenter.cpp#L804
I've added also cases for array `[`-s and text proto `<`-s and updated comments.


Repository:
  rC Clang

https://reviews.llvm.org/D46519





More information about the cfe-commits mailing list