https://bugs.llvm.org/show_bug.cgi?id=34778
Bug ID: 34778
Summary: BraceWrapping: SplitEmptyRecord ignored when
AfterFunction is true
Product: clang
Version: 5.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: Formatter
Assignee: unassignedclangb...@nondot.org
Reporter: gerbo.eng...@ortec-finance.com
CC: djas...@google.com, kli...@google.com,
llvm-bugs@lists.llvm.org
The following works as expected:
$ echo "template<typename T> struct X{};" | clang-format -style="{BasedOnStyle:
llvm, BreakBeforeBraces: Custom, BraceWrapping: { AfterFunction: false,
AfterStruct: true, SplitEmptyRecord: false}}"
template <typename T> struct X
{};
Change AfterFunction to true:
$ echo "template<typename T> struct X{};" | clang-format -style="{BasedOnStyle:
llvm, BreakBeforeBraces: Custom, BraceWrapping: { AfterFunction: true,
AfterStruct: true, SplitEmptyRecord: false}}"
template <typename T> struct X
{
};
I would not expect AfterFunction to interfere with the formatting of a struct
(combined with SplitEmptyRecord).
Might be related to https://bugs.llvm.org/show_bug.cgi?id=25132 and
https://bugs.llvm.org/show_bug.cgi?id=34008
--
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