llvm-project/clang/unittests/Format
Alex Richardson 9e27f38354 [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
2020-10-18 18:17:50 +01:00
..
CMakeLists.txt [clang-format] Add a MacroExpander. 2020-09-25 14:08:13 +02:00
CleanupTest.cpp [clang-format] NFC - clang-format the FormatTests 2020-05-02 15:42:20 +01:00
FormatTest.cpp [clang-format] Add a SpaceAroundPointerQualifiers style option 2020-10-18 18:17:50 +01:00
FormatTestCSharp.cpp [clang-format] NFC ensure the clang-format tests remain clang-formatted 2020-09-18 18:16:02 +01:00
FormatTestComments.cpp Revert "[clang-format] Fix AlignConsecutive on PP blocks" 2020-10-17 19:52:51 +02:00
FormatTestJS.cpp [clang-format] Fix AlignOperands when BreakBeforeBinaryOperators is set 2020-05-15 16:40:31 +02:00
FormatTestJava.cpp [clang-format] NFC - clang-format the FormatTests 2020-05-02 15:42:20 +01:00
FormatTestObjC.cpp [Format/ObjC] Correctly handle base class with lightweight generics and protocol 2020-10-16 15:12:25 -06:00
FormatTestProto.cpp [clang-format] NFC - clang-format the FormatTests 2020-05-02 15:42:20 +01:00
FormatTestRawStrings.cpp [clang-format] NFC - clang-format the FormatTests 2020-05-02 15:42:20 +01:00
FormatTestSelective.cpp [clang-format] NFC - clang-format the FormatTests 2020-05-02 15:42:20 +01:00
FormatTestTableGen.cpp [clang-format][TableGen] Don't add spaces around items in square braces. 2019-03-01 00:12:18 +00:00
FormatTestTextProto.cpp [clang-format] NFC - clang-format the FormatTests 2020-05-02 15:42:20 +01:00
FormatTestUtils.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MacroExpanderTest.cpp [clang-format][tests] Fix MacroExpander lexer not parsing C++ keywords 2020-10-07 17:17:41 +01:00
NamespaceEndCommentsFixerTest.cpp [clang-format] [PR46130] When editing a file with unbalance {} the namespace comment fixer can incorrectly comment the wrong closing brace 2020-05-30 13:15:27 +01:00
SortImportsTestJS.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SortImportsTestJava.cpp [clang-format] Add a option for the position of Java static import 2020-09-18 18:12:21 +01:00
SortIncludesTest.cpp [Format] Don't treat compound extension headers (foo.proto.h) as foo.cc main-file header. 2020-10-01 19:57:57 +02:00
TestLexer.h [clang-format][tests] Fix MacroExpander lexer not parsing C++ keywords 2020-10-07 17:17:41 +01:00
UsingDeclarationsSorterTest.cpp [clang-format] NFC - clang-format the FormatTests 2020-05-02 15:42:20 +01:00