[all-commits] [llvm/llvm-project] 7972b2: [clang-format] respect AfterEnum for enums
Michael Zimmermann via All-commits
all-commits at lists.llvm.org
Mon Jan 3 11:01:24 PST 2022
Author: Michael Zimmermann <sigmaepsilon92 at gmail.com>
Date: 2022-01-03 (Mon, 03 Jan 2022)
[clang-format] respect AfterEnum for enums
There is some similar looking code in `TokenAnnotator.cpp` but given that I've
never worked on clang-format before I don't know what the purpose of that code
is and how it's related to `UnwrappedLineParser.cpp`.
Either way, it fixes clang-format with `BraceWrapping.AfterEnum=true` and
`AllowShortEnumsOnASingleLine=false` to behave like the documentation says.
Before this patch:
After this patch:
According to the unittests which I had to modify this would change the LLVM
style. Please evaluate if you want to change the defaults or if you consider
the current style a bug.
Reviewed By: curdeius, HazardyKnusperkeks
Differential Revision: https://reviews.llvm.org/D106349
More information about the All-commits