#
d0337990 |
| 08-Feb-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Add Leave to AlwaysBreakTemplateDeclarations (#80569)
Closes #78067.
|
Revision tags: llvmorg-18.1.0-rc2 |
|
#
25620073 |
| 04-Feb-2024 |
rmarker <37921131+rmarker@users.noreply.github.com> |
[clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (#78011)
The RTBS_None option in Clang-format avoids breaking after a short
return type.
However, there was
[clang-format] Add Automatic and ExceptShortType options for AlwaysBreakAfterReturnType. (#78011)
The RTBS_None option in Clang-format avoids breaking after a short
return type.
However, there was an issue with the behaviour in that it wouldn't take
the leading indentation of the line into account.
This meant that the behaviour wasn't applying when intended.
In order to address this situation without breaking the existing
formatting, RTBS_None has been deprecated.
In its place are two new options for AlwaysBreakAfterReturnType.
The option RTBS_Automatic will break after the return type based on
PenaltyReturnTypeOnItsOwnLine.
The option RTBS_ExceptShortType will take the leading indentation into
account and prevent breaking after short return types.
This allows the inconsistent behaviour of RTBS_None to be avoided and
users to decide whether they want to allow breaking after short return
types or not.
Resolves #78010
show more ...
|
#
908fd09a |
| 01-Feb-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Simplify the AfterPlacementOperator option (#79796)
Change AfterPlacementOperator to a boolean and deprecate SBPO_Never,
which meant never inserting a space except when after new/del
[clang-format] Simplify the AfterPlacementOperator option (#79796)
Change AfterPlacementOperator to a boolean and deprecate SBPO_Never,
which meant never inserting a space except when after new/delete.
Fixes #78892.
show more ...
|
Revision tags: llvmorg-18.1.0-rc1, llvmorg-19-init |
|
#
a7d7da6e |
| 20-Jan-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Add SkipMacroDefinitionBody option (#78682)
Closes #67991.
See also: #70338
Co-authored-by: @tomekpaszek
|
#
59a26531 |
| 16-Jan-2024 |
serbanu <serban.ungureanu1@gmail.com> |
[clang-format] Add parse tests for SeparateDefinitionBlocks option (#78256)
Add config parse tests for SeparateDefinitionBlocks option.
|
#
60a9874f |
| 14-Jan-2024 |
rmarker <37921131+rmarker@users.noreply.github.com> |
[clang-format] Add PenaltyBreakScopeResolution option. (#78015)
Resolves #78014
|
#
b2c0c6f3 |
| 11-Jan-2024 |
Gedare Bloom <gedare@rtems.org> |
[clang-format]: Split alignment of declarations around assignment (#69340)
Function pointers are detected as a type of declaration using
FunctionTypeLParen. They are aligned based on rules for
Ali
[clang-format]: Split alignment of declarations around assignment (#69340)
Function pointers are detected as a type of declaration using
FunctionTypeLParen. They are aligned based on rules for
AlignConsecutiveDeclarations. When a function pointer is on the
right-hand side of an assignment, the alignment of the function pointer
can result in excessive whitespace padding due to the ordering of
alignment, as the alignment processes a line from left-to-right and
first aligns the declarations before and after the assignment operator,
and then aligns the assignment operator. Injection of whitespace by
alignment of declarations after the equal sign followed by alignment of
the equal sign results in the excessive whitespace.
Fixes #68079.
show more ...
|
Revision tags: llvmorg-17.0.6 |
|
#
39faf13d |
| 27-Nov-2023 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Add BreakAdjacentStringLiterals option (#73432)
Closes #70451.
|
Revision tags: llvmorg-17.0.5, llvmorg-17.0.4 |
|
#
88934a82 |
| 27-Oct-2023 |
Owen Pan <owenpiano@gmail.com> |
[clang-format][NFC] Remove extraneous newlines in some unit test files
|
#
69209e30 |
| 25-Oct-2023 |
Backl1ght <backlight.zzk@gmail.com> |
[clang-format] AllowShortCompoundRequirementOnASingleLine
clang-format brace wrapping did not take requires into consideration, compound requirements will be affected by BraceWrapping.AfterFunction.
[clang-format] AllowShortCompoundRequirementOnASingleLine
clang-format brace wrapping did not take requires into consideration, compound requirements will be affected by BraceWrapping.AfterFunction.
Closes #59412.
Differential Revision: https://reviews.llvm.org/D139834
show more ...
|
#
0374bbba |
| 23-Oct-2023 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Add a new style for the clang-format source code (#69814)
|
#
7c15dd60 |
| 20-Oct-2023 |
Omar Ahmed <omarpiratee2010@gmail.com> |
[clang-format] Add space in placement new expression
Add AfterPlacementNew option to SpaceBeforeParensOptions to have more control on placement new expressions.
Fixes #41501 Relates to #54703
Diff
[clang-format] Add space in placement new expression
Add AfterPlacementNew option to SpaceBeforeParensOptions to have more control on placement new expressions.
Fixes #41501 Relates to #54703
Differential Revision: https://reviews.llvm.org/D127270
show more ...
|
Revision tags: llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0 |
|
#
84e3fdfc |
| 09-Sep-2023 |
Björn Schäpers <bjoern@hazardy.de> |
[clang-format] BreakBeforeNoexceptSpecifier option added (#65808)
It really bugs me that it breaks to
``` c++
...) noexcept(
noexcept(condition)...
```
This is a fix for people like me.
|
Revision tags: llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init |
|
#
c669541c |
| 25-Jul-2023 |
Gedare Bloom <gedare@rtems.org> |
[clang-format] Add SpacesInParens with SpacesInParensOptions
This is a refactoring of: - SpacesInConditionalStatement - SpacesInCStyleCastParentheses - SpaceInEmptyParentheses - SpacesInParentheses
[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
show more ...
|
#
74720d1b |
| 25-Jul-2023 |
Galen Elias <galenelias@gmail.com> |
[clang-format] Add AlignConsecutiveShortCaseStatements
This adds a new AlignConsecutiveShortCaseStatements option in line with the existing AlignConsecutive* options , which when AllowShortCaseLabel
[clang-format] Add AlignConsecutiveShortCaseStatements
This adds a new AlignConsecutiveShortCaseStatements option in line with the existing AlignConsecutive* options , which when AllowShortCaseLabelsOnASingleLine is enabled will align the tokens after the case statement's colon. This also adds a AlignCaseColons option to allow aligning the case label colon itself rather than the token after it.
Fixes #55475.
Differential Revision: https://reviews.llvm.org/D151761
show more ...
|
#
87ad34ff |
| 25-Jul-2023 |
Owen Pan <owenpiano@gmail.com> |
Revert "[clang-format] Add AlignConsecutiveShortCaseStatements"
This reverts commit 4ba00844174db562d2bd8b15dab6aac605eddf57.
|
#
ac6e5514 |
| 25-Jul-2023 |
Owen Pan <owenpiano@gmail.com> |
Revert "Revert "[clang-format] Add AlignConsecutiveShortCaseStatements""
This reverts commit 4f093b31669a4f8e417259583141159586a05b28.
|
#
4f093b31 |
| 25-Jul-2023 |
Owen Pan <owenpiano@gmail.com> |
Revert "[clang-format] Add AlignConsecutiveShortCaseStatements"
This reverts commit 4ba00844174db562d2bd8b15dab6aac605eddf57 due to missing authorship.
|
#
4ba00844 |
| 25-Jul-2023 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Add AlignConsecutiveShortCaseStatements
This adds a new AlignConsecutiveShortCaseStatements option in line with the existing AlignConsecutive* options , which when AllowShortCaseLabel
[clang-format] Add AlignConsecutiveShortCaseStatements
This adds a new AlignConsecutiveShortCaseStatements option in line with the existing AlignConsecutive* options , which when AllowShortCaseLabelsOnASingleLine is enabled will align the tokens after the case statement's colon. This also adds a AlignCaseColons option to allow aligning the case label colon itself rather than the token after it.
Fixes #55475.
Differential Revision: https://reviews.llvm.org/D151761
show more ...
|
#
3a6a0702 |
| 05-Jul-2023 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Add an option to remove redundant parentheses
Differential Revision: https://reviews.llvm.org/D154484
|
#
829ed96b |
| 13-Jun-2023 |
Owen Pan <owenpiano@gmail.com> |
Reland [clang-format] Add the KeepEmptyLinesAtEOF option
|
Revision tags: llvmorg-16.0.6 |
|
#
b6a71801 |
| 08-Jun-2023 |
Paul Kirth <paulkirth@google.com> |
[clang-format] Add test case for issue 63170
After https://reviews.llvm.org/D151954 we've noticed some issues w/ clang-format behavior, as outlined in https://github.com/llvm/llvm-project/issues/631
[clang-format] Add test case for issue 63170
After https://reviews.llvm.org/D151954 we've noticed some issues w/ clang-format behavior, as outlined in https://github.com/llvm/llvm-project/issues/63170.
Valid C/C++ files, that were previously accepted, are now rejected by clang-format, emitting the message:
"The new replacement overlaps with an existing replacement."
This reverts commit 4b9764959dc4b8783e18747c1742ab164e4bc4ee and d2627cf88d2553a4c2e850430bdb908a4b7d2e52, which depends on it.
Reviewed By: phosek
Differential Revision: https://reviews.llvm.org/D152473
show more ...
|
#
d2627cf8 |
| 06-Jun-2023 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Add the KeepEmptyLinesAtEOF option
Adds an option KeepEmptyLinesAtEOF to keep empty lines (up to MaxEmptyLinesToKeep) before EOF. This remedies the probably unintentional change in be
[clang-format] Add the KeepEmptyLinesAtEOF option
Adds an option KeepEmptyLinesAtEOF to keep empty lines (up to MaxEmptyLinesToKeep) before EOF. This remedies the probably unintentional change in behavior introduced in 3d3ea84a4f8f, which started to always remove empty lines before EOF.
Fixes #56054. Fixes #63150.
Differential Revision: https://reviews.llvm.org/D152305
show more ...
|
#
24231df9 |
| 02-Jun-2023 |
sstwcw <su3e8a96kzlver@posteo.net> |
[clang-format] Parse the Verilog language option in configuration
Reviewed By: HazardyKnusperkeks, MyDeveloperDay
Differential Revision: https://reviews.llvm.org/D151632
|
Revision tags: llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3 |
|
#
c12aa69a |
| 29-Apr-2023 |
Jon Phillips <jonap2811@gmail.com> |
[clang-format] Add BracedInitializerIndentWidth option
The option allows users to specify how many columns to use to indent the contents of initializer lists.
Closes #51070.
Differential Revision:
[clang-format] Add BracedInitializerIndentWidth option
The option allows users to specify how many columns to use to indent the contents of initializer lists.
Closes #51070.
Differential Revision: https://reviews.llvm.org/D146101
show more ...
|