[llvm-bugs] [Bug 45107] New: clang-format inserts space before & in operator Foo&() const

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 5 00:05:58 PST 2020


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

            Bug ID: 45107
           Summary: clang-format inserts space before & in operator Foo&()
                    const
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: hans at chromium.org
                CC: djasper at google.com, klimek at google.com,
                    krasimir at google.com, llvm-bugs at lists.llvm.org,
                    martin at probst.io

I thought
https://github.com/llvm/llvm-project/commit/33463cfba2be7c8d6c08e666123cc34f114a1f3e
would have fixed this, but it seems not.

This is blocking Chromium's update of clang-format.

At current master (llvmorg-11-init-4771-g3a063d68e3c):

$ echo 'operator const Vector<String>&() const { return strings_; }' |
bin/clang-format --style=Chromium
operator const Vector<String> &() const {
  return strings_;
}

Expected:
operator const Vector<String>&() const {
  return strings_;
}

-- 
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/20200305/e02eec31/attachment.html>


More information about the llvm-bugs mailing list