[llvm-bugs] [Bug 37702] New: Allow one-line functions in class definition
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 6 08:55:19 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37702
Bug ID: 37702
Summary: Allow one-line functions in class definition
Product: clang
Version: 6.0
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Formatter
Assignee: unassignedclangbugs at nondot.org
Reporter: matthew.woehlke at kitware.com
CC: djasper at google.com, klimek at google.com,
llvm-bugs at lists.llvm.org
I'm having a number of issues trying to get clang-format to behave reasonably
on
https://github.com/Kitware/kwiver/blob/303a11ebb43c020ab8e48b6ef70407b460dba46b/vital/range/filter.h,
using
https://gist.github.com/mwoehlke-kitware/d8ef9466df5096a035059938aef2948d.
For this RFE, the problem is with short, one-line functions in a class
definition. For example:
class foo
{
void some_method(int param)
{ body(param); }
};
clang-format insists on breaking the body. AFAICT, there are options for
keeping the body on a single line if that line is *shared* with the method
prototype, but no option if there is a break between the prototype and the
body.
--
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/20180606/18e78106/attachment.html>
More information about the llvm-bugs
mailing list