diff options
author | Brad House <brad@brad-house.com> | 2024-10-06 20:46:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-06 17:46:43 -0700 |
commit | f0bd62d8709a49dd87eb75411e41e2e11e0ab59d (patch) | |
tree | d4dd33a3ca91a69d146ddab9497b4e1d328a52ae /clang/lib/Format/WhitespaceManager.cpp | |
parent | c4d89203f3822b0466f5cc58654cb016aeb86648 (diff) | |
download | llvm-f0bd62d8709a49dd87eb75411e41e2e11e0ab59d.zip llvm-f0bd62d8709a49dd87eb75411e41e2e11e0ab59d.tar.gz llvm-f0bd62d8709a49dd87eb75411e41e2e11e0ab59d.tar.bz2 |
[clang-format] Add AlignFunctionDeclarations to AlignConsecutiveDeclarations (#108241)
Enabling AlignConsecutiveDeclarations also aligns function prototypes
or declarations. This is often unexpected as typically function
prototypes, especially in public headers, don't use any padding.
Setting AlignFunctionDeclarations to false will skip this alignment.
It is by default set to true to keep compatibility with prior
versions to not make unexpected changes.
Fixes #74320
Diffstat (limited to 'clang/lib/Format/WhitespaceManager.cpp')
-rw-r--r-- | clang/lib/Format/WhitespaceManager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Format/WhitespaceManager.cpp b/clang/lib/Format/WhitespaceManager.cpp index fd4a40a..b6b2467 100644 --- a/clang/lib/Format/WhitespaceManager.cpp +++ b/clang/lib/Format/WhitespaceManager.cpp @@ -1020,7 +1020,7 @@ void WhitespaceManager::alignConsecutiveDeclarations() { return true; } if (C.Tok->is(TT_FunctionDeclarationName)) - return true; + return Style.AlignConsecutiveDeclarations.AlignFunctionDeclarations; if (C.Tok->isNot(TT_StartOfName)) return false; if (C.Tok->Previous && |