[clang] [clang-format]: Fix formatting of if statements with BlockIndent (PR #77699)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Sat Jan 20 14:33:31 PST 2024


================
@@ -768,15 +768,25 @@ void ContinuationIndenter::addTokenOnCurrentLine(LineState &State, bool DryRun,
   // parenthesis by disallowing any further line breaks if there is no line
   // break after the opening parenthesis. Don't break if it doesn't conserve
   // columns.
+  const auto IsOpeningBracket = [&](const FormatToken &Tok) {
+    const auto IsStartOfBracedList = [&]() {
----------------
owenca wrote:

```suggestion
  auto IsOpeningBracket = [&](const FormatToken &Tok) {
    auto IsStartOfBracedList = [&]() {
```

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


More information about the cfe-commits mailing list