HazardyKnusperkeks added inline comments.
================ Comment at: clang/lib/Format/TokenAnnotator.cpp:3690-3691 + return (isAllowedByAfterEnum && isAllowedByShortEnums) || (Line.startsWith(tok::kw_class) && Style.BraceWrapping.AfterClass) || (Line.startsWith(tok::kw_struct) && Style.BraceWrapping.AfterStruct); + } ---------------- Maybe move that check to the top and return early (without running through the loop and strlen). ================ Comment at: clang/unittests/Format/FormatTest.cpp:13319 AllmanBraceStyle.BreakBeforeBraces = FormatStyle::BS_Allman; + AllmanBraceStyle.AllowShortEnumsOnASingleLine = false; ---------------- curdeius wrote: > That shouldn't be necessary here. Is it useful to test once with false and once with true? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93938/new/ https://reviews.llvm.org/D93938 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits