[llvm-bugs] [Bug 25954] New: Inconsistent alignment of && on function parameters
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Dec 28 09:31:07 PST 2015
https://llvm.org/bugs/show_bug.cgi?id=25954
Bug ID: 25954
Summary: Inconsistent alignment of && on function parameters
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: gonzalobg88 at gmail.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
Classification: Unclassified
In the following snippet, the && on the function parameters are not aligned
consistently. From the snippet below it seems to be due to the decltype and the
missing name of the last function argument:
// minimal example: inconsistent T&& vs U &&
template <typename T, typename U> auto bar(T&& t, U &&) -> decltype(int());
// In the following it does not happen:
template <typename T, typename U> auto bar0(T&& t, U&&) {}
template <typename T, typename U> auto bar1(T&& t, U&&);
template <typename T, typename U> auto bar2(T&& t, U&& u) -> decltype(int());
template <typename T, typename U> auto bar3(T&&, U&& u) -> decltype(int());
// So it seams related to missing name of the last function argument and
// decltype
// it happens consistently inside structs:
struct baz {
template <typename T, typename U> auto bar(T&& t, U &&) -> decltype(int());
template <typename T, typename U> auto bar0(T&& t, U&&) {}
};
--
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/20151228/7ea005cf/attachment.html>
More information about the llvm-bugs
mailing list