[PATCH] D70926: [clang-format] Add option for not breaking line before ObjC params

Kanglei Fang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 3 13:21:22 PST 2019


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


================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:869
       State.Stack[i].BreakBeforeParameter = true;
 
   if (PreviousNonComment &&
----------------
MyDeveloperDay wrote:
> I'm a little confused by the code, this feels to me like its covering something more than a specific than just the ObjectiveC case, what is meant here by a nestedblockspecialcase? this feels like we are turning off BreakBeforeParameter by another method?
> 
> I get the code below, just wondering why this is also needed.
I think you are right, bin packing is already avoided as the comment says so I don't have to do anything extra.

Was trying to handle linebreaking within block as well. Not needed indeed.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70926/new/

https://reviews.llvm.org/D70926





More information about the cfe-commits mailing list