#
b28e879a |
| 29-Jan-2025 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Simplify ConfigParseTest for int/unsigned options (#124704)
Also add a number of missing tests for unsigned options.
|
Revision tags: llvmorg-21-init |
|
#
d50ebd47 |
| 28-Jan-2025 |
Gedare Bloom <gedare@rtems.org> |
[clang-format] Add style option `PenaltyBreakBeforeMemberAccess` (#118409)
The penalty for breaking before a member access is hard-coded to 150.
Add a configuration option to allow setting it.
-
[clang-format] Add style option `PenaltyBreakBeforeMemberAccess` (#118409)
The penalty for breaking before a member access is hard-coded to 150.
Add a configuration option to allow setting it.
---------
Co-authored-by: Owen Pan <owenpiano@gmail.com>
show more ...
|
#
33656932 |
| 21-Jan-2025 |
Sirraide <aeternalmail@gmail.com> |
[clang-format] Rename ExportBlockIndentation -> IndentExportBlock (#123493)
This renames the `ExportBlockIndentation` option and adds a config parse test, as requested in #110381.
|
Revision tags: llvmorg-19.1.7 |
|
#
66f16e68 |
| 05-Jan-2025 |
Owen Pan <owenpiano@gmail.com> |
[clang-format][NFC] Add missing config tests for List of Strings (#121451)
Also, simplify the existing test for NamespaceMacros. Like the options
tested by the added tests, it's also a list of arbi
[clang-format][NFC] Add missing config tests for List of Strings (#121451)
Also, simplify the existing test for NamespaceMacros. Like the options
tested by the added tests, it's also a list of arbitrary strings and
initialized to an empty list. (The other existing tests for list of
strings either are initialized to a list of one or more strings or
require specific strings.)
show more ...
|
#
1c997fef |
| 03-Jan-2025 |
dmasloff <74042473+dmasloff@users.noreply.github.com> |
[clang-format] Add option WrapNamespaceBodyWithNewlines (#106145)
It wraps the body of namespace with additional newlines, turning this code:
```
namespace N {
int function();
}
```
into the f
[clang-format] Add option WrapNamespaceBodyWithNewlines (#106145)
It wraps the body of namespace with additional newlines, turning this code:
```
namespace N {
int function();
}
```
into the following:
```
namespace N {
int function();
}
```
---------
Co-authored-by: Owen Pan <owenpiano@gmail.com>
show more ...
|
#
486ec4bd |
| 30-Dec-2024 |
Galen Elias <gelias@gmail.com> |
[clang-format] Add `AllowShortNamespacesOnASingleLine` option (#105597)
This fixes #101363 which is a resurrection of a previously opened but
never completed review: https://reviews.llvm.org/D11851
[clang-format] Add `AllowShortNamespacesOnASingleLine` option (#105597)
This fixes #101363 which is a resurrection of a previously opened but
never completed review: https://reviews.llvm.org/D11851
The feature is to allow code like the following not to be broken across
multiple lines:
```
namespace foo { class bar; }
namespace foo { namespace bar { class baz; } }
```
Code like this is commonly used for forward declarations, which are
ideally kept compact. This is also apparently the format that
include-what-you-use will insert for forward declarations.
Also, fix an off-by-one error in `CompactNamespaces` code. For nested
namespaces with 3 or more namespaces, it was incorrectly compacting
lines which were 1 or two spaces over the `ColumnLimit`, leading to
incorrect formatting results.
show more ...
|
Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3 |
|
#
786db636 |
| 24-Oct-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Add KeepFormFeed option (#113268)
Closes #113170.
|
#
d989c241 |
| 18-Oct-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Add RemoveEmptyLinesInUnwrappedLines option (#112325)
Fixes #111340.
|
Revision tags: llvmorg-19.1.2 |
|
#
0fba8381 |
| 12-Oct-2024 |
Iuri Chaer <ichaer@splunk.com> |
[clang-format] Introduce "ReflowComments: IndentOnly" to re-indent comments without breaking internal structure (think Doxygen). (#96804)
* Convert `ReflowComments` from boolean into a new `enum` wh
[clang-format] Introduce "ReflowComments: IndentOnly" to re-indent comments without breaking internal structure (think Doxygen). (#96804)
* Convert `ReflowComments` from boolean into a new `enum` which can take
on the value `RCS_Never`, `RCS_IndentOnly`, or `RCS_Always`. The first
one is equivalent to the old `false`, the third one is `true`, and the
middle one means that multiline comments should only have their
indentation corrected, which is what Doxygen users will want.
* Preserve backward compatibility while parsing `ReflowComments`.
show more ...
|
#
65688274 |
| 08-Oct-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format][NFC] Clean up AlignConsecutiveStyle (#111285)
- Add a `CHECK_PARSE` for `AcrossComments`.
- Add a `CHECK_PARSE_NESTED_BOOL` for `AlignFunctionPointers`.
- Remove redundant statement
[clang-format][NFC] Clean up AlignConsecutiveStyle (#111285)
- Add a `CHECK_PARSE` for `AcrossComments`.
- Add a `CHECK_PARSE_NESTED_BOOL` for `AlignFunctionPointers`.
- Remove redundant statements.
- Clean up documentation.
show more ...
|
#
f0bd62d8 |
| 07-Oct-2024 |
Brad House <brad@brad-house.com> |
[clang-format] Add AlignFunctionDeclarations to AlignConsecutiveDeclarations (#108241)
Enabling AlignConsecutiveDeclarations also aligns function prototypes
or declarations. This is often unexpect
[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
show more ...
|
Revision tags: llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4 |
|
#
7c3237d7 |
| 23-Aug-2024 |
Tom <pottagetom@gmail.com> |
[clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (#101882)
Related issues that have requested this feature:
#51833
#23796
#53190 Partially solves - this issue requests is
[clang-format] Change BinPackParameters to enum and add AlwaysOnePerLine (#101882)
Related issues that have requested this feature:
#51833
#23796
#53190 Partially solves - this issue requests is for both arguments and
parameters
show more ...
|
Revision tags: llvmorg-19.1.0-rc3 |
|
#
c5a4291f |
| 10-Aug-2024 |
Ameer J <52414509+ameerj@users.noreply.github.com> |
[clang-format] Add BreakBinaryOperations configuration (#95013)
By default, clang-format packs binary operations, but it may be
desirable to have compound operations be on individual lines instead
[clang-format] Add BreakBinaryOperations configuration (#95013)
By default, clang-format packs binary operations, but it may be
desirable to have compound operations be on individual lines instead of
being packed.
This PR adds the option `BreakBinaryOperations` to break up large
compound binary operations to be on one line each.
This applies to all logical and arithmetic/bitwise binary operations
Maybe partially addresses #79487 ?
Closes #58014
Closes #57280
show more ...
|
Revision tags: llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init |
|
#
54f040ff |
| 02-Jul-2024 |
Gedare Bloom <gedare@rtems.org> |
[clang-format] Add SpacesInParensOption for filtering repeated parens (#77522)
The __attribute((specifier-list)) currently is formatted based on the
SpacesInParensOptions.Other (previously, SpacesI
[clang-format] Add SpacesInParensOption for filtering repeated parens (#77522)
The __attribute((specifier-list)) currently is formatted based on the
SpacesInParensOptions.Other (previously, SpacesInParentheses). This
change allows finer control over addition of spaces between the
consecutive parens, and between the inner parens and the list of
attribute specifiers.
Differential Revision: https://reviews.llvm.org/D155529
This is migrated from Phabricator, see more discussion there.
---------
Co-authored-by: Owen Pan <owenpiano@gmail.com>
show more ...
|
#
2853a838 |
| 30-Jun-2024 |
sstwcw <su3e8a96kzlver@posteo.net> |
[clang-format] Add option to remove leading blank lines (#91221)
The options regarding which blank lines are kept are also aggregated. The new option is `KeepEmptyLines`.
This patch was initially p
[clang-format] Add option to remove leading blank lines (#91221)
The options regarding which blank lines are kept are also aggregated. The new option is `KeepEmptyLines`.
This patch was initially part of 9267f8f19a2e502e. I neglected to check the server builds before I added it. It broke clangd. Jie Fu fixed the problem in 4c91b49bab0728d4. I was unaware of it. I thought the main branch was still broken. I reverted the first patch in 70cfece24d6cbb57. It broke his fix. He reverted it in c69ea04fb9738db2. Now the feature is added again including the fix.
show more ...
|
#
70cfece2 |
| 25-Jun-2024 |
sstwcw <su3e8a96kzlver@posteo.net> |
Revert "[clang-format] Add option to remove leading blank lines (#91221)"
This reverts commit 9267f8f19a2e502ef5a216c0d52b352b3699d399.
I changed a formatter option. I forgot to update other compo
Revert "[clang-format] Add option to remove leading blank lines (#91221)"
This reverts commit 9267f8f19a2e502ef5a216c0d52b352b3699d399.
I changed a formatter option. I forgot to update other components that depend on the formatter when the option name changed.
show more ...
|
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6 |
|
#
9267f8f1 |
| 06-May-2024 |
sstwcw <su3e8a96kzlver@posteo.net> |
[clang-format] Add option to remove leading blank lines (#91221)
The options regarding which blank lines are kept are also aggregated. The new option is `KeepEmptyLines`.
|
#
527e7328 |
| 16-Jun-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format][NFC] Suppress diagnostic noise in GetStyleOfFile test
|
#
fe9aef05 |
| 16-Jun-2024 |
pointhex <1111artem1111@gmail.com> |
[clang-format] Add DiagHandler parameter to format::getStyle() (#91317)
It allows to control of error output for the function.
Closes #94205.
---------
Co-authored-by: Owen Pan <owenpiano@g
[clang-format] Add DiagHandler parameter to format::getStyle() (#91317)
It allows to control of error output for the function.
Closes #94205.
---------
Co-authored-by: Owen Pan <owenpiano@gmail.com>
show more ...
|
#
dba2aa26 |
| 27-May-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Add LeftWithLastLine to AlignEscapedNewlines option (#93402)
Closes #92999.
|
#
236b3e1a |
| 07-May-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Handle Java switch expressions (#91112)
Also adds AllowShortCaseExpressionOnASingleLine option and
AlignCaseArrows suboption of AlignConsecutiveShortCaseStatements.
Fixes #55903.
|
Revision tags: llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3 |
|
#
d821650e |
| 15-Feb-2024 |
rmarker <37921131+rmarker@users.noreply.github.com> |
[clang-format][NFC] Drop "Always" in "AlwaysBreakAfterReturnType". (#81591)
Complete the switch from "AlwaysBreakAfterReturnType" to
"BreakAfterReturnType".
|
#
91dcf53a |
| 13-Feb-2024 |
rmarker <37921131+rmarker@users.noreply.github.com> |
[clang-format] Rename option AlwaysBreakAfterReturnType. (#80827)
Changes the option to BreakAfterReturnType option, with a more relevant
name, deprecating and replacing AlwaysBreakAfterReturnType.
[clang-format] Rename option AlwaysBreakAfterReturnType. (#80827)
Changes the option to BreakAfterReturnType option, with a more relevant
name, deprecating and replacing AlwaysBreakAfterReturnType.
Following up on #78010.
show more ...
|
#
7664ddf8 |
| 10-Feb-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format][NFC] Drop "Always" in "AlwaysBreakTemplateDeclarations"
|
#
c5cbfc56 |
| 10-Feb-2024 |
Owen Pan <owenpiano@gmail.com> |
[clang-format] Rename option AlwaysBreakTemplateDeclarations (#81093)
Drop the "Always" prefix to remove the self-contradiction.
|