================ @@ -1959,6 +1964,52 @@ the configuration (without a prefix: ``Auto``). }; void f() { bar(); } + Also can be specified as a nested configuration flag: + + .. code-block:: c++ + + # Example of usage: + AllowShortFunctionsOnASingleLine: InlineOnly + + # or more granular control: + AllowShortFunctionsOnASingleLine: + Empty: false + Inline: true + All: false + + * ``bool Empty`` Merge top-level empty functions. + + .. code-block:: c++ + + void f() {} + void f2() { + bar2(); + } + void f3() { /* comment */ } + + * ``bool Inline`` Merge functions defined inside a class. + + .. code-block:: c++ + + class Foo { + void f() { foo(); } + void g() {} + }; + void f() { + foo(); + } + void f() { + } + + * ``bool Other`` Merge all functions fitting on a single line. Please note that this ---------------- irymarchyk wrote:
Should we expose this option to user? I am not sure what it means if we set only Other, but not others - then C/C++ code will behave like SFS_All. Probably we should leave it to only set it when user sets 'All' in configuration. https://github.com/llvm/llvm-project/pull/134337 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits