You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I experienced a strange bug in clang-format in version 19.1.1. I didn't observe it in version 16 (which I previously used in my project).
I have a setting to keep reference (&) signs glued to the type on the left side (ReferenceAlignment: Left). This formatting works for most functions, however if the function is in global scope (prepended with ::) clang-format is adding additional space between the type and &.
Here is the small code snippet that I used for testing.
class test {
friend std::ostream& ::operator<<(std::ostream & lhs,
const ::test_1::test2 &
rhs);
friend std::ostream& operator<<(std::ostream& lhs,
const ::test_1::test2& rhs);
}