[PATCH] D139786: [clang-format] AllowShortRequiresExpressionOnASingleLine

2022-12-12 Thread Zhikai Zeng via Phabricator via cfe-commits
Backl1ght updated this revision to Diff 482062. Backl1ght retitled this revision from "[clang-format] AllowShortRequiresExpressionOnASingleLine and AllowShortCompoundRequirementOnASingleLine" to "[clang-format] AllowShortRequiresExpressionOnASingleLine". Backl1ght edited the summary of this revi

[PATCH] D139786: [clang-format] AllowShortRequiresExpressionOnASingleLine

2022-12-12 Thread Zhikai Zeng via Phabricator via cfe-commits
Backl1ght updated this revision to Diff 482066. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139786/new/ https://reviews.llvm.org/D139786 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h clang/lib/Format/Format.cpp clang/lib/Format/UnwrappedLineF

[PATCH] D139786: [clang-format] AllowShortRequiresExpressionOnASingleLine

2022-12-12 Thread Zhikai Zeng via Phabricator via cfe-commits
Backl1ght added a comment. I just find out I miss one case like below template concept c = requires(T x) { { x + 1 } -> std::same_as; }; Since I split AllowShortRequiresExpressionOnASingleLine and AllowShortCompoundRequirementOnASingleLine into two pathes, I can not fix this until AllowSho

[PATCH] D139786: [clang-format] AllowShortRequiresExpressionOnASingleLine

2022-12-12 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. Please mark comments as done. Comment at: clang/lib/Format/Format.cpp:1270 LLVMStyle.AllowShortLoopsOnASingleLine = false; + LLVMStyle.AllowShortRequiresExpressionOnASingleLine = true; LLVMStyle.AlwaysBreakAfterReturnType = FormatStyle

[PATCH] D139786: [clang-format] AllowShortRequiresExpressionOnASingleLine

2022-12-13 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. ditto my concerns with D139834: [clang-format] AllowShortCompoundRequirementOnASingleLine as to if we should have a Leave option CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139786/new/ https://reviews.llvm.org/D13978

[PATCH] D139786: [clang-format] AllowShortRequiresExpressionOnASingleLine and AllowShortCompoundRequirementOnASingleLine

2022-12-11 Thread Zhikai Zeng via Phabricator via cfe-commits
Backl1ght created this revision. Backl1ght added a reviewer: OwenCax. Backl1ght added a project: clang-format. Herald added a project: All. Backl1ght requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. clang-format did not take requires into co

[PATCH] D139786: [clang-format] AllowShortRequiresExpressionOnASingleLine and AllowShortCompoundRequirementOnASingleLine

2022-12-11 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel added a comment. Please re-upload with full context. See https://llvm.org/docs/Phabricator.html#requesting-a-review-via-the-web-interface Comment at: clang/lib/Format/Format.cpp:811 Style.AllowShortEnumsOnASingleLine); +IO.mapOptional("AllowShort

[PATCH] D139786: [clang-format] AllowShortRequiresExpressionOnASingleLine and AllowShortCompoundRequirementOnASingleLine

2022-12-11 Thread Zhikai Zeng via Phabricator via cfe-commits
Backl1ght updated this revision to Diff 481918. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139786/new/ https://reviews.llvm.org/D139786 Files: clang/include/clang/Format/Format.h clang/lib/Format/Format.cpp clang/lib/Format/UnwrappedLineFormatter.cpp clang/lib/Format/Unwrapped

[PATCH] D139786: [clang-format] AllowShortRequiresExpressionOnASingleLine and AllowShortCompoundRequirementOnASingleLine

2022-12-11 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. I don't know if adding two options at once (and I think you want to add a third), splitting that up might be a better idea. Anyway you need to tun `clang/docs/tools/dump_format_style.py` and add an entry in the changelog. Comment at: clang