https://bugs.llvm.org/show_bug.cgi?id=40696
Bug ID: 40696
Summary: Break after return type ignored with certain template
parameters
Product: clang
Version: 8.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangb...@nondot.org
Reporter: c...@archescomputing.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org
The break after return type style doesn't seem to work if the function's first
parameter is a template with an integer template-parameter.
Given the source:
int TestFn(A<8> a) { return a; }
When run with the Mozilla style, clang-format reformats the code as:
int TestFn(A<8> a)
{
return a;
}
Note the return type is on the same line as the function name. If the function
signature is changed such that the first parameter does not have an integer
template parameter, it behaves as expected. For example, changing <8> to <bool>
formats the code with the return type on its own line.
int
TestFn(A<bool> a)
{
return a;
}
This is using clang-format version 8.0.0 (trunk 345971):
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs