This is an archive of the discontinued LLVM Phabricator instance.

Fix ClangFormat issue of recognizing ObjC subscript as C++ attributes when message target is a result of a C-style method.
ClosedPublic

Authored by Wizard on Nov 8 2018, 6:41 PM.

Details

Summary

The issue is that for array subscript like:

arr[[Foo() bar]];

ClangFormat will recognize it as C++11 attribute syntax and put a space between 'arr' and first '[', like:

arr [[Foo() bar]];

Now it is fixed. Tested with:

ninja FormatTests

Diff Detail

Event Timeline

Wizard created this revision.Nov 8 2018, 6:41 PM
Wizard retitled this revision from Fix ClangFormat issue of recognizing ObjC subscription as C++ attributes when message target is a result of a C-style method. to Fix ClangFormat issue of recognizing ObjC subscript as C++ attributes when message target is a result of a C-style method..Nov 8 2018, 6:46 PM
Wizard edited the summary of this revision. (Show Details)
Wizard added a reviewer: benhamilton.
Wizard updated this revision to Diff 173258.Nov 8 2018, 6:49 PM

remove blank lines

benhamilton accepted this revision.Nov 9 2018, 3:05 PM
This revision is now accepted and ready to land.Nov 9 2018, 3:05 PM
This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.