jolesiak added a comment.
Nice! That looks very promising.
It still fails when we pass a longer range (maybe mimicking `PreviousRBrace`
will help), e.g.:
Base code:
@protocol A
@optional
// comment
- (void)f;
@end
MACRO
formatted with `clang-format -lines=3:6 file.m` gives:
@pr
acoomans added a comment.
@jolesiak let me know what you think
Repository:
rC Clang
https://reviews.llvm.org/D50535
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
acoomans added a comment.
I probably don't need a unit test AND a lit test, but I'm unsure which one is
best here. Any suggestion?
Comment at: lib/Format/UnwrappedLineFormatter.cpp:1045-1047
+if (TheLine.First->Next &&
TheLine.First->Next->Tok.isObjCAtKeyword(tok::objc_en
acoomans created this revision.
acoomans added a reviewer: cfe-commits.
ObjC scopes gets formatted beyond the `@end` directive, when formatting
specific lines (`clang-format -lines=x:x`).
This changeset fixes formatting of `@end` the same way that `r_braces` are.
Repository:
rC Clang
https: