[clang] [clang-format] Change LLVM style to BreakAfterAttributes == ABS_Leave (PR #70360)

Owen Pan via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 27 02:41:28 PDT 2023


================
@@ -26179,7 +26179,7 @@ TEST_F(FormatTest, RemoveSemicolon) {
 
 TEST_F(FormatTest, BreakAfterAttributes) {
   FormatStyle Style = getLLVMStyle();
-  EXPECT_EQ(Style.BreakAfterAttributes, FormatStyle::ABS_Never);
+  EXPECT_EQ(Style.BreakAfterAttributes, FormatStyle::ABS_Leave);
----------------
owenca wrote:

Can you move it down to just above line 26196, with an empty line separating it from `Code` above?
```
                           "  i = 0;\n"
                           "  return 1;\n"
                           "}");

  EXPECT_EQ(Style.BreakAfterAttributes, FormatStyle::ABS_Leave);
  verifyNoChange(Code, Style);

  Style.BreakAfterAttributes = FormatStyle::ABS_Never;
  verifyFormat("[[nodiscard]] inline int f(int &i);\n"
               "[[foo([[]])]] [[nodiscard]] int g(int &i);\n"
               "[[nodiscard]] inline int f(int &i) {\n"
```

https://github.com/llvm/llvm-project/pull/70360


More information about the cfe-commits mailing list