[llvm-bugs] [Bug 43653] New: clangFormat doesn't follow SpacesInParentheses for operator* declaration

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Oct 11 15:24:56 PDT 2019


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

            Bug ID: 43653
           Summary: clangFormat doesn't follow SpacesInParentheses for
                    operator* declaration
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Formatter
          Assignee: unassignedclangbugs at nondot.org
          Reporter: maxim.banaev at gmail.com
                CC: djasper at google.com, klimek at google.com,
                    llvm-bugs at lists.llvm.org

$ cat foo.cpp

class Foo {
public:
  Foo operator*(int &)const;
};

$ cat .clang-format
Language: Cpp
BasedOnStyle: LLVM
SpacesInParentheses: true

Command executed:
$ clang-format -i foo.cpp

Actual:
class Foo {
public:
  Foo operator*(int &)const;
};

Expected
class Foo {
public:
  Foo operator*( int & ) const;
};


Expected that clangFormat does add spaces in ().
Works file for:
Foo operator+(int &)const;
Foo operator*(int &i)const;
Foo operator*(int &);

-- 
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/20191011/f0966ac8/attachment.html>


More information about the llvm-bugs mailing list