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

MyDeveloperDay via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 2 23:57:02 PST 2019


MyDeveloperDay requested changes to this revision.
MyDeveloperDay added a comment.
This revision now requires changes to proceed.

I can tell from https://zed0.co.uk/clang-format-configurator/ that it's not possible to get it to the form you suggested, I'm not opposed to accepting this, I'm just not an ObjectiveC person so I haven't used clang-format on code like this, I just don't want to break others

requesting changes due to removed line?



================
Comment at: clang/lib/Format/ContinuationIndenter.cpp:869
       State.Stack[i].BreakBeforeParameter = true;
 
   if (PreviousNonComment &&
----------------
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.


================
Comment at: clang/lib/Format/Format.cpp:794
   LLVMStyle.ObjCBinPackProtocolList = FormatStyle::BPS_Auto;
-  LLVMStyle.ObjCBlockIndentWidth = 2;
   LLVMStyle.ObjCSpaceAfterProperty = false;
----------------
did you mean to remove this line?


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