Wawha added a comment.

I'm not working on a public project with a public style guide, so not sure it 
will fit all the requirement inside. But perhaps the request of Rian for 
bareflank (https://bugs.llvm.org//show_bug.cgi?id=32151#c4) could help to fit 
the needs.

The current patch do not exactly do what he ask, but like you say, it's not 
easy to find all options or one options to match lambda formatting.

In my case, the main requirement is to be able **avoid** a lambda in one line. 
It's not easy to manage, when you put a breakpoint on a such line. It could 
break when the function taking the lambda in arg is call, or when the lambda 
body is executed. Which very annoying for debugging.
As example:

  return something([] ()  { somethingelse(); }); // Breakpoint one this line 
will break when calling something() AND somethingelse()

For the moment, there is no way to format is code in another way. We could have 
this possibilities:

  return something(
       [] ()


  return something([] ()  {


  return something(
       [] ()  {

The current patch are able to manage the first case, and I'm agree it make 
sense in allman option. So I'm ok to have it by default for allman.

  rC Clang


cfe-commits mailing list

Reply via email to