Page MenuHomePhabricator

[clang-format/ObjC] Prohibit breaking after a bracket opening ObjC method expression
ClosedPublic

Authored by jolesiak on Jun 28 2018, 5:57 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

jolesiak created this revision.Jun 28 2018, 5:57 AM
jolesiak edited the summary of this revision. (Show Details)Jun 28 2018, 6:29 AM
jolesiak added reviewers: benhamilton, klimek.
benhamilton requested changes to this revision.Jun 28 2018, 8:26 AM

Can you add a test, please?

This revision now requires changes to proceed.Jun 28 2018, 8:26 AM

Can you add a test, please?

The test could look like:

aaaaa = [a aa:aa
           aa:aa];

with appropriate column limit.
Right now, however, this would be formatted:

aaaaa =
    [a aa:aa aa:aa];

This behavior is improved in D48719. To avoid adding

aaaaa =
    [a aa:aa aa:aa];

test in this change and changing it to:

aaaaa = [a aa:aa
           aa:aa];

in D48719 I decided to omit it altogether in this change.

Sorry for the confusion. If you prefer me to add this test and modify in later commit I'll do it.

benhamilton accepted this revision.Jul 2 2018, 10:01 AM

Sorry for the confusion. If you prefer me to add this test and modify in later commit I'll do it.

I see. Just mentioning what you did in the diff description is probably OK.

This revision is now accepted and ready to land.Jul 2 2018, 10:01 AM
jolesiak retitled this revision from [clang-format] Prohibit breaking after a bracket opening ObjC method expression to [clang-format/ObjC] Prohibit breaking after a bracket opening ObjC method expression.Jul 2 2018, 11:58 PM
jolesiak edited the summary of this revision. (Show Details)
jolesiak edited the summary of this revision. (Show Details)Jul 3 2018, 12:01 AM
This revision was automatically updated to reflect the committed changes.