=?utf-8?q?Tom=C3=A1=C5=A1?= Slanina <[email protected]>,
=?utf-8?q?Tom=C3=A1=C5=A1?= Slanina <[email protected]>,
=?utf-8?q?Tom=C3=A1=C5=A1?= Slanina <[email protected]>,
=?utf-8?q?Tom=C3=A1=C5=A1?= Slanina <[email protected]>,
=?utf-8?q?Tom=C3=A1=C5=A1?= Slanina <[email protected]>,
=?utf-8?q?Tom=C3=A1=C5=A1?= Slanina <[email protected]>,
=?utf-8?q?Tom=C3=A1=C5=A1?= Slanina <[email protected]>,
=?utf-8?q?Tom=C3=A1=C5=A1?= Slanina <[email protected]>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/[email protected]>
================
@@ -15277,6 +15290,123 @@ TEST_F(FormatTest, NeverMergeShortRecords) {
Style);
}
+TEST_F(FormatTest, AllowShortRecordOnASingleLineNonSplit) {
+ FormatStyle Style = getLLVMStyle();
+
+ Style.BreakBeforeBraces = FormatStyle::BS_Custom;
+ Style.BraceWrapping.SplitEmptyRecord = false;
+
+ Style.AllowShortRecordOnASingleLine = FormatStyle::SRS_Never;
+ verifyFormat("class foo {\n"
+ " void bar();\n"
+ "};",
+ Style);
+ verifyFormat("class foo {\n};", Style);
----------------
owenca wrote:
```suggestion
verifyFormat("class foo {\n"
"};",
Style);
```
Please use one string literal per line. This applies to all test cases.
https://github.com/llvm/llvm-project/pull/154580
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits