[PATCH] D134042: [clang-format] Fix alignment in #else preprocessor blocks

Mitchell via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 4 14:13:45 PDT 2023


mitchell-stellar added a comment.

After reviewing the GitHub issue, it looks like the IndentAndNestingLevel is sticky over the entire scope for `#else` blocks, so the regression only occurs within `#else` blocks in the same scope. The bug I fixed affected alignment in all `#else` blocks, regardless of scope.

I believe that if you choose to revert this @owenpan, you will see more bad alignments throughout `#else` blocks in an entire file. If you keep the fix, you will see bad alignment in `#else` blocks within the current scope. Pick your poison I guess. I personally prefer better alignment in separate `#else` blocks over the entire file, which is what prompted my bugfix in the first place. On those grounds I object to reverting the fix.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134042/new/

https://reviews.llvm.org/D134042



More information about the cfe-commits mailing list