[llvm-bugs] [Bug 37707] New: AlwaysBreakAfterReturnType not working for macros
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jun 6 10:10:00 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37707
Bug ID: 37707
Summary: AlwaysBreakAfterReturnType not working for macros
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/defs.h,
using
https://gist.github.com/mwoehlke-kitware/d8ef9466df5096a035059938aef2948d.
For this bug, the problem is that AlwaysBreakAfterReturnType set to TopLevel
does not work in macros. Specifically, breaks after returns are being removed
in the latter functions defined by `KWIVER_RANGE_ADAPTER_FUNCTION`, which are
top level and therefore I expect to be subject to AlwaysBreakAfterReturnType.
Specifically:
// Before (correct)
constexpr name##_view_adapter_t< Args... > \
name( Args... args ) \
...
template < typename Range, typename... Args > \
auto \
operator|( \
// After (wrong)
constexpr name##_view_adapter_t< Args... > name( Args... args ) \
...
auto operator|( Range const& range, \
--
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/1bf8ae9d/attachment.html>
More information about the llvm-bugs
mailing list