[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 01:26:27 PDT 2026


owenca wrote:

> A non-trailing block comment on its own line (e.g. between declarations) should break the trailing comment alignment sequence.

This is still the case after bae9ddca423145baf0c35e31898b723aa273f85c for a sequence within the same block.

> This is a regression introduced by [bae9ddc](https://github.com/llvm/llvm-project/commit/bae9ddca423145baf0c35e31898b723aa273f85c) which correctly stopped marking standalone block comments as trailing, but did not account for their role as alignment sequence barriers.

See 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.

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


More information about the cfe-commits mailing list