[llvm-bugs] [Bug 32220] New: aligning operators incorrectly aligns assignment operator= equal sign

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 10 07:34:02 PST 2017


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

            Bug ID: 32220
           Summary: aligning operators incorrectly aligns assignment
                    operator= equal sign
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          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

Given this:

struct signum_t {
  constexpr signum_t(signum_t const&) = default;
  constexpr signum_t& operator        = default;
  constexpr signum_t& operator=(signum_t&& o) noexcept {
    value = o.value;
    return *this;
  }
};

it produces this, which is wrong:

struct signum_t {
  constexpr signum_t(signum_t const&) = default;
  constexpr signum_t& operator        = default;
  constexpr signum_t& operator        =(signum_t&& o) noexcept {
    value = o.value;
    return *this;
  }
};

-- 
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/20170310/96644b59/attachment.html>


More information about the llvm-bugs mailing list