krasimir added a comment.

Digging a bit further, seems like the behavior you're looking for could be 
achieved by setting the `AlignAfterOpenBracket` option to `DontAlign` or 
`AlwaysBreak`:

  % clang-format -style='{BasedOnStyle: google, AlignAfterOpenBracket: 
AlwaysBreak}' test.cc
  void f() {
    something->Method2s(
        1,
        [this] {
          Do1();
          Do2();
        },
        1);
  }
  % clang-format -style='{BasedOnStyle: google, AlignAfterOpenBracket: 
DontAlign}' test.cc
  void f() {
    something->Method2s(1,
        [this] {
          Do1();
          Do2();
        },
        1);
  }

Does this work for you?

I don't think modifying the behavior as posed in this change based on the 
existence of multiline lambdas and the value of the `BinPackArguments` option 
is better than what we have now, especially when `AlignAfterOpenBracket=Align`.


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