This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Fix BraceWrapping AfterFunction for ObjC methods
ClosedPublic

Authored by hultman on Oct 12 2018, 7:33 AM.

Details

Summary

clang-format --version
clang-format version 7.0.0 (tags/RELEASE_700/final)
echo "@implementation Foo\n- (void)foo:(id)bar\n{\n}\n@end\n" |clang-format -style='{BreakBeforeBraces: Custom, BraceWrapping: {AfterFunction: true}}'

@implementation Foo
- (void)foo:(id)bar {
}
@end

with patch:

bin/clang-format --version
clang-format version 8.0.0 (trunk 344285)
echo "@implementation Foo\n- (void)foo:(id)bar\n{\n}\n@end\n" |bin/clang-format -style='{BreakBeforeBraces: Custom, BraceWrapping: {AfterFunction: true}}'

@implementation Foo
- (void)foo:(id)bar
{
}
@end

Diff Detail

Repository
rC Clang

Event Timeline

hultman created this revision.Oct 12 2018, 7:33 AM

This bug was introduced in revision 333553, authored by benhamilton, reviewed by jolesiak, klimek.

benhamilton accepted this revision.Oct 12 2018, 8:11 AM

Thanks!

This revision is now accepted and ready to land.Oct 12 2018, 8:11 AM

@benhamilton Could you land this patch?

This revision was automatically updated to reflect the committed changes.

@benhamilton Could you land this patch?

Done. Thanks for your contribution!