clang-format pointer alignment question

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

clang-format pointer alignment question

Joerg Sonnenberger via cfe-dev

I find myself failing to figure out how to configure clang-format to align pointers/references to the right when no const/volatile modifier is involved, but align it to the left when no CV is involved.

auto const& a = ...; // bind left
void foo(auto const& p) {}


auto &a = ...; // bind right
void foo(auto &p) {}

Is this configuration supported? I seem to have some luck with it using PointerBindsToType from clang 3.9 on but now it seems to be have removed. I can't recall correctly if I ever got it working.

Regardless thanks!

Adamson, Benjamin
[hidden email]

cfe-dev mailing list
[hidden email]