=?utf-8?q?Tomáš?= Slanina <itzexpoe...@gmail.com>, =?utf-8?q?Tomáš?= Slanina <itzexpoe...@gmail.com>, =?utf-8?q?Tomáš?= Slanina <itzexpoe...@gmail.com>, =?utf-8?q?Tomáš?= Slanina <itzexpoe...@gmail.com>, =?utf-8?q?Tomáš?= Slanina <itzexpoe...@gmail.com>, =?utf-8?q?Tomáš?= Slanina <itzexpoe...@gmail.com>, =?utf-8?q?Tomáš?= Slanina <itzexpoe...@gmail.com>, =?utf-8?q?Tomáš?= Slanina <itzexpoe...@gmail.com> Message-ID: In-Reply-To: <llvm.org/llvm/llvm-project/pull/154...@github.com>
================ @@ -8575,6 +8575,19 @@ TEST_F(FormatTest, BreaksFunctionDeclarations) { Style); } +TEST_F(FormatTest, BreakFunctionsReturningRecords) { + FormatStyle Style = getLLVMStyle(); + Style.BreakBeforeBraces = FormatStyle::BS_Custom; + Style.BraceWrapping.AfterFunction = true; + Style.BraceWrapping.AfterClass = false; + Style.BraceWrapping.AfterStruct = false; + Style.BraceWrapping.AfterUnion = false; + + verifyFormat("class Bar foo() {}", Style); + verifyFormat("struct Bar foo() {}", Style); + verifyFormat("union Bar foo() {}", Style); +} ---------------- owenca wrote: This unit test will pass with and without this patch and can be deleted. (It can be added in another patch if not already covered.) https://github.com/llvm/llvm-project/pull/154580 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits