|
Revision tags: llvmorg-20.1.0, llvmorg-20.1.0-rc3, llvmorg-20.1.0-rc2, llvmorg-20.1.0-rc1, llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, 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, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init, llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3 |
|
| #
05957904 |
| 13-Aug-2022 |
jackh <[email protected]> |
[clang-format] Distinguish logical and after bracket from reference
Fix commit `b646f0955574` and remove redundant code.
Differential Revision: https://reviews.llvm.org/D131750
(cherry picked from
[clang-format] Distinguish logical and after bracket from reference
Fix commit `b646f0955574` and remove redundant code.
Differential Revision: https://reviews.llvm.org/D131750
(cherry picked from commit ef71383b0cfbacdbebf495015f6ead5294bf7759)
show more ...
|
|
Revision tags: llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init |
|
| #
892a9968 |
| 20-Jul-2022 |
owenca <[email protected]> |
[clang-format] Indent tokens after hash only if it starts a line
Fixes #56602.
Differential Revision: https://reviews.llvm.org/D130136
|
| #
3c18a8b3 |
| 13-Jul-2022 |
Björn Schäpers <[email protected]> |
[clang-format] Indent TT_CtorInitializerColon after requires clauses
Fixes https://github.com/llvm/llvm-project/issues/56215
Differential Revision: https://reviews.llvm.org/D129942
|
| #
a0458d92 |
| 16-Jul-2022 |
owenca <[email protected]> |
[clang-format] Never remove braces in macro definitions
Fixes #56559.
Differential Revision: https://reviews.llvm.org/D129921
|
| #
8dd2ef21 |
| 15-Jul-2022 |
Krasimir Georgiev <[email protected]> |
[clang-format] distinguish multiplication after brace-init from pointer
After https://github.com/llvm/llvm-project/commit/b646f0955574c6ad4c156c9db522e46f597cfda9, the added regression test started
[clang-format] distinguish multiplication after brace-init from pointer
After https://github.com/llvm/llvm-project/commit/b646f0955574c6ad4c156c9db522e46f597cfda9, the added regression test started being formatted as-if the multiplication `*` was a pointer. This adapts the heuristic to distinguish between these two cases.
Reviewed By: jackhong12, curdeius, HazardyKnusperkeks, owenpan
Differential Revision: https://reviews.llvm.org/D129771
show more ...
|
| #
6ab73071 |
| 14-Jul-2022 |
owenca <[email protected]> |
[clang-format] Fix invalid-code-generation by RemoveBracesLLVM
When removing an r_brace that is the first token of an annotated line, if the line above ends with a line comment, clang-format generat
[clang-format] Fix invalid-code-generation by RemoveBracesLLVM
When removing an r_brace that is the first token of an annotated line, if the line above ends with a line comment, clang-format generates invalid code by merging the tokens after the r_brace into the line comment.
Fixes #56488.
Differential Revision: https://reviews.llvm.org/D129742
show more ...
|
| #
47bdf53a |
| 03-Jul-2022 |
owenca <[email protected]> |
[clang-format] Break on AfterColon only if not followed by comment
Break after a constructor initializer colon only if it's not followed by a comment on the same line.
Fixes #41128. Fixes #43246.
[clang-format] Break on AfterColon only if not followed by comment
Break after a constructor initializer colon only if it's not followed by a comment on the same line.
Fixes #41128. Fixes #43246.
Differential Revision: https://reviews.llvm.org/D129057
show more ...
|
| #
40d2ef84 |
| 02-Jul-2022 |
owenca <[email protected]> |
[clang-format][NFC] Replace an EXPECT_EQ with a verifyFormat
|
| #
b646f095 |
| 29-Jun-2022 |
Huang Zhen-Hong <[email protected]> |
[clang-format] Fix misplacement of `*` in declaration of pointer to struct
Fixes #55810
Differential Revision: https://reviews.llvm.org/D127873
|
|
Revision tags: llvmorg-14.0.6 |
|
| #
7cb0bc8a |
| 13-Jun-2022 |
owenca <[email protected]> |
[clang-format] Handle more cases for RemoveBracesLLVM
Call mightFitOneOneline() on the line before the closing brace only if it is at the level of the block.
Differential Revision: https://reviews.
[clang-format] Handle more cases for RemoveBracesLLVM
Call mightFitOneOneline() on the line before the closing brace only if it is at the level of the block.
Differential Revision: https://reviews.llvm.org/D127614
show more ...
|
| #
05d77102 |
| 10-Jun-2022 |
owenca <[email protected]> |
[clang-format] Fix a bug in RemoveBracesLLVM
Remove the braces of an else block only if the r_brace of the block is followed by an if.
Differential Revision: https://reviews.llvm.org/D127532
|
|
Revision tags: llvmorg-14.0.5 |
|
| #
40a5d79a |
| 09-Jun-2022 |
owenca <[email protected]> |
[clang-format][NFC] Format lib/Format and unittests/Format in clang
Reformat these directories with InsertBraces and RemoveBracesLLVM.
Differential Revision: https://reviews.llvm.org/D127366
|
| #
5ead1f13 |
| 06-Jun-2022 |
owenca <[email protected]> |
[clang-format] Remove braces of else blocks that embody an if block
Fixes #55663.
Differential Revision: https://reviews.llvm.org/D127260
|
| #
fc1c160f |
| 04-Jun-2022 |
owenca <[email protected]> |
[clang-format] Handle attributes for for/while loops
Fixes #55853.
Differential Revision: https://reviews.llvm.org/D127054
|
| #
db15e312 |
| 01-Jun-2022 |
owenca <[email protected]> |
[clang-format] Handle do-while loops for RemoveBracesLLVM
Also updates the unit tests to match the updated LLVM Coding Standards.
Differential Revision: https://reviews.llvm.org/D126758
|
| #
5221875a |
| 26-May-2022 |
owenca <[email protected]> |
[clang-format] Fix an invalid code generation in RemoveBracesLLVM
Fixes #55706.
Differential Revision: https://reviews.llvm.org/D126438
|
| #
8f70d16c |
| 26-May-2022 |
Tyler Chatow <[email protected]> |
[clang-format] Handle attributes in enum declaration.
Fixes https://github.com/llvm/llvm-project/issues/55457
Ensures that attributes in the enum declaration are interpreted correctly, for instance
[clang-format] Handle attributes in enum declaration.
Fixes https://github.com/llvm/llvm-project/issues/55457
Ensures that attributes in the enum declaration are interpreted correctly, for instance:
``` enum class [[nodiscard]] E { a, b }; ```
Reviewed By: MyDeveloperDay, curdeius
Differential Revision: https://reviews.llvm.org/D125848
show more ...
|
|
Revision tags: llvmorg-14.0.4 |
|
| #
554efc22 |
| 21-May-2022 |
owenca <[email protected]> |
[clang-format] Format unit tests with InsertBraces/RemoveBracesLLVM
|
| #
130a9cc0 |
| 21-May-2022 |
owenca <[email protected]> |
[clang-format] Fix a crash on lambda trailing return type
Fixes #55625.
|
| #
f4d52cad |
| 21-May-2022 |
owenca <[email protected]> |
[clang-format] Fix a bug in "AfterControlStatement: MultiLine"
Fixes #55582.
Differential Revision: https://reviews.llvm.org/D125959
|
| #
1443dbab |
| 16-May-2022 |
owenca <[email protected]> |
[clang-format] Handle "complex" conditionals in RemoveBracesLLVM
Do not remove braces if the conditional of if/for/while might not fit on a single line even after the opening brace is removed.
Exam
[clang-format] Handle "complex" conditionals in RemoveBracesLLVM
Do not remove braces if the conditional of if/for/while might not fit on a single line even after the opening brace is removed.
Examples: // ColumnLimit: 20 // 45678901234567890 if (a) { /* Remove. */ foo(); } if (-b >= c) { // Keep. bar(); }
Differential Revision: https://reviews.llvm.org/D126052
show more ...
|
| #
749fb33e |
| 20-May-2022 |
Tobias Hieta <[email protected]> |
[clang-format] Don't break lines after pragma region
We have autogenerated pragma regions in our code which where awkwardly broken up like this:
``` #pragma region foo(bar : hello) ``` becomes
```
[clang-format] Don't break lines after pragma region
We have autogenerated pragma regions in our code which where awkwardly broken up like this:
``` #pragma region foo(bar : hello) ``` becomes
``` #pragma region foo(bar \ : hello) ```
This fixes the problem by adding region as a keyword and handling it the same way as pragma mark
Reviewed By: curdeius
Differential Revision: https://reviews.llvm.org/D125961
show more ...
|
| #
573a5b58 |
| 18-May-2022 |
Marek Kurdej <[email protected]> |
Revert "[clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline."
This reverts commit 50cd52d9357224cce66a9e00c9a0417c658a5655.
It pr
Revert "[clang-format] Fix WhitespaceSensitiveMacros not being honoured when macro closing parenthesis is followed by a newline."
This reverts commit 50cd52d9357224cce66a9e00c9a0417c658a5655.
It provoked regressions in C++ and ObjectiveC as described in https://reviews.llvm.org/D123676#3515949.
Reproducers: ``` MACRO_BEGIN #if A int f(); #else int f(); #endif ```
``` NS_SWIFT_NAME(A) @interface B : C @property(readonly) D value; @end ```
show more ...
|
| #
e57f5784 |
| 16-May-2022 |
Gregory Fong <[email protected]> |
[clang-format] fix alignment w/o binpacked args
The combination of
- AlignConsecutiveAssignments.Enabled = true - BinPackArguments = false
would result in the first continuation line of a braced-i
[clang-format] fix alignment w/o binpacked args
The combination of
- AlignConsecutiveAssignments.Enabled = true - BinPackArguments = false
would result in the first continuation line of a braced-init-list being improperly indented (missing a shift) when in a continued function call. Indentation was also wrong for braced-init-lists continuing a direct-list-initialization. Check for opening braced lists in continuation and ensure that the correct shift occurs.
Fixes https://github.com/llvm/llvm-project/issues/55360
Reviewed By: curdeius
Differential Revision: https://reviews.llvm.org/D125162
show more ...
|
| #
e20bc892 |
| 13-May-2022 |
Marek Kurdej <[email protected]> |
[clang-format] Fix PointerAlignment: Right not working with tab indentation.
Fixes https://github.com/llvm/llvm-project/issues/55407.
Given configuration: ``` UseTab: Always PointerAlignment: Right
[clang-format] Fix PointerAlignment: Right not working with tab indentation.
Fixes https://github.com/llvm/llvm-project/issues/55407.
Given configuration: ``` UseTab: Always PointerAlignment: Right AlignConsecutiveDeclarations: true ```
Before, the pointer was misaligned in this code: ``` void f() { unsigned long long big; char *ptr; // misaligned int i; } ```
That was due to the fact that when handling right-aligned pointers, the Spaces were changed but StartOfTokenColumn was not.
Also, a tab was used not only for indentation but for spacing too when using `UseTab: ForIndentation` config option: ``` void f() { unsigned long long big; char *ptr; // \t after char int i; } ```
Reviewed By: owenpan
Differential Revision: https://reviews.llvm.org/D125528
show more ...
|