[all-commits] [llvm/llvm-project] c66954: [clang-format] Add SpacesInParens with SpacesInPar...
Gedare Bloom via All-commits
all-commits at lists.llvm.org
Mon Jul 24 19:27:42 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c669541c969c70190933b4a16384c60de80242c0
https://github.com/llvm/llvm-project/commit/c669541c969c70190933b4a16384c60de80242c0
Author: Gedare Bloom <gedare at rtems.org>
Date: 2023-07-24 (Mon, 24 Jul 2023)
Changed paths:
M clang/docs/ClangFormatStyleOptions.rst
M clang/docs/ReleaseNotes.rst
M clang/include/clang/Format/Format.h
M clang/lib/Format/Format.cpp
M clang/lib/Format/TokenAnnotator.cpp
M clang/unittests/Format/ConfigParseTest.cpp
M clang/unittests/Format/FormatTest.cpp
M clang/unittests/Format/FormatTestVerilog.cpp
Log Message:
-----------
[clang-format] Add SpacesInParens with SpacesInParensOptions
This is a refactoring of:
- SpacesInConditionalStatement
- SpacesInCStyleCastParentheses
- SpaceInEmptyParentheses
- SpacesInParentheses
These are now options under the new Style Option: SpacesInParens. The
existing options are maintained for backward compatibility.
Within SpacesInParens, there are currently options for:
- Never
- Custom
The currently available options for Custom are:
- InConditionalStatements
- InCStyleCasts
- InEmptyParentheses
- Other
Setting InConditionalStatements and Other to true enables the same space
additions as SpacesInParentheses.
This refactoring does not add or remove any existing features, but it makes
it possible to more easily extend and maintain the addition of spaces within
parentheses.
Related to #55428.
Differential Revision: https://reviews.llvm.org/D155239
More information about the All-commits
mailing list