[cfe-users] clang-format: Function argument alignment

Chris Spencer spencercw at gmail.com
Sun Nov 10 09:25:12 PST 2013


Hi all,

I've been playing around with clang-format (great tool by the way),
and I'm looking for how to control how arguments are aligned over line
breaks. For example, this line:

glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, SCALED_WIDTH, SCALED_HEIGHT,
GL_BGRA, GL_UNSIGNED_BYTE, nullptr);

when formatted the arguments are aligned with the open parenthesis:

glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, SCALED_WIDTH, SCALED_HEIGHT, GL_BGRA,
                GL_UNSIGNED_BYTE, nullptr);

I need this to use a single indent after the line break, regardless of
where the parenthesis is, but I can't find any option to do this. Is
this possible?

Thanks,

Chris



More information about the cfe-users mailing list