[PATCH] D154550: [clang-format] Allow empty loops on a single line.

2023-11-09 Thread Gedare Bloom via Phabricator via cfe-commits
gedare abandoned this revision. gedare added a comment. This is not needed due to https://github.com/llvm/llvm-project/pull/70768 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154550/new/ https://reviews.llvm.org/D154550 __

[PATCH] D154550: [clang-format] Allow empty loops on a single line.

2023-08-05 Thread Gedare Bloom via Phabricator via cfe-commits
gedare added a comment. In D154550#4562061 , @owenpan wrote: > In D154550#4529346 , @gedare wrote: > >> In D154550#4526386 , @owenpan >> wrote: >> >>> Like `while (a);`,

[PATCH] D154550: [clang-format] Allow empty loops on a single line.

2023-08-05 Thread Gedare Bloom via Phabricator via cfe-commits
gedare added a comment. In D154550#4562061 , @owenpan wrote: > In D154550#4529346 , @gedare wrote: > >> In D154550#4526386 , @owenpan >> wrote: >> >>> Like `while (a);`,

[PATCH] D154550: [clang-format] Allow empty loops on a single line.

2023-08-04 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. In D154550#4529346 , @gedare wrote: > In D154550#4526386 , @owenpan wrote: > >> Like `while (a);`, `while (a) {}` is also an empty loop, so `NonEmpty` is >> misleading if it excludes the

[PATCH] D154550: [clang-format] Allow empty loops on a single line.

2023-07-24 Thread Gedare Bloom via Phabricator via cfe-commits
gedare updated this revision to Diff 543721. gedare added a comment. This revision is now accepted and ready to land. Change option name from NonEmpty to NonNullStatement. Fix space before semi. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154550/n

[PATCH] D154550: [clang-format] Allow empty loops on a single line.

2023-07-24 Thread Gedare Bloom via Phabricator via cfe-commits
gedare planned changes to this revision. gedare added a comment. In D154550#4526386 , @owenpan wrote: > Like `while (a);`, `while (a) {}` is also an empty loop, so `NonEmpty` is > misleading if it excludes the former but not the latter. IMO we should jus

[PATCH] D154550: [clang-format] Allow empty loops on a single line.

2023-07-23 Thread Owen Pan via Phabricator via cfe-commits
owenpan added a comment. Like `while (a);`, `while (a) {}` is also an empty loop, so `NonEmpty` is misleading if it excludes the former but not the latter. IMO we should just fix the bug without extending the option because any loop with a single-statement body is a short loop. =

[PATCH] D154550: [clang-format] Allow empty loops on a single line.

2023-07-07 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks accepted this revision. HazardyKnusperkeks added a comment. This revision is now accepted and ready to land. Please wait for other opinions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154550/new/ https://reviews.llvm.org/D1545

[PATCH] D154550: [clang-format] Allow empty loops on a single line.

2023-07-06 Thread Gedare Bloom via Phabricator via cfe-commits
gedare updated this revision to Diff 537859. gedare added a comment. Regenerate complete diff Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D154550/new/ https://reviews.llvm.org/D154550 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/R

[PATCH] D154550: [clang-format] Allow empty loops on a single line.

2023-07-06 Thread Gedare Bloom via Phabricator via cfe-commits
gedare updated this revision to Diff 537857. gedare added a comment. Reorder traits and add comment about backward compatibility. Herald added a comment. NOTE: Clang-Format Team Automated Review Comment It looks like your clang-format review does not contain any unit tests, please try to ensu

[PATCH] D154550: [clang-format] Allow empty loops on a single line.

2023-07-06 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added inline comments. Comment at: clang/lib/Format/Format.cpp:595-599 +IO.enumCase(Value, "Never", FormatStyle::SWFLS_Never); +IO.enumCase(Value, "false", FormatStyle::SWFLS_Never); +IO.enumCase(Value, "NonEmpty", FormatStyle::SWFLS_NonEmpty); +

[PATCH] D154550: [clang-format] Allow empty loops on a single line.

2023-07-05 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. Changes the AllowShortLoopsOnASingleLine from a boolean to a