@@ -8143,6 +8143,39 @@ TEST_F(FormatTest, BreakFunctionDefinitionParameters) {
Input, Style);
}
+TEST_F(FormatTest, BreakFunctionDeclarationParameters) {
+ StringRef Input = "void functionDecl(paramA, paramB, paramC);\n"
+"void emptyFunction
@@ -2389,6 +2389,20 @@ struct FormatStyle {
/// \version 19
bool BreakFunctionDefinitionParameters;
+ /// If ``true``, clang-format will always break before function declaration
+ /// parameters.
+ /// \code
+ ///true:
+ ///void functionDeclaration(
+ ///
github-actions[bot] wrote:
Thank you for submitting a Pull Request (PR) to the LLVM Project!
This PR will be automatically labeled and the relevant teams will be notified.
If you wish to, you can add reviewers by using the "Reviewers" section on this
page.
If this is not working for you, it
llvmbot wrote:
@llvm/pr-subscribers-clang-format
Author: Fanteria (Fanteria)
Changes
Add a new clang-format option `BreakFunctionDeclarationParameters` to control
whether parameters in function declarations can be broken onto new lines,
similar to the existing `BreakFunctionDefinitionPar
https://github.com/Fanteria created
https://github.com/llvm/llvm-project/pull/158745
Add a new clang-format option `BreakFunctionDeclarationParameters` to control
whether parameters in function declarations can be broken onto new lines,
similar to the existing `BreakFunctionDefinitionParameter