[PATCH] D42708: [clang-format] Set ObjCBinPackProtocolList to Never for google style

Ben Hamilton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 31 08:45:56 PST 2018


benhamilton added inline comments.


================
Comment at: lib/Format/Format.cpp:765
     GoogleStyle.ColumnLimit = 100;
+    GoogleStyle.BinPackObjCProtocolList = FormatStyle::BPS_Never;
   }
----------------
benhamilton wrote:
> jolesiak wrote:
> > If I understand correctly this is meant to be ObjC-specific flag. I feel like this should be put in general config (next to GoogleStyle.ObjcSpaceAfterProperty and GoogleStyle.ObjCSpaceBeforeProtocolList; ~50 lines above).
> > To me putting it inside 'if' check means different value is used for ObjC than for other languages (what isn't the case here, as this flag shouldn't be used in formatting other languages code). 
> Done. It looked like all the modifications were alphabetized, so I moved it between `GoogleStyle.AlwaysBreakTemplateDeclarations` and `GoogleStyle.ConstructorInitializerAllOnOneLineOrOnePerLine`.
Actually, on second thought, I've just renamed it to `ObjCBinPackProtocolList`.


Repository:
  rC Clang

https://reviews.llvm.org/D42708





More information about the cfe-commits mailing list