Skip to content

[clang-format] AllowAllArgumentsOnNextLine does not seems to work #141886

Closed
@EugeneZelenko

Description

@EugeneZelenko

Test file:

#include <string>

class Test
{
public:
    void method(const std::string& parameter1, const std::string& parameter2, const std::string& parameter3)
    {
    }
};

Actual result for method:

    void method(
        const std::string& parameter1, const std::string& parameter2, const std::string& parameter3)

Expected result for method:

    void method(
        const std::string& parameter1, 
        const std::string& parameter2, 
        const std::string& parameter3)

I tried 19.1.1 and main (49d48c3)

Clang-Format configuration:

BasedOnStyle: LLVM

AlignConsecutiveDeclarations:
  Enabled: true
  AcrossEmptyLines: false
  AcrossComments: false
AllowShortFunctionsOnASingleLine: Inline
BreakBeforeBraces: Allman
ColumnLimit: 100
IndentPPDirectives: AfterHash
IndentWidth: 4
LineEnding: LF
UseTab: Never

Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveMacros: AcrossEmptyLines
AllowAllArgumentsOnNextLine: false
BinPackArguments: false
BinPackParameters: false
BreakConstructorInitializers: BeforeComma
BreakTemplateDeclarations: Yes
ConstructorInitializerIndentWidth: 0
ContinuationIndentWidth: 4
FixNamespaceComments: true
MaxEmptyLinesToKeep: 1
PackConstructorInitializers: Never
PointerAlignment: Left
SortUsingDeclarations: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    clang-formatquestionA question, not bug report. Check out https://llvm.org/docs/GettingInvolved.html instead!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions