[clang] [clang-format] Add `AllowShortNamespacesOnASingleLine` option (PR #105597)
Owen Pan via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 30 00:54:22 PST 2024
================
@@ -28314,6 +28320,116 @@ TEST_F(FormatTest, KeepFormFeed) {
Style);
}
+TEST_F(FormatTest, ShortNamespacesOption) {
+ auto BaseStyle = getLLVMStyle();
+ BaseStyle.AllowShortNamespacesOnASingleLine = true;
+ BaseStyle.FixNamespaceComments = false;
+ BaseStyle.CompactNamespaces = true;
+
+ auto Style = BaseStyle;
----------------
owenca wrote:
```suggestion
auto Style = getLLVMStyle();
Style.AllowShortNamespacesOnASingleLine = true;
Style.CompactNamespaces = true;
Style.FixNamespaceComments = false;
```
https://github.com/llvm/llvm-project/pull/105597
More information about the cfe-commits
mailing list