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

            Bug ID: 25765
           Summary: clang-format adds a break after parameter name when
                    it's of a template type
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: yehezkel...@gmail.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org
    Classification: Unclassified

Created attachment 15408
  --> https://llvm.org/bugs/attachment.cgi?id=15408&action=edit
.clang-format

I use Visual Studio plugin r254298.

Seems like clang-format doesn't like it when a function parameter that is
passed by-value and is't type is a template.

Minimal example:

Source:
int functionNameLongEnoughForWrappingTheParameters(bool someFlag,
                                                   std::vector<uint8_t> buf);

Results with:
int functionNameLongEnoughForWrappingTheParameters(bool someFlag,
                                                   std::vector<uint8_t>
                                                      buf);

But:
int functionNameLongEnoughForWrappingTheParameters(bool someFlag,
                                                   std::vector<uint8_t>& buf);
stays as is (as expected).

More info:
Turning off AlwaysBreakTemplateDeclarations option doesn't help.
Happens with my custom configuration file (attached).
Doesn't happen with LLVM style.
Happens with Chromium style.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to