[PATCH] D152975: [clang-format] Allow break after return keyword

2023-06-22 Thread Gedare Bloom via Phabricator via cfe-commits
gedare abandoned this revision. gedare added a comment. I don't like the approach I took. It will be hard (impossible) to tune a default return penalty that ensures backward compatibility. The only way I see to make this work is to add an option to enable breaks after the return keyword. This

[PATCH] D152975: [clang-format] Allow break after return keyword

2023-06-21 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/lib/Format/Format.cpp:1484 LLVMStyle.PenaltyBreakFirstLessLess = 120; + LLVMStyle.PenaltyBreakReturn = 100; LLVMStyle.PenaltyBreakString = 1000; is 100 the current penalty? Comment

[PATCH] D152975: [clang-format] Allow break after return keyword

2023-06-18 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D152975#4430504 , @gedare wrote: > In D152975#4425932 , > @HazardyKnusperkeks wrote: > >> And please add a remark in the changelog. > > Is there a separate changelog file?

[PATCH] D152975: [clang-format] Allow break after return keyword

2023-06-17 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. See D153205#4430528 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152975/new/ https://reviews.llvm.org/D152975 ___ cfe-commits

[PATCH] D152975: [clang-format] Allow break after return keyword

2023-06-17 Thread Gedare Bloom via Phabricator via cfe-commits
gedare added a comment. In D152975#4425932 , @HazardyKnusperkeks wrote: > I'd like more tests (and examples how it is before the change), some > operations (+, *, etc.), your stated string literal with and without many > spaces, call chains. Ok.

[PATCH] D152975: [clang-format] Allow break after return keyword

2023-06-15 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. I'd like more tests (and examples how it is before the change), some operations (+, *, etc.), your stated string literal with and without many spaces, call chains. I have nothing against the introduction, I'm just not sure about the default value and the

[PATCH] D152975: [clang-format] Allow break after return keyword

2023-06-14 Thread Gedare Bloom via Phabricator via cfe-commits
gedare updated this revision to Diff 531561. gedare added a comment. - Regenerate ClangFormatStyleOptions.rst Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152975/new/ https://reviews.llvm.org/D152975 Files:

[PATCH] D152975: [clang-format] Allow break after return keyword

2023-06-14 Thread Gedare Bloom via Phabricator via cfe-commits
gedare updated this revision to Diff 531557. gedare added a comment. Regenerate docs Herald added a comment. NOTE: Clang-Format Team Automated Review Comment Your review contains a change to ClangFormatStyleOptions.rst but not a change to clang/include/clang/Format/Format.h

[PATCH] D152975: [clang-format] Allow break after return keyword

2023-06-14 Thread Gedare Bloom via Phabricator via cfe-commits
gedare created this revision. Herald added projects: All, clang, clang-format. Herald added a subscriber: cfe-commits. Herald added reviewers: rymiel, HazardyKnusperkeks, owenpan, MyDeveloperDay. gedare requested review of this revision. Herald added a comment. NOTE: Clang-Format Team Automated