[PATCH] D116314: [Clangfmt] Add style to separate definition blocks

2021-12-28 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:3404 + + * ``SDS_Leave`` (in configuration: ``Leave``) +Leave definition blocks separated as they are. This enumeration surely needs 3 settings ``` Leave, // don't

[PATCH] D116314: [Clangfmt] Add style to separate definition blocks

2021-12-28 Thread Marek Kurdej via Phabricator via cfe-commits
curdeius requested changes to this revision. curdeius added a comment. This revision now requires changes to proceed. Thanks for working on this. Please add unit tests that verify the expected behaviour. Keep them simple. You can inspire yourself from existing tests. Comment a

[PATCH] D116314: [Clangfmt] Add style to separate definition blocks

2021-12-27 Thread ksyx via Phabricator via cfe-commits
ksyx updated this revision to Diff 396358. ksyx marked an inline comment as done. ksyx added a comment. - Change bool type of the option to enum type - Generate empty line for enum block Testfile: // test.cpp #include #include #include struct Foo { int a,b,c; }; namespace Ns

[PATCH] D116314: [Clangfmt] Add style to separate definition blocks

2021-12-27 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay requested changes to this revision. MyDeveloperDay added inline comments. This revision now requires changes to proceed. Comment at: clang/lib/Format/Format.cpp:1197 LLVMStyle.ReferenceAlignment = FormatStyle::RAS_Pointer; + LLVMStyle.SeparateDefinitionBlocks =

[PATCH] D116314: [Clangfmt] Add style to separate definition blocks

2021-12-27 Thread ksyx via Phabricator via cfe-commits
ksyx updated this revision to Diff 396344. ksyx added a comment. Fix missing colon in sample/test code CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116314/new/ https://reviews.llvm.org/D116314 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h clan

[PATCH] D116314: [Clangfmt] Add style to separate definition blocks

2021-12-27 Thread ksyx via Phabricator via cfe-commits
ksyx added inline comments. Comment at: clang/lib/Format/Format.cpp:1197 LLVMStyle.ReferenceAlignment = FormatStyle::RAS_Pointer; + LLVMStyle.SeparateDefinitionBlocks = true; LLVMStyle.ShortNamespaceLines = 1; ksyx wrote: > Not so sure about this as it wou

[PATCH] D116314: [Clangfmt] Add style to separate definition blocks

2021-12-27 Thread ksyx via Phabricator via cfe-commits
ksyx added inline comments. Comment at: clang/lib/Format/Format.cpp:1197 LLVMStyle.ReferenceAlignment = FormatStyle::RAS_Pointer; + LLVMStyle.SeparateDefinitionBlocks = true; LLVMStyle.ShortNamespaceLines = 1; Not so sure about this as it would break some

[PATCH] D116314: [Clangfmt] Add style to separate definition blocks

2021-12-27 Thread ksyx via Phabricator via cfe-commits
ksyx updated this revision to Diff 396321. ksyx added a comment. Apply clang-format suggestions CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116314/new/ https://reviews.llvm.org/D116314 Files: clang/docs/ClangFormatStyleOptions.rst clang/include/clang/Format/Format.h clang/lib/F

[PATCH] D116314: [Clangfmt] Add style to separate definition blocks

2021-12-27 Thread ksyx via Phabricator via cfe-commits
ksyx added a comment. Test code: // test.cpp #include #include #include struct Foo { int a,b,c; }; namespace Ns { class Bar { public: struct Foobar { int a; int b; }; private: int t; int method1() { // Intentional test for different

[PATCH] D116314: [Clangfmt] Add style to separate definition blocks

2021-12-27 Thread ksyx via Phabricator via cfe-commits
ksyx created this revision. ksyx added a reviewer: MyDeveloperDay. ksyx added projects: clang-format, clang. ksyx requested review of this revision. Herald added a subscriber: cfe-commits. This commit resolves GitHub issue #45895 (Bugzilla #4655