ksyx added a comment. Test code:
// test.cpp #include <algorithm> #include <cstdio> #include <cstring> 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 // line breaking mode of brackets } template<typename T> int method2(T x) { // ... } int method3(int par) {} }; class C { } } namespace Ns2 { } Tests ran: # pwd = build directory bin/clang-format test.cpp # LLVM Style bin/clang-format -style='{SeparateDefinitionBlocks: false}' test.cpp # Disable functionality bin/clang-format -style='{BasedOnStyle: Google}' test.cpp # Disable by default bin/clang-format -style='{BasedOnStyle: Google, SeparateDefinitionBlocks: true}' test.cpp # Override default bin/clang-format -style='{BasedOnStyle: WebKit}' test.cpp # Opening bracket in new line (WebKit style has this functionality enabled) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116314/new/ https://reviews.llvm.org/D116314 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits