[PATCH] D98429: [clang-format] Add new option to clang-format: SpaceBeforeForLoopSemiColon

2021-03-11 Thread Nathan Hjelm via Phabricator via cfe-commits
hjelmn created this revision. hjelmn added reviewers: krasimir, djasper. hjelmn requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The option SpaceBeforeForLoopSemiColon controls whether clang-format puts a space before the semi-colons in a fo

[PATCH] D98429: [clang-format] Add new option to clang-format: SpaceBeforeForLoopSemiColon

2021-03-15 Thread Nathan Hjelm via Phabricator via cfe-commits
hjelmn updated this revision to Diff 330800. hjelmn edited the summary of this revision. hjelmn added a comment. Updated change log and added a test to cover range based for with initializer. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98429/new/

[PATCH] D98429: [clang-format] Add new option to clang-format: SpaceBeforeForLoopSemiColon

2021-03-15 Thread Nathan Hjelm via Phabricator via cfe-commits
hjelmn updated this revision to Diff 330834. hjelmn added a comment. Fixed a typo Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98429/new/ https://reviews.llvm.org/D98429 Files: clang/docs/ClangFormatStyleOptions.rst clang/docs/ReleaseNotes.rs

[PATCH] D98429: [clang-format] Add new option to clang-format: SpaceBeforeForLoopSemiColon

2021-03-15 Thread Nathan Hjelm via Phabricator via cfe-commits
hjelmn updated this revision to Diff 330865. hjelmn added a comment. One more issue with the test. Made a mistake with whether there is a space before the colon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D98429/new/ https://reviews.llvm.org/D98

[PATCH] D98429: [clang-format] Add new option to clang-format: SpaceBeforeForLoopSemiColon

2021-03-16 Thread Nathan Hjelm via Phabricator via cfe-commits
hjelmn added inline comments. Comment at: clang/docs/ReleaseNotes.rst:168 +- Option ``SpaceBeforeForLoopSemiColon`` has been added to control whether + spaces will be added before the semi-colons in for loops. HazardyKnusperkeks wrote: > No need for change, bu

[PATCH] D98429: [clang-format] Add new option to clang-format: SpaceBeforeForLoopSemiColon

2021-03-19 Thread Nathan Hjelm via Phabricator via cfe-commits
hjelmn added a comment. This is something I have been doing for over 20 years now. Not sure when I initially picked it up but I find a space before the ;'s in a C for loop improves readability. It more clearly differentiates the different parts. I beleive the space before the colon in C++ range