[PATCH] D88227: [clang-format] Add a SpaceBeforePointerQualifiers style option

Alexander Richardson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 24 06:48:57 PDT 2020


arichardson created this revision.
arichardson added reviewers: JakeMerdichAMD, MyDeveloperDay, jrtc27.
Herald added subscribers: cfe-commits, krytarowski, emaste.
Herald added a project: clang.
arichardson requested review of this revision.

Some projects (e.g. FreeBSD) align pointers to the right but expect a
space between the '*' and any pointer qualifiers such as const.

SpaceBeforePointerQualifiers = false (LLVM style):   void *const x = NULL;
SpaceBeforePointerQualifiers = true (FreeBSD style): void * const x = NULL;


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D88227

Files:
  clang/docs/ClangFormatStyleOptions.rst
  clang/include/clang/Format/Format.h
  clang/lib/Format/Format.cpp
  clang/lib/Format/TokenAnnotator.cpp
  clang/unittests/Format/FormatTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D88227.294043.patch
Type: text/x-patch
Size: 6975 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200924/1ea456b5/attachment-0001.bin>


More information about the cfe-commits mailing list