[PATCH] D138358: [clang-format] Match all block braces

Owen Pan via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Dec 3 07:08:33 PST 2022


owenpan added a comment.

This wouldn't work for deeply nested loops:

  $ cat test.cpp
  for (;;) {
    for (;;) {
      for (;;) {
        a;
      }
    }
  }
  $ clang-format -style='{RemoveBracesLLVM: true}' test.cpp
  for (;;)
    for (;;)
      for (;;)
        a;

Expected output:

  for (;;) {
    for (;;)
      for (;;)
        a;
  }


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138358



More information about the cfe-commits mailing list