klimek added inline comments.
================ Comment at: include/clang/Format/Format.h:891 + /// \endcode + bool BreakBeforeLambdaBody; + ---------------- I'd just make that default for Allman style. ================ Comment at: lib/Format/TokenAnnotator.cpp:2844 if (isAllmanBrace(Left) || isAllmanBrace(Right)) - return (Line.startsWith(tok::kw_enum) && Style.BraceWrapping.AfterEnum) || + return (Line.containsBefore(Right, TT_LambdaLSquare) && Style.BreakBeforeLambdaBody) || + (Line.startsWith(tok::kw_enum) && Style.BraceWrapping.AfterEnum) || ---------------- Instead of parsing the whole line again, which can lead to false positives, you can add a TokenType for LambdaLBrace while parsing and use that here. Repository: rC Clang https://reviews.llvm.org/D44609 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits