This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Set ObjCBinPackProtocolList to Never for google style
ClosedPublic

Authored by benhamilton on Jan 30 2018, 1:56 PM.

Details

Summary

This is split off from D42650, and sets ObjCBinPackProtocolList
to Never for the google style.

Depends On D42650

Test Plan: New tests added. make -j12 FormatTests && ./tools/clang/unittests/Format/FormatTests

Diff Detail

Event Timeline

benhamilton created this revision.Jan 30 2018, 1:56 PM
jolesiak added inline comments.Jan 31 2018, 1:03 AM
lib/Format/Format.cpp
765

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).

Move to general property section

benhamilton marked an inline comment as done.Jan 31 2018, 8:39 AM
benhamilton added inline comments.
lib/Format/Format.cpp
765

Done. It looked like all the modifications were alphabetized, so I moved it between GoogleStyle.AlwaysBreakTemplateDeclarations and GoogleStyle.ConstructorInitializerAllOnOneLineOrOnePerLine.

benhamilton marked an inline comment as done.
  • BinPackObjCProtocolList -> ObjCBinPackProtocolList
benhamilton retitled this revision from [clang-format] Set BinPackObjCProtocolList to Never for google style to [clang-format] Set ObjCBinPackProtocolList to Never for google style.Jan 31 2018, 8:45 AM
benhamilton edited the summary of this revision. (Show Details)
benhamilton added inline comments.
lib/Format/Format.cpp
765

Actually, on second thought, I've just renamed it to ObjCBinPackProtocolList.

Fix comment.

krasimir accepted this revision.Feb 1 2018, 5:40 AM
This revision is now accepted and ready to land.Feb 1 2018, 5:40 AM
jolesiak accepted this revision.Feb 5 2018, 1:28 AM

I believe that I have consensus from Google to be able to approve this. I sent out a last call for dissenting opinions. If I don't hear anything I plan on approving tomorrow.

stephanemoore accepted this revision.Feb 7 2018, 4:07 PM

Pretty unanimous from the Google style arbitration side. Looks good to me.

This revision was automatically updated to reflect the committed changes.