我在我的.clang-format文件中使用以下选项:
AlignConsecutiveDeclarations: true
PointerAlignment: Right
Run Code Online (Sandbox Code Playgroud)
当前的格式化结果如下:
char * var1;
SomeOtherType *var2;
int var3;
Run Code Online (Sandbox Code Playgroud)
我期待的结果将是:
char *var1; //note the changed position of *
SomeOtherType *var2;
int var3;
Run Code Online (Sandbox Code Playgroud)
如何配置clang-format将星号(*)与变量名称对齐,而不是在使用AlignConsecutiveDeclarations选项时使用类型?