[llvm-bugs] [Bug 40121] New: Add "AllowAllArgumentsOfCallOnNextLine" counterpart to AllowAllParametersOfDeclarationOnNextLine

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Dec 20 12:51:30 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=40121

            Bug ID: 40121
           Summary: Add "AllowAllArgumentsOfCallOnNextLine" counterpart to
                    AllowAllParametersOfDeclarationOnNextLine
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mfbz at stjernholm.org
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

For function declarations there is AllowAllParametersOfDeclarationOnNextLine
which can be set to false to produce this style together with
BinPackParameters=false:

std::string function_with_a_very_long_name(int and_,
                                           int several_,
                                           int short_,
                                           int arguments_);

std::string function2_with_a_very_long_name(
    int and_,
    int some_,
    int short_,
    int arguments_,
    int and_a_quite_long_argument_as_well_);

However there is no corresponding boolean to avoid packing all arguments on one
line in a function call, i.e. to get this style together with
BinPackArguments=false:

void f() {
  function_with_a_very_long_name(and_,
                                 several_,
                                 short_,
                                 arguments_);
  function2_with_a_very_long_name(
      and_,
      some_,
      short_,
      arguments_,
      and_a_quite_long_argument_as_well_);
}

This style is used at least in the Android Runtime project
(https://android.googlesource.com/platform/art/+/master), which is the reason
for this feature request.

Thanks!

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181220/b84dead2/attachment.html>


More information about the llvm-bugs mailing list