[llvm-bugs] [Bug 42418] New: clang-format option to insert a space before () in operator overloading
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jun 27 01:35:14 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42418
Bug ID: 42418
Summary: clang-format option to insert a space before () in
operator overloading
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: darklin20 at gmail.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
I usually do not insert any space between function name and ().
However, I always insert a space for operator overloading only because without
space, consecutive symbols look too dense to me.
That is, I prefer
class Test {
auto func() -> int; // no space before ()
auto operator++ (int) -> int; // a space before ()
};
to
class Test {
auto func() -> int;
auto operator++(int) -> int;
};
It would be nice to have an option for this formatting in clang-format.
--
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/20190627/9c4ed041/attachment.html>
More information about the llvm-bugs
mailing list