oleg.smolsky added a comment.

@djasper @klimek could you chime in please? This patch strives to cleanup a 
quirk in lambda formatting which pushes code too far to the right. Here is the 
problematic case:

  void f() {
    something.something.something.Method(some_arg,
                                         [] {
                                             // the code here incurs
                                             // excessive wrapping
                                             // such as
                                             Method(
                                                 some_med_arg,
                                                 some_med_arg);
                                             some_var =
                                                 some_expr + something;
                                        });

Here everything is technically correct, yet the code looks bad due to excessive 
wrapping. Things look a lot better when the lambda body starts from a new line, 
which happens already in some cases. The patch this "from the next line" onto a 
few more cases.

The full discussion of the cases with @krasimir is above.

Thanks!


Repository:
  rC Clang

https://reviews.llvm.org/D52676



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to