This is an archive of the discontinued LLVM Phabricator instance.

[clang-format/ObjC] Put ObjC method arguments into one line when they fit
ClosedPublic

Authored by jolesiak on Jun 28 2018, 6:20 AM.

Details

Summary

Reapply: D47195

Diff Detail

Event Timeline

jolesiak created this revision.Jun 28 2018, 6:20 AM
jolesiak edited the summary of this revision. (Show Details)Jun 28 2018, 6:32 AM
jolesiak added reviewers: benhamilton, klimek.
benhamilton accepted this revision.Jun 29 2018, 12:58 PM
benhamilton added inline comments.
lib/Format/ContinuationIndenter.cpp
1411

Should we check if State.Stack.back().BreakBeforeParameter is true before doing any of this?

This revision is now accepted and ready to land.Jun 29 2018, 12:58 PM
jolesiak updated this revision to Diff 153705.Jul 2 2018, 6:43 AM

Improve condition.

jolesiak marked an inline comment as done.Jul 2 2018, 6:46 AM
jolesiak added inline comments.
lib/Format/ContinuationIndenter.cpp
1411

I think that performance-wise it wouldn't be worth adding.
However, as this section is about "reevaluation" I think it's better to add this check, as what we mean is really "If we decided earlier that breaks are necessary, check once again".

jolesiak marked an inline comment as done.Jul 2 2018, 6:46 AM
jolesiak retitled this revision from [clang-format] Put ObjC method arguments into one line when they fit to [clang-format/ObjC] Put ObjC method arguments into one line when they fit.Jul 3 2018, 12:03 AM
jolesiak closed this revision.Jul 10 2018, 10:46 PM

This change was submitted (for some reason (probably some rebase operations) it was not automatically connected to the commit):
rC336521, rL336521.