[clang-format] Add a SpaceAroundPointerQualifiers style option
Some projects (e.g. FreeBSD) align pointers to the right but expect a space between the '*' and any pointer qualifiers such as const. To handle these cases this patch adds a new config option SpaceAroundPointerQualifiers that can be used to configure whether spaces need to be added before/after pointer qualifiers. PointerAlignment = Right SpaceAroundPointerQualifiers = Default/After: void *const *x = NULL; SpaceAroundPointerQualifiers = Before/Both void * const *x = NULL; PointerAlignment = Left SpaceAroundPointerQualifiers = Default/Before: void* const* x = NULL; SpaceAroundPointerQualifiers = After/Both void* const * x = NULL; PointerAlignment = Middle SpaceAroundPointerQualifiers = Default/Before/After/Both: void * const * x = NULL; Reviewed By: MyDeveloperDay Differential Revision: https://reviews.llvm.org/D88227
Loading
Please sign in to comment