Issue 53155
Summary [clang-format] Unexpected formatting with multiple opening brackets
Labels new issue
Assignees
Reporter AMS21
    Example code before formatting:
```cpp
void f() {
  {   // Comment
    { // Another comment
      int a;
      double b;
    }
  }
  {
    int c;
    double d;
  }
}
```

Code after running `clang-format test.cpp`
```cpp
void f() {
  { // Comment
   {// Another comment
    int a;
  double b;
}
}
{
  int c;
  double d;
}
}
```

clang-format version: `clang-format version 13.0.0`

Test files to reproduce:
[test-files.tar.gz](https://github.com/llvm/llvm-project/files/7854540/test-files.tar.gz)
[test-files.zip](https://github.com/llvm/llvm-project/files/7854541/test-files.zip)

Live example of this bug:
[cpp file](https://github.com/AMS21/Phi/blob/develop/tests/PhiCore/unittests/src/type_traits/is_invocable.test.cpp#L278)
[.clang-tidy](https://github.com/AMS21/Phi/blob/develop/.clang-format)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to