-
Notifications
You must be signed in to change notification settings - Fork 15.4k
Open
Labels
Description
I have an example (this file) that I've trimmed down to this minimal example:
void foo() {
const double _tmp327 = 1.0;
const double _tmp59 = 2.0;
const double _tmp339 = _tmp327 * [&]() {
const double base = _tmp59;
return base * base * base;
}();
}Starting from LLVM 21.1.3 through LLVM 21.1.7, clang-format wants to format this as:
void foo() {
const double _tmp327 = 1.0;
const double _tmp59 = 2.0;
const double _tmp339 = _tmp327* [&]() {
const double base = _tmp59;
return base * base * base;
}
();
}which seems wrong.
Config is here.
Can reproduce by downloading the LLVM release binaries and running, for example,
❯ docker run --rm -it -v /home/aaron/symforce:/symforce ubuntu:noble /symforce/LLVM-21.1.3-Linux-X64/bin/clang-format
/symforce/gen/cpp/sym/factors/inverse_range_landmark_spherical_gnc_factor.h