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

            Bug ID: 31862
           Summary: clang-format formats unnamed rvalue reference
                    arguments incorrectly
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Formatter
          Assignee: unassignedclangb...@nondot.org
          Reporter: dch...@google.com
                CC: djas...@google.com, kli...@google.com,
                    llvm-bugs@lists.llvm.org
    Classification: Unclassified

Another bug in the past in this area:
https://llvm.org/bugs/show_bug.cgi?id=15051

Formatting with -style=Chromium, the input is:
template <class Key, class Compare>
auto flat_set<Key, Compare>::operator=(flat_set&&) -> flat_set& = default;

The output is:
template <class Key, class Compare>
auto flat_set<Key, Compare>::operator=(flat_set &&) -> flat_set& = default;

But there should be no space flat_set and &&.

Interestingly enough, if the parameter is named, like this:
template <class Key, class Compare>
auto flat_set<Key, Compare>::operator=(flat_set &&set) -> flat_set& = default;

Then it formats correctly:
template <class Key, class Compare>
auto flat_set<Key, Compare>::operator=(flat_set&& set) -> flat_set& = default;

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to