<div dir="ltr">Nope, this behavior isn't currently implemented. I agree that it might make sense, as it is similar to how clang-format treats lambdas at the end of several other parameters.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 4:08 PM, Yavuz Nuzumlalı <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi everyone,<div><br></div><div>I'm experiencing a problem with clang-format for my code.</div><div><br></div><div>I'm using <b>ColumnLimit</b> as <b>120</b>. When I write some code like this:</div><div><br></div><div><div><i>[self testMethod:15 withBlock:^{</i></div><div><i><span style="white-space:pre-wrap">       </span>NSLog(@"asdfasdf");</i></div><div><i><span style="white-space:pre-wrap"> </span>NSLog(@"asdfasdf");</i></div><div><i><span style="white-space:pre-wrap"> </span>NSLog(@"asdfasdf");</i></div><div><i><span style="white-space:pre-wrap"> </span>NSLog(@"asdfasdf");</i></div><div><i>}]</i><i>;</i></div></div><div><i><br></i></div><div>This code would be converted to this by clang-format:</div><div><div><br></div><div><i>[self testMethod:15</i></div><div><i>       withBlock:^{</i></div><div><i><span style="white-space:pre-wrap">   </span>       NSLog(@"asdfasdf");</i></div><div><i><span style="white-space:pre-wrap">       </span>       NSLog(@"asdfasdf");</i></div><div><i><span style="white-space:pre-wrap">       </span>       NSLog(@"asdfasdf");</i></div><div><i><span style="white-space:pre-wrap">       </span>       NSLog(@"asdfasdf");</i></div><div><i><span style="white-space:pre-wrap">       </span>   }];</i></div></div><div><br></div><div>That seems wrong to me because the method call before block variable actually fits in width of 120. I guess this is because clang-format behaves above code as a single method call and assumes it as one line. But I really want to not split the method like this because it feels weird.</div><div><br></div><div>Is there a way to accomplish this with current system?</div><div><br></div><div>I put my configuration file as an attachment.</div><div><br></div><div>Best</div><div><br></div></div>
<br>_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>