================
@@ -2885,6 +2885,22 @@ TEST_F(FormatTest, ShortEnums) {
" C\n"
"} ShortEnum1, ShortEnum2;",
Style);
+
+ Style.AllowShortEnumsOnASingleLine = true;
+ verifyFormat("enum\n"
+ "{\n"
+ " A,\n"
+ " B,\n"
+ " C\n"
+ "} ShortEnum1, ShortEnum2;",
+ Style);
+ verifyFormat("export enum\n"
+ "{\n"
+ " A,\n"
+ " B,\n"
+ " C\n"
+ "} ShortEnum1, ShortEnum2;",
+ Style);
----------------
owenca wrote:
```suggestion
verifyFormat("export enum class Foo\n"
"{\n"
" foo,\n"
" bar\n"
"};",
Style);
```
or something like that.
https://github.com/llvm/llvm-project/pull/189128
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits