History log of /llvm-project/clang/unittests/Format/FormatTest.cpp (Results 51 – 75 of 2034)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# db0ed553 06-May-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Don't remove parentheses of fold expressions (#91045)

Fixes #90966.


Revision tags: llvmorg-18.1.5
# aa596fa4 28-Apr-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Set Change.TokenLength to ColumnWidth (#90378)

Fixes #37705.
Fixes #47333.
Fixes #47624.
Fixes #58850.
Fixes #75929.
Fixes #87885.
Fixes #89916.


# 315dc4bb 27-Apr-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Add a space after a word token only if required (#90161)

Fixes #78166.


# 29ecd6d5 18-Apr-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Revert breaking stream operators to previous default (#89016)

Reverts commit d68826dfbd98, which changes the previous default behavior
of always breaking before a stream insertion op

[clang-format] Revert breaking stream operators to previous default (#89016)

Reverts commit d68826dfbd98, which changes the previous default behavior
of always breaking before a stream insertion operator `<<` if both
operands are string literals.

Also reverts the related commits 27f547968cce and bf05be5b87fc.

See the discussion in #88483.

show more ...


Revision tags: llvmorg-18.1.4
# 51f16814 11-Apr-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Don't merge a short block for SBS_Never (#88238)

Also fix unit tests.

Fixes #87484.


# 58323de2 10-Apr-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Correctly annotate braces in macros (#87953)

Also fix unit tests and reformat polly.

Fixes #86550.


# 5c056b32 09-Apr-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Clean up unit tests from commit 13be0d4a34c4

- Use 1-parameter verifyFormat() to verify formatted input in LLVM style.
- Pass string literal instead of constructed StringRef to verify

[clang-format] Clean up unit tests from commit 13be0d4a34c4

- Use 1-parameter verifyFormat() to verify formatted input in LLVM style.
- Pass string literal instead of constructed StringRef to verifyFormat().
- Don't include trailing newlines if not needed.

show more ...


# 7c9c38ea 05-Apr-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Fix a regression in annotating BK_BracedInit (#87450)

Fixes #86539.


Revision tags: llvmorg-18.1.3
# 13be0d4a 02-Apr-2024 Ameer J <52414509+ameerj@users.noreply.github.com>

[clang-format] Add BreakFunctionDefinitionParameters option (#84988)

This adds an option to break function definition parameters, putting
them on the next line after the function's opening paren.

[clang-format] Add BreakFunctionDefinitionParameters option (#84988)

This adds an option to break function definition parameters, putting
them on the next line after the function's opening paren.

This was a missing step towards allowing styles which require all
function definition parameters be on their own lines.

Closes #62963

show more ...


# e766f87b 28-Mar-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Handle C++ Core Guidelines suppression tags (#86458)

Fixes #86451.


# dd06b8e6 27-Mar-2024 rayroudc <rayroudc@gmail.com>

[clang-format] Fix anonymous reference parameter with default value (#86254)

When enabling alignment of consecutive declarations and reference right
alignment, the needed space between `& ` and ` =

[clang-format] Fix anonymous reference parameter with default value (#86254)

When enabling alignment of consecutive declarations and reference right
alignment, the needed space between `& ` and ` = ` is removed in the
following use case.

Problem (does not compile)
```
int a(const Test &= Test());
double b();
```

Expected:
```
int a(const Test & = Test());
double b();
```

Test command:

```
echo "int a(const Test& = Test()); double b();" | clang-format -style="{AlignConsecutiveDeclarations: true, ReferenceAlignment: Right}"
```

show more ...


# cceedc93 24-Mar-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Fix a crash with AlignArrayOfStructures option (#86420)

Fixes #86109.


# 579dc7f8 23-Mar-2024 Owen Pan <owenpiano@gmail.com>

[clang-forma] Support `PointerAlignment` for pointers to members (#86253)

Fixes #85761.


Revision tags: llvmorg-18.1.2
# a2527e06 19-Mar-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Put erroneously removed braces back into a unit test

See https://github.com/llvm/llvm-project/pull/85470#discussion_r1528904789


# 55a02d10 18-Mar-2024 Owen Pan <owenpiano@gmail.com>

[clang-format][NFC] Minor changes to a unit test in 8e5de66af3da

See https://github.com/llvm/llvm-project/pull/85470#discussion_r1527297517


# 8e5de66a 17-Mar-2024 scythris <118685935+scythris@users.noreply.github.com>

[clang-format] Fix clang-format issue with 'new' and 'delete' keywords in C files (#85470)

This resolves an issue in clang-format where `new` and `delete` were
incorrectly formatted as keywords in

[clang-format] Fix clang-format issue with 'new' and 'delete' keywords in C files (#85470)

This resolves an issue in clang-format where `new` and `delete` were
incorrectly formatted as keywords in C files. The fix modifies
`TokenAnnotator::spaceRequiredBetween` to handle `new` and `delete` when
used as identifiers for function pointers in structs in C code.

show more ...


# d33d5630 16-Mar-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Fix a bug in SpaceInEmptyBlock option (#85508)

Fixes #84695.


# 84b51781 16-Mar-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Correctly parse C++11 attributes in enum specifiers (#85498)

Fixes #85476.


Revision tags: llvmorg-18.1.1
# 76ce3c1b 01-Mar-2024 rayroudc <rayroudc@gmail.com>

[clang-format] Enable again some operator tests (#83380)

Multiple formatting operator tests are commented. This change enables
them again.

[PR506629](https://llvm.org/PR50629) fixed by
[D153798

[clang-format] Enable again some operator tests (#83380)

Multiple formatting operator tests are commented. This change enables
them again.

[PR506629](https://llvm.org/PR50629) fixed by
[D153798](https://reviews.llvm.org/D153798).

Tests in `ConfigurableSpaceBeforeParens` have the same behavior as
before [D110833](https://reviews.llvm.org/D110833).

Update the test for function declaration and definition, as changed in
[D114696](https://reviews.llvm.org/D114696).

show more ...


Revision tags: llvmorg-18.1.0, llvmorg-18.1.0-rc4
# b0d2a52c 24-Feb-2024 Owen Pan <owenpiano@gmail.com>

[clang-format][NFC] Enable RemoveSemicolon for clang-format style (#82735)

Also insert separators for decimal integers longer than 4 digits.


# 2e7cacfc 22-Feb-2024 Emilia Kond <emilia@rymiel.space>

[clang-format] Fix crash in TokenAnnotator (#82349)

The while loop on line 3814 can cause a segmentation fault getting the
Next field on a nullptr. This is because further down, on line 3823,
ther

[clang-format] Fix crash in TokenAnnotator (#82349)

The while loop on line 3814 can cause a segmentation fault getting the
Next field on a nullptr. This is because further down, on line 3823,
there is another for loop, which assigns Tok to Tok->Next in its
initializer. This for loop has a condition to check if the result of
that isn't null. If it is, the loop is skipped and we drop back out to
the outer loop, except, now Tok is null, and we try to dereference it
without checking first.

This patch adds a defensive check that returns if Tok->Next is null
before we make it to the second for loop.

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

---------

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

show more ...


# 04fbc461 21-Feb-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Fix RemoveSemicolon for empty functions (#82278)

Fixes #79833.


Revision tags: llvmorg-18.1.0-rc3
# 22fc2cb1 19-Feb-2024 rmarker <37921131+rmarker@users.noreply.github.com>

[clang-format] Fix AllowShortLambdasOnASingleLine interfering with lambda brace wrapping. (#81848)

Fix an issue where the lambda body left brace could sometimes fail to be
wrapped when AllowShortLa

[clang-format] Fix AllowShortLambdasOnASingleLine interfering with lambda brace wrapping. (#81848)

Fix an issue where the lambda body left brace could sometimes fail to be
wrapped when AllowShortLambdasOnASingleLine is enabled.

Now, when BraceWrapping.BeforeLambdaBody is enabled, if the brace is not
wrapped, we prevent breaks in the lambda body.

Resolves #81845

show more ...


# 92ef4087 16-Feb-2024 Owen Pan <owenpiano@gmail.com>

[clang-format] Delete a redundant newline at the end of a test case

It slipped in from commit fa6025e25b57.


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


12345678910>>...82