This is an archive of the discontinued LLVM Phabricator instance.

[clang-format] Don't allow newline after uppercase Obj-C block return types
ClosedPublic

Authored by ksuther on Dec 18 2015, 8:14 AM.

Details

Reviewers
djasper
Summary

Fixes the following:

BOOL (^aaa)(void) = ^BOOL {
};

The first BOOL's token was getting set to TT_FunctionAnnotationRParen incorrectly, which was causing an unexpected newline after (^aaa). This was introduced in r245846.

Diff Detail

Event Timeline

ksuther updated this revision to Diff 43230.Dec 18 2015, 8:14 AM
ksuther retitled this revision from to Don't allow newline after uppercase Obj-C block return types.
ksuther updated this object.
ksuther added a reviewer: djasper.
ksuther added a subscriber: cfe-commits.
ksuther retitled this revision from Don't allow newline after uppercase Obj-C block return types to [clang-format] Don't allow newline after uppercase Obj-C block return types.Dec 18 2015, 8:15 AM

This patch got buried, giving it a bump to see if anyone can take a look at it.

djasper accepted this revision.Mar 1 2016, 3:40 PM
djasper edited edge metadata.

Sorry for the delayed reply. I think this looks good.

This revision is now accepted and ready to land.Mar 1 2016, 3:40 PM

Thank you! I don't have commit access, so could this be committed by someone who does?

ksuther updated this revision to Diff 68930.Aug 22 2016, 4:41 PM
ksuther edited edge metadata.

This was accepted a few months ago but it got buried and was never committed. The diff has been updated so that it can be committed cleanly.

Looks like patch was not committed.

Ah, sorry for dropping this on the floor :(.

May I nonetheless ask you to add a test (unittests/Format/FormatTest.cpp)?

ksuther updated this revision to Diff 72578.Sep 26 2016, 3:24 PM

Added a unit test.

djasper closed this revision.Sep 26 2016, 3:28 PM

Committed as r282448.