clang-format is LLVM’s code formatter for C/C++. As with clangd and clang-tidy, we can specify clang-format settings in a .clang-format file in the project root.
To disable and enable around a section:
// clang-format off
// clang-format onMiscellaneous tips:
git clang-format -fto format only modified files in place