我在函数声明对齐方面遇到问题。
考虑:
RplInstanceS* RplGetInstance(inst_t instID, uint8_t createFlag);
RplDagS* RplGetDag(RplInstanceS* inst, RplAddrS* dagID, uint8_t createFlag);
void RplFreeInstance(RplInstanceS* inst, uint8_t forced);
void ResetDioTrickle(RplDagS* dag);
RplDagS* GetNextInuseDag(int* state);
void RplFreeAllInstances(void);
uint8_t CountAllInstances(void);
uint8_t StartAllInstances(void);
我希望可以使用clang格式的选项将其转换为:
RplInstanceS* RplGetInstance(inst_t instID, uint8_t createFlag);
RplDagS* RplGetDag(RplInstanceS* inst, RplAddrS* dagID, uint8_t createFlag);
void RplFreeInstance(RplInstanceS* inst, uint8_t forced);
void ResetDioTrickle(RplDagS* dag);
RplDagS* GetNextInuseDag(int* state);
void RplFreeAllInstances(void);
uint8_t CountAllInstances(void);
uint8_t StartAllInstances(void);
答案 0 :(得分:1)
没有特定于函数的选项,但是有AlignConsecutiveDeclarations
选项,如果将其设置为true
,则它会对齐连续的声明。
此选项可以与PointerAlignment
选项一起使用,该选项的值设置为PAS_Left
(在配置中:“左”),它将使指针向左对齐。
这两个选项的组合应该可以为您提供所需的内容。