跳转至

SpaceAroundPointerQualifiers

SpaceAroundPointerQualifiers (SpaceAroundPointerQualifiersStyle)

Info

clang-format 12

定义在何种情况下在指针限定符之前或之后放置空格

可能的值:

SAPQ_Default: 不要确保指针限定符周围有空格,而是使用 PointerAlignment

PointerAlignment: Left                 PointerAlignment: Right
void* const* x = NULL;         vs.     void *const *x = NULL;

SAPQ_Before: 确保在指针限定符之前有空格。

PointerAlignment: Left                 PointerAlignment: Right
void* const* x = NULL;         vs.     void * const *x = NULL;

SAPQ_After: 确保在指针限定符后有空格。

PointerAlignment: Left                 PointerAlignment: Right
void* const * x = NULL;         vs.     void *const *x = NULL;

SAPQ_Both: 确保在指针限定符的前后都有空格。

PointerAlignment: Left                 PointerAlignment: Right
void* const * x = NULL;         vs.     void * const *x = NULL;

最后更新: 2022-10-31