This revision was automatically updated to reflect the committed changes.
Closed by commit rL326191: clang-format: fix formatting of ObjC @synchronized
blocks (authored by Typz, committed by ).
Herald added a subscriber: llvm-commits.
Changed prior to commit:
https://reviews.llvm.org/D43114?vs=
Typz marked an inline comment as done.
Typz added inline comments.
Comment at: unittests/Format/FormatTestObjC.cpp:193-198
+ verifyFormat("@synchronized(self) {\n"
+ " f();\n"
+ "}\n"
+ "@synchronized(self) {\n"
+ " f();\
benhamilton accepted this revision.
benhamilton added a comment.
This revision is now accepted and ready to land.
Just a question on the test.
Comment at: unittests/Format/FormatTestObjC.cpp:193-198
+ verifyFormat("@synchronized(self) {\n"
+ " f();\n"
+
Typz marked 4 inline comments as done.
Typz added inline comments.
Comment at: lib/Format/UnwrappedLineParser.cpp:1130
+if (FormatTok->Tok.is(tok::l_brace)) {
+ if (Style.BraceWrapping.AfterObjCDeclaration)
+addUnwrappedLine();
benham
benhamilton added inline comments.
Comment at: lib/Format/UnwrappedLineParser.cpp:1130
+if (FormatTok->Tok.is(tok::l_brace)) {
+ if (Style.BraceWrapping.AfterObjCDeclaration)
+addUnwrappedLine();
Typz wrote:
> benhamilton wrote:
> > T
Typz added inline comments.
Comment at: lib/Format/UnwrappedLineParser.cpp:1130
+if (FormatTok->Tok.is(tok::l_brace)) {
+ if (Style.BraceWrapping.AfterObjCDeclaration)
+addUnwrappedLine();
benhamilton wrote:
> Typz wrote:
> > Wonderin
benhamilton added inline comments.
Comment at: lib/Format/UnwrappedLineParser.cpp:1130
+if (FormatTok->Tok.is(tok::l_brace)) {
+ if (Style.BraceWrapping.AfterObjCDeclaration)
+addUnwrappedLine();
Typz wrote:
> Wondering if formatting
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 ap
Typz created this revision.
Typz added reviewers: krasimir, djasper, klimek.
The blocks used to be formatted using the "default" behavior, and would
thus be mistaken for function calls followed by blocks: this could lead
to unexpected inlining of the block and extra line-break before the
opening b