[PATCH] D48720: [clang-format] Put ObjC method arguments into one line when they fit

Jacek Olesiak via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 2 06:46:37 PDT 2018


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


================
Comment at: lib/Format/ContinuationIndenter.cpp:1411
+  // line).
+  if (Current.MatchingParen && Current.MatchingParen->Previous) {
+    const FormatToken &CurrentScopeOpener = *Current.MatchingParen->Previous;
----------------
benhamilton wrote:
> Should we check if `State.Stack.back().BreakBeforeParameter` is `true` before doing any of this?
I think that performance-wise it wouldn't be worth adding.
However, as this section is about "reevaluation" I think it's better to add this check, as what we mean is really "If we decided earlier that breaks are necessary, check once again".


Repository:
  rC Clang

https://reviews.llvm.org/D48720





More information about the cfe-commits mailing list