================
@@ -3889,10 +3925,20 @@ bool UnwrappedLineParser::parseEnum() {
if (!Style.AllowShortEnumsOnASingleLine) {
addUnwrappedLine();
Line->Level += 1;
+ } else if (Style.IndentPPDirectives ==
+ FormatStyle::PPDIS_BeforeHashWithCode) {
+ // For BeforeHashWithCode, flush the enum declaration as its own
+ // UnwrappedLine (like AllowShortEnumsOnASingleLine=false does) so that
+ // body tokens start in a fresh line. Each PP-separated segment of the
+ // body can then be emitted at its correct indentation via BWHCCodeLine.
+ addUnwrappedLine();
----------------
turgu1 wrote:
Done
https://github.com/llvm/llvm-project/pull/186686
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits