clang-format: AllowAllArgumentsOnNextLine/AllowAllParametersOfDeclarationOnNextLine applied to template arguments/parameters

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

clang-format: AllowAllArgumentsOnNextLine/AllowAllParametersOfDeclarationOnNextLine applied to template arguments/parameters

Kristof Beyls via cfe-dev
Dear Clang Developers,

Please, redirect me if it is not the right place for the question below.

If I interpret the documentation correctly AllowAllArgumentsOnNextLine and AllowAllParametersOfDeclarationOnNextLine
are only applied to function calls and function declarations respectively.

From this perspective I find templates (both function and class) very similar to normal functions.

Therefore, I just wanted to ask if it was ever considered to have similar functionality for templates by having
something like AllowAllTemplateArgumentsOnNextLine and AllowAllTemplateParametersOfDeclarationOnNextLine
to control the behavior in the following cases:

true:
callFunctionTemplate<
    a, b, c, d>();
callClassTemplateStaticMethod<
    a, b, c, d>::functionCall();

false:
callFunctionTemplate<a,
                                     b,
                                     c,
                                     d>();
callClassTemplateStaticMethod<a
                                                     b,
                                                     c,
                                                     d>::functionCall()

If it makes sense, may I consider this as a feature request please?

Thanks in advance.

Kind regards,
Marat

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev