10 Commits

Author SHA1 Message Date
Backl1ght
c24cdd58a1 [clang-format] PackConstructorInitializers support PCIS_OnlyNextLine
fixes https://github.com/llvm/llvm-project/issues/60241

Differential Revision: https://reviews.llvm.org/D143091
2023-02-06 19:39:05 +08:00
Backl1ght
58751f943f [clang-format] SortUsingDeclarations support lexicographic order
fix https://github.com/llvm/llvm-project/issues/59930

Differential Revision: https://reviews.llvm.org/D141694
2023-01-20 21:34:57 +08:00
Owen Pan
e3eca33594 [clang-format] Replace DeriveLineEnding and UseCRLF with LineEnding
Below is the mapping:
LineEnding  DeriveLineEnding UseCRLF
LF                false       false
CRLF              false       true
DeriveLF          true        false
DeriveCRLF        true        true

Differential Revision: https://reviews.llvm.org/D141654
2023-01-13 15:46:34 -08:00
Krasimir Georgiev
922c8891d9 Revert "Revert "[clang-format] Add an option for breaking after C++11 attributes""
This reverts commit 879bfe6a979295f834b76df66b19a203b93eed0f.

owenpan@ pointed out on https://reviews.llvm.org/D140956 that this
actually makes the formatting more consistent, so it's not a regression.
2023-01-11 11:30:30 +00:00
Krasimir Georgiev
879bfe6a97 Revert "[clang-format] Add an option for breaking after C++11 attributes"
This reverts commit a28f0747c2f3728bd8a6f64f7c8ba80b4e0cda9f.

It appears that this regresses some function definitions, added an
example as a comment over at https://reviews.llvm.org/D140956.
2023-01-10 09:23:44 +00:00
Owen Pan
2c6ecc9db6 [clang-format] Add an option to insert a newline at EOF if missing
Closes #38042.

Differential Revision: https://reviews.llvm.org/D141035
2023-01-05 15:25:51 -08:00
Owen Pan
a28f0747c2 [clang-format] Add an option for breaking after C++11 attributes
Fixes #45968.
Fixes #54265.
Fixes #58102.

Differential Revision: https://reviews.llvm.org/D140956
2023-01-05 04:08:58 -08:00
Owen Pan
1ae689109f [clang-format][NFC] Remove CRs at EOLs introduced in 617277e7cbda 2023-01-02 19:13:51 -08:00
Backl1ght
95c1a17433 [clang-format] add config parse test for short lambda
Reviewed By: HazardyKnusperkeks, MyDeveloperDay
Differential Revision: https://reviews.llvm.org/D140105
2022-12-16 21:36:07 +08:00
Björn Schäpers
617277e7cb [clang-format][NFC] Moved configuration parsing tests in own file
I want to reduce the size of ForatTest.cpp with its still wopping 25k
lines it is a burden on the compiler and editor (mine is clangd
powered).

This are tests which are really serving a different purpose than
formatting.

I've copied the code and made the following changes:
- Dropped the ; at the end of some macros, all macro "invocations"
  already have their own ;.
- Dropped the _F, we don't need a fxiture here.

Differential Revisison: https://reviews.llvm.org/D137823
2022-11-16 07:02:09 +01:00