Running clang-format 21.1.1 on the following which was indented using clang-format 19:
void MyClass::operator()() {
namespace1::util::scope_guard const markExecuted([this] { isExecuted_ = true; });
SomeAPI::operator()();
}
using _clang-format
:
---
BasedOnStyle: Google
IndentWidth: 4
ColumnLimit: 100
AlignConsecutiveDeclarations: Consecutive
...
results in the incorrect splitting of "SomeAPI::" from the "operator()();"
void MyClass::operator()() {
namespace1::util::scope_guard const markExecuted([this] { isExecuted_ = true; });
SomeAPI:: operator()();
}
clang-format 19 does not do this splitting.
Note, I'm upgrading from clang-format 19 to 21 and I did not try 20, so not sure when the behavior regressed.