[llvm-bugs] [Bug 25765] New: clang-format adds a break after parameter name when it's of a template type
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Dec 7 06:28:38 PST 2015
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: unassignedclangbugs at nondot.org
Reporter: yehezkelshb at gmail.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20151207/3cd53bc7/attachment.html>
More information about the llvm-bugs
mailing list