History log of /llvm-project/clang/unittests/Format/FormatTest.cpp (Results 26 – 50 of 2034)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# e439fdf4 24-Aug-2024 kadir çetinkaya <kadircet@google.com>

[clang-format] Treat new expressions as simple functions (#105168)

ccae7b461be339e717d02f99ac857cf0bc7d17f improved handling for nested
calls, but this resulted in a lot of changes near `new` expre

[clang-format] Treat new expressions as simple functions (#105168)

ccae7b461be339e717d02f99ac857cf0bc7d17f improved handling for nested
calls, but this resulted in a lot of changes near `new` expressions.

This patch tries to restore previous behavior around new expressions, by
treating them as simple functions, which seem to align with the concept.

Fixes https://github.com/llvm/llvm-project/issues/105133.

show more ...


# 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 ...


# 714033a6 23-Aug-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Don't insert a space between :: and * (#105043)

Also, don't insert a space after ::* for method pointers.

See
https://github.com/llvm/llvm-project/pull/86253#issuecomment-22984048

[clang-format] Don't insert a space between :: and * (#105043)

Also, don't insert a space after ::* for method pointers.

See
https://github.com/llvm/llvm-project/pull/86253#issuecomment-2298404887.

Fixes #100841.

show more ...


Revision tags: llvmorg-19.1.0-rc3
# 4cf9a426 17-Aug-2024 Nathan Sidwell <nathan@acm.org>

[clang-format] Adjust requires clause wrapping (#101550) (#102078)

Address #101550 by adding OwnLineWithBrace option for RequiresClausePosition. This permits placing a following '{' on the same line

[clang-format] Adjust requires clause wrapping (#101550) (#102078)

Address #101550 by adding OwnLineWithBrace option for RequiresClausePosition. This permits placing a following '{' on the same line as the requires clause.

Thus, instead of:
```
bool Foo ()
requires(true)
{
return true;
}
```

we have:
```
bool Foo ()
requires(true) {
return true;
}
```

If the function body is empty, we'll get:
```
bool Foo ()
requires(true) {}
```

I attempted to get a line break between the open and close braces, but
failed. Perhaps that's fine -- it's rare and only happens in the empty
body case.

show more ...


# 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
# 9fa17fea 02-Aug-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Handle parenthesized list in RemoveParentheses (#100852)

Also, reformat clang-format source to remove redundant parentheses
enclosing single list items.

Fixes #100768.


Revision tags: llvmorg-19.1.0-rc1
# ccae7b46 25-Jul-2024 Gedare Bloom <gedare@rtems.org>

[clang-format] Improve BlockIndent at ColumnLimit (#93140)

Fixes #55731

The reported formatting problems were related to ignoring deep nesting
of "simple" functions (causing #54808) and to allow

[clang-format] Improve BlockIndent at ColumnLimit (#93140)

Fixes #55731

The reported formatting problems were related to ignoring deep nesting
of "simple" functions (causing #54808) and to allowing the trailing
annotation to become separated from the closing parens, which allowed a
break to occur between the closing parens and the trailing annotation.
The fix for the nesting of "simple" functions is to detect them more
carefully. "Simple" was defined in a comment as being a single
non-expression argument. I tried to stay as close to the original intent
of the implementation while fixing the various bad formatting reports.

In the process of fixing these bugs, some latent bugs were discovered
related to how JavaScript Template Strings are handled. Those are also
fixed here.

---------

Co-authored-by: Owen Pan <owenpiano@gmail.com>

show more ...


Revision tags: llvmorg-20-init
# 0387cd05 21-Jul-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Fix a bug in annotating FunctionAnnotationRParen (#99802)

Fixes #37906.


# 5bb34928 16-Jul-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Fix a bug in SpaceBeforeParensOptions (#98849)

Handle constructors/destructors for AfterFunctionDeclarationName and
AfterFunctionDefinitionName.

Fixes #98812.
Fixes #98820.


# 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`.


# fa00e8bb 20-Jun-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Correctly annotate l_brace after TypenameMacro (#96026)

Closes #95418.


# a106131a 16-Jun-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Handle AttributeMacro before access modifiers (#95634)

Closes #95094.


# d9593c1e 10-Jun-2024 c8ef <c8ef@outlook.com>

[clang-format] Fix a bug in indenting lambda trailing arrows (#94560)

Closes #94181


# 5e0fc93d 07-Jun-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Fix a bug in `AlignAfterOpenBracket: DontAlign` (#94561)

Fixes #94555.


# 798f2019 06-Jun-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Don't format comments in SkipMacroDefinitionBody (#94425)

Fixes #94326.


# f06f0164 02-Jun-2024 Owen Pan <owenpiano@gmail.com>

[clang-format][NFC] Add missing parens of __attribute in unit tests


# 80303cb2 02-Jun-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Handle attributes before lambda return arrow (#94119)

Fixes #92657.


# c5fdb5c3 31-May-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Insert a space between a keyword and a literal (#93632)

Fixes #93603.


# dba2aa26 27-May-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Add LeftWithLastLine to AlignEscapedNewlines option (#93402)

Closes #92999.


# a6d97dec 22-May-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Correctly annotate C++ alternative operators in C (#92880)

PR #90161 uncovered a bug that annotates C++ xor as UnaryOperator if
followed by a binary operator. This patch fixes that a

[clang-format] Correctly annotate C++ alternative operators in C (#92880)

PR #90161 uncovered a bug that annotates C++ xor as UnaryOperator if
followed by a binary operator. This patch fixes that and all other C++
alternative operator keywords when followed by a binary operator in C.

Fixes #92688.

show more ...


# d89f2005 21-May-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Fix a bug in formatting goto labels in macros (#92494)

Fixes #92300.


# 8fe39e64 17-May-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Don't always break before << between string literals (#92214)

Instead, leave the line wrapping as is.

Fixes #43887.
Fixes #44363.


12345678910>>...82