================ @@ -26451,6 +26451,20 @@ TEST_F(FormatTest, BreakAfterAttributes) { "{\n" "}", CtorDtorCode, Style); + + Style.BreakBeforeBraces = FormatStyle::BS_Attach; + Style.ReferenceAlignment = FormatStyle::ReferenceAlignmentStyle::RAS_Left; + verifyFormat("struct Foo {\n" + " [[maybe_unused]]\n" + " void operator+();\n" + "};\n" + "[[nodiscard]]\n" + "Foo& operator-(Foo&);", + "struct Foo {\n" + "[[maybe_unused]] void operator+();\n" + "};\n" + "[[nodiscard]] Foo &operator-(Foo&);", ---------------- owenca wrote:
Please split the test cases and use the single argument version of `verifyFormat`, e.g.: ```suggestion verifyFormat("struct Foo {\n" " [[maybe_unused]]\n" " void operator+();\n" "};\n" "[[nodiscard]]\n" "Foo &operator-(Foo &);", Style); Style.ReferenceAlignment = FormatStyle::ReferenceAlignmentStyle::RAS_Left; verifyFormat("[[nodiscard]]\n" "Foo& operator-(Foo&);", ``` https://github.com/llvm/llvm-project/pull/74943 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits