Why is clang-format not aligning my pointer asterisk correctly?

时间:2019-01-07 12:56:56

标签: clang-format

I am using clang-format to format my code. Using a parametrized pre-processor macro seems to break the way the pointer star is aligned (notice the spacing around the asterisk for parameters b and c).

#define TEST_CONCAT(X) Foo ## X
#define TEST_PARAM(X) FooBar
#define TEST FooBar
void f(FooBar *a, TEST_CONCAT(Bar) * b, TEST_PARAM(Bar) * c, TEST *d);

My clang configuration includes:

PointerAlignment: Right
DerivePointerAlignment: false

Am I doing/expecting something wrong, or is this a bug in clang-format? Thanks for your input.

0 个答案:

没有答案