Typz added inline comments.
================
Comment at: lib/Format/UnwrappedLineParser.cpp:1130
+ if (FormatTok->Tok.is(tok::l_brace)) {
+ if (Style.BraceWrapping.AfterObjCDeclaration)
+ addUnwrappedLine();
----------------
Wondering if formatting with this style is appropriate: the clang-format doc
points in that direction, but it seems to me both `@synchronized` and
`@autoreleasepool` are more akin to "control statements".
For consistency (esp. in ObjC++ code), as a user, I would tend to have these
blocks indented like control statements while interfaces/implementations blocks
would be indented like classes/structs.
So maybe it would be better to introduce a new BraceWrapping style
'AfterObjCSpecialBlock` to control these cases, matching the possibilities that
are given for control statements vs classes. What do you think?
Repository:
rC Clang
https://reviews.llvm.org/D43114
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits