Page MenuHomePhabricator

[clang-format] Fix ObjC method indent after f7f9f94b
ClosedPublic

Authored by krasimir on Mar 22 2021, 3:11 AM.

Details

Summary

Commit f7f9f94b
changed the indent of ObjC method arguments from +4 to +2, if the method
occurs after a block statement. I believe this was unintentional and there
was insufficient ObjC test coverage to catch this.

Example: clang-format -style=google test.mm

before f7f9f94b:

void aaaaaaaaaaaaaaaaaaaaa(int c) {
  if (c) {
    f();
  }
  [dddddddddddddddddddddddddddddddddddddddddddddddddddddddd
      eeeeeeeeeeeeeeeeeeeeeeeeeeeee:^(fffffffffffffff gggggggg) {
        f(SSSSS, c);
      }];
}

after f7f9f94b:

void aaaaaaaaaaaaaaaaaaaaa(int c) {
  if (c) {
    f();
  }
  [dddddddddddddddddddddddddddddddddddddddddddddddddddddddd
    eeeeeeeeeeeeeeeeeeeeeeeeeeeee:^(fffffffffffffff gggggggg) {
      f(SSSSS, c);
    }];
}

Diff Detail

Event Timeline

krasimir requested review of this revision.Mar 22 2021, 3:11 AM
krasimir created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptMar 22 2021, 3:11 AM
Herald added a subscriber: cfe-commits. · View Herald Transcript
krasimir edited the summary of this revision. (Show Details)Mar 22 2021, 3:20 AM
krasimir edited the summary of this revision. (Show Details)
krasimir edited reviewers, added: sammccall; removed: benhamilton.Mar 22 2021, 4:36 AM
benhamilton accepted this revision.Mar 24 2021, 7:40 AM

Thank you!

This revision is now accepted and ready to land.Mar 24 2021, 7:40 AM
MyDeveloperDay accepted this revision.Mar 24 2021, 10:29 AM
MyDeveloperDay added a project: Restricted Project.
This revision was automatically updated to reflect the committed changes.