[clang] [clang-format] Break trailing comment alignment at non-trailing comments (PR #208324)

via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 10 12:58:02 PDT 2026


earnol wrote:

> See [#208266 (comment)](https://github.com/llvm/llvm-project/issues/208266#issuecomment-4933319757). The sequence should end at a block regardless. We should fix the bug in `OverEmptyLines` instead.


Good point. I've extended the fix to also break the trailing comment alignment sequence at closing braces (`}`), so OverEmptyLines no longer aligns across block boundaries even without an intervening comment. Added an additional test case for this scenario as well.



https://github.com/llvm/llvm-project/pull/208324


More information about the cfe-commits mailing list