Changes in .h files seems to occur between clang-format v20 and v21, when .clang-format has a "C" Language section (both indentation and spaces around &) ------------------------ test.h ------------------------- namespace Foo { void bar(arg1 &result); void bar2(const arg1 &result); } ------------------------ ------------------------- ----------------------- .clang-format ---------- Language: Cpp BasedOnStyle: LLVM ... Language: C BasedOnStyle: LLVM ------------------------------------- ------------------------------------- clang-format-20 (20.1.0) ------------------------------------- namespace Foo { void bar(arg1 &result); void bar2(const arg1 &result); } // namespace Foo ------------------------------------- clang-format-21 (21.1.1) ------------------------------------- namespace Foo { void bar(arg1 & result); void bar2(const arg1 &result); } .h file is obviously considered C not C++ if I remove the Language C section from .clang-format output is ad in cf-20 namespace Foo { void bar(arg1 &result); void bar2(const arg1 &result); } // namespace Foo