Skip to content

Conversation

@HazardyKnusperkeks
Copy link
Contributor

And reduce the number of getLLVMStyleWithColumnLimit calls.

And reduce the number of getLLVMStyleWithColumnLimit calls.
@llvmbot
Copy link
Member

llvmbot commented Oct 20, 2025

@llvm/pr-subscribers-clang-format

Author: Björn Schäpers (HazardyKnusperkeks)

Changes

And reduce the number of getLLVMStyleWithColumnLimit calls.


Patch is 255.92 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/164310.diff

1 Files Affected:

  • (modified) clang/unittests/Format/FormatTestComments.cpp (+3389-3391)
diff --git a/clang/unittests/Format/FormatTestComments.cpp b/clang/unittests/Format/FormatTestComments.cpp
index fc80bf4024fd9..a9bd5d0cfa521 100644
--- a/clang/unittests/Format/FormatTestComments.cpp
+++ b/clang/unittests/Format/FormatTestComments.cpp
@@ -24,18 +24,20 @@ class FormatTestComments : public FormatTestBase {};
 //===----------------------------------------------------------------------===//
 
 TEST_F(FormatTestComments, UnderstandsSingleLineComments) {
+  const auto Style20 = getLLVMStyleWithColumns(20);
+
   verifyFormat("//* */");
   verifyFormat("// line 1\n"
                "// line 2\n"
                "void f() {}");
 
-  EXPECT_EQ("// comment", format("//comment"));
-  EXPECT_EQ("// #comment", format("//#comment"));
+  verifyFormat("// comment", "//comment");
+  verifyFormat("// #comment", "//#comment");
 
-  EXPECT_EQ("// comment\n"
-            "// clang-format on",
-            format("//comment\n"
-                   "// clang-format on"));
+  verifyFormat("// comment\n"
+               "// clang-format on",
+               "//comment\n"
+               "// clang-format on");
 
   verifyFormat("void f() {\n"
                "  // Doesn't do anything\n"
@@ -84,11 +86,11 @@ TEST_F(FormatTestComments, UnderstandsSingleLineComments) {
                "#include \"a/b/c\" // comment");
   verifyFormat("#include <a>     // comment\n"
                "#include <a/b/c> // comment");
-  EXPECT_EQ("#include \"a\"     // comment\n"
-            "#include \"a/b/c\" // comment",
-            format("#include \\\n"
-                   "  \"a\" // comment\n"
-                   "#include \"a/b/c\" // comment"));
+  verifyFormat("#include \"a\"     // comment\n"
+               "#include \"a/b/c\" // comment",
+               "#include \\\n"
+               "  \"a\" // comment\n"
+               "#include \"a/b/c\" // comment");
 
   verifyFormat("enum E {\n"
                "  // comment\n"
@@ -96,63 +98,63 @@ TEST_F(FormatTestComments, UnderstandsSingleLineComments) {
                "  VAL_B\n"
                "};");
 
-  EXPECT_EQ("enum A {\n"
-            "  // line a\n"
-            "  a,\n"
-            "  b, // line b\n"
-            "\n"
-            "  // line c\n"
-            "  c\n"
-            "};",
-            format("enum A {\n"
-                   "  // line a\n"
-                   "  a,\n"
-                   "  b, // line b\n"
-                   "\n"
-                   "  // line c\n"
-                   "  c\n"
-                   "};",
-                   getLLVMStyleWithColumns(20)));
-  EXPECT_EQ("enum A {\n"
-            "  a, // line 1\n"
-            "  // line 2\n"
-            "};",
-            format("enum A {\n"
-                   "  a, // line 1\n"
-                   "  // line 2\n"
-                   "};",
-                   getLLVMStyleWithColumns(20)));
-  EXPECT_EQ("enum A {\n"
-            "  a, // line 1\n"
-            "     // line 2\n"
-            "};",
-            format("enum A {\n"
-                   "  a, // line 1\n"
-                   "   // line 2\n"
-                   "};",
-                   getLLVMStyleWithColumns(20)));
-  EXPECT_EQ("enum A {\n"
-            "  a, // line 1\n"
-            "  // line 2\n"
-            "  b\n"
-            "};",
-            format("enum A {\n"
-                   "  a, // line 1\n"
-                   "  // line 2\n"
-                   "  b\n"
-                   "};",
-                   getLLVMStyleWithColumns(20)));
-  EXPECT_EQ("enum A {\n"
-            "  a, // line 1\n"
-            "     // line 2\n"
-            "  b\n"
-            "};",
-            format("enum A {\n"
-                   "  a, // line 1\n"
-                   "   // line 2\n"
-                   "  b\n"
-                   "};",
-                   getLLVMStyleWithColumns(20)));
+  verifyFormat("enum A {\n"
+               "  // line a\n"
+               "  a,\n"
+               "  b, // line b\n"
+               "\n"
+               "  // line c\n"
+               "  c\n"
+               "};",
+               "enum A {\n"
+               "  // line a\n"
+               "  a,\n"
+               "  b, // line b\n"
+               "\n"
+               "  // line c\n"
+               "  c\n"
+               "};",
+               Style20);
+  verifyFormat("enum A {\n"
+               "  a, // line 1\n"
+               "  // line 2\n"
+               "};",
+               "enum A {\n"
+               "  a, // line 1\n"
+               "  // line 2\n"
+               "};",
+               Style20);
+  verifyFormat("enum A {\n"
+               "  a, // line 1\n"
+               "     // line 2\n"
+               "};",
+               "enum A {\n"
+               "  a, // line 1\n"
+               "   // line 2\n"
+               "};",
+               Style20);
+  verifyFormat("enum A {\n"
+               "  a, // line 1\n"
+               "  // line 2\n"
+               "  b\n"
+               "};",
+               "enum A {\n"
+               "  a, // line 1\n"
+               "  // line 2\n"
+               "  b\n"
+               "};",
+               Style20);
+  verifyFormat("enum A {\n"
+               "  a, // line 1\n"
+               "     // line 2\n"
+               "  b\n"
+               "};",
+               "enum A {\n"
+               "  a, // line 1\n"
+               "   // line 2\n"
+               "  b\n"
+               "};",
+               Style20);
   verifyFormat(
       "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa =\n"
       "    bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb; // Trailing comment");
@@ -172,28 +174,28 @@ TEST_F(FormatTestComments, UnderstandsSingleLineComments) {
 
   verifyFormat("int aaaa; // aaaaa\n"
                "int aa;   // aaaaaaa",
-               getLLVMStyleWithColumns(20));
+               Style20);
 
-  EXPECT_EQ("void f() { // This does something ..\n"
-            "}\n"
-            "int a; // This is unrelated",
-            format("void f()    {     // This does something ..\n"
-                   "  }\n"
-                   "int   a;     // This is unrelated"));
-  EXPECT_EQ("class C {\n"
-            "  void f() { // This does something ..\n"
-            "  } // awesome..\n"
-            "\n"
-            "  int a; // This is unrelated\n"
-            "};",
-            format("class C{void f()    { // This does something ..\n"
-                   "      } // awesome..\n"
-                   " \n"
-                   "int a;    // This is unrelated\n"
-                   "};"));
-
-  EXPECT_EQ("int i; // single line trailing comment",
-            format("int i;\\\n// single line trailing comment"));
+  verifyFormat("void f() { // This does something ..\n"
+               "}\n"
+               "int a; // This is unrelated",
+               "void f()    {     // This does something ..\n"
+               "  }\n"
+               "int   a;     // This is unrelated");
+  verifyFormat("class C {\n"
+               "  void f() { // This does something ..\n"
+               "  } // awesome..\n"
+               "\n"
+               "  int a; // This is unrelated\n"
+               "};",
+               "class C{void f()    { // This does something ..\n"
+               "      } // awesome..\n"
+               " \n"
+               "int a;    // This is unrelated\n"
+               "};");
+
+  verifyFormat("int i; // single line trailing comment",
+               "int i;\\\n// single line trailing comment");
 
   verifyGoogleFormat("int a;  // Trailing comment.");
 
@@ -210,99 +212,99 @@ TEST_F(FormatTestComments, UnderstandsSingleLineComments) {
   verifyGoogleFormat(
       "aaaaaaaaaaaaaaaaaaaaaaaaaa(\n"
       "    aaaaaaaaaaaaaaaaaaaaaa);  // 81_cols_with_this_comment");
-  EXPECT_EQ("D(a, {\n"
-            "  // test\n"
-            "  int a;\n"
-            "});",
-            format("D(a, {\n"
-                   "// test\n"
-                   "int a;\n"
-                   "});"));
-
-  EXPECT_EQ("lineWith(); // comment\n"
-            "// at start\n"
-            "otherLine();",
-            format("lineWith();   // comment\n"
-                   "// at start\n"
-                   "otherLine();"));
-  EXPECT_EQ("lineWith(); // comment\n"
-            "/*\n"
-            " * at start */\n"
-            "otherLine();",
-            format("lineWith();   // comment\n"
-                   "/*\n"
-                   " * at start */\n"
-                   "otherLine();"));
-  EXPECT_EQ("lineWith(); // comment\n"
-            "            // at start\n"
-            "otherLine();",
-            format("lineWith();   // comment\n"
-                   " // at start\n"
-                   "otherLine();"));
-
-  EXPECT_EQ("lineWith(); // comment\n"
-            "// at start\n"
-            "otherLine(); // comment",
-            format("lineWith();   // comment\n"
-                   "// at start\n"
-                   "otherLine();   // comment"));
-  EXPECT_EQ("lineWith();\n"
-            "// at start\n"
-            "otherLine(); // comment",
-            format("lineWith();\n"
-                   " // at start\n"
-                   "otherLine();   // comment"));
-  EXPECT_EQ("// first\n"
-            "// at start\n"
-            "otherLine(); // comment",
-            format("// first\n"
-                   " // at start\n"
-                   "otherLine();   // comment"));
-  EXPECT_EQ("f();\n"
-            "// first\n"
-            "// at start\n"
-            "otherLine(); // comment",
-            format("f();\n"
-                   "// first\n"
-                   " // at start\n"
-                   "otherLine();   // comment"));
+  verifyFormat("D(a, {\n"
+               "  // test\n"
+               "  int a;\n"
+               "});",
+               "D(a, {\n"
+               "// test\n"
+               "int a;\n"
+               "});");
+
+  verifyFormat("lineWith(); // comment\n"
+               "// at start\n"
+               "otherLine();",
+               "lineWith();   // comment\n"
+               "// at start\n"
+               "otherLine();");
+  verifyFormat("lineWith(); // comment\n"
+               "/*\n"
+               " * at start */\n"
+               "otherLine();",
+               "lineWith();   // comment\n"
+               "/*\n"
+               " * at start */\n"
+               "otherLine();");
+  verifyFormat("lineWith(); // comment\n"
+               "            // at start\n"
+               "otherLine();",
+               "lineWith();   // comment\n"
+               " // at start\n"
+               "otherLine();");
+
+  verifyFormat("lineWith(); // comment\n"
+               "// at start\n"
+               "otherLine(); // comment",
+               "lineWith();   // comment\n"
+               "// at start\n"
+               "otherLine();   // comment");
+  verifyFormat("lineWith();\n"
+               "// at start\n"
+               "otherLine(); // comment",
+               "lineWith();\n"
+               " // at start\n"
+               "otherLine();   // comment");
+  verifyFormat("// first\n"
+               "// at start\n"
+               "otherLine(); // comment",
+               "// first\n"
+               " // at start\n"
+               "otherLine();   // comment");
+  verifyFormat("f();\n"
+               "// first\n"
+               "// at start\n"
+               "otherLine(); // comment",
+               "f();\n"
+               "// first\n"
+               " // at start\n"
+               "otherLine();   // comment");
   verifyFormat("f(); // comment\n"
                "// first\n"
                "// at start\n"
                "otherLine();");
-  EXPECT_EQ("f(); // comment\n"
-            "// first\n"
-            "// at start\n"
-            "otherLine();",
-            format("f();   // comment\n"
-                   "// first\n"
-                   " // at start\n"
-                   "otherLine();"));
-  EXPECT_EQ("f(); // comment\n"
-            "     // first\n"
-            "// at start\n"
-            "otherLine();",
-            format("f();   // comment\n"
-                   " // first\n"
-                   "// at start\n"
-                   "otherLine();"));
-  EXPECT_EQ("void f() {\n"
-            "  lineWith(); // comment\n"
-            "  // at start\n"
-            "}",
-            format("void              f() {\n"
-                   "  lineWith(); // comment\n"
-                   "  // at start\n"
-                   "}"));
-  EXPECT_EQ("int xy; // a\n"
-            "int z;  // b",
-            format("int xy;    // a\n"
-                   "int z;    //b"));
-  EXPECT_EQ("int xy; // a\n"
-            "int z; // bb",
-            format("int xy;    // a\n"
-                   "int z;    //bb",
-                   getLLVMStyleWithColumns(12)));
+  verifyFormat("f(); // comment\n"
+               "// first\n"
+               "// at start\n"
+               "otherLine();",
+               "f();   // comment\n"
+               "// first\n"
+               " // at start\n"
+               "otherLine();");
+  verifyFormat("f(); // comment\n"
+               "     // first\n"
+               "// at start\n"
+               "otherLine();",
+               "f();   // comment\n"
+               " // first\n"
+               "// at start\n"
+               "otherLine();");
+  verifyFormat("void f() {\n"
+               "  lineWith(); // comment\n"
+               "  // at start\n"
+               "}",
+               "void              f() {\n"
+               "  lineWith(); // comment\n"
+               "  // at start\n"
+               "}");
+  verifyFormat("int xy; // a\n"
+               "int z;  // b",
+               "int xy;    // a\n"
+               "int z;    //b");
+  verifyFormat("int xy; // a\n"
+               "int z; // bb",
+               "int xy;    // a\n"
+               "int z;    //bb",
+               getLLVMStyleWithColumns(12));
 
   verifyFormat("#define A                                                  \\\n"
                "  int i; /* iiiiiiiiiiiiiiiiiiiii */                       \\\n"
@@ -317,14 +319,14 @@ TEST_F(FormatTestComments, UnderstandsSingleLineComments) {
   verifyFormat("if ( // This is some comment\n"
                "    x + 3) {\n"
                "}");
-  EXPECT_EQ("if ( // This is some comment\n"
-            "     // spanning two lines\n"
-            "    x + 3) {\n"
-            "}",
-            format("if( // This is some comment\n"
-                   "     // spanning two lines\n"
-                   " x + 3) {\n"
-                   "}"));
+  verifyFormat("if ( // This is some comment\n"
+               "     // spanning two lines\n"
+               "    x + 3) {\n"
+               "}",
+               "if( // This is some comment\n"
+               "     // spanning two lines\n"
+               " x + 3) {\n"
+               "}");
 
   verifyNoCrash("/\\\n/");
   verifyNoCrash("/\\\n* */");
@@ -333,35 +335,35 @@ TEST_F(FormatTestComments, UnderstandsSingleLineComments) {
 }
 
 TEST_F(FormatTestComments, KeepsParameterWithTrailingCommentsOnTheirOwnLine) {
-  EXPECT_EQ("SomeFunction(a,\n"
-            "             b, // comment\n"
-            "             c);",
-            format("SomeFunction(a,\n"
-                   "          b, // comment\n"
-                   "      c);"));
-  EXPECT_EQ("SomeFunction(a, b,\n"
-            "             // comment\n"
-            "             c);",
-            format("SomeFunction(a,\n"
-                   "          b,\n"
-                   "  // comment\n"
-                   "      c);"));
-  EXPECT_EQ("SomeFunction(a, b, // comment (unclear relation)\n"
-            "             c);",
-            format("SomeFunction(a, b, // comment (unclear relation)\n"
-                   "      c);"));
-  EXPECT_EQ("SomeFunction(a, // comment\n"
-            "             b,\n"
-            "             c); // comment",
-            format("SomeFunction(a,     // comment\n"
-                   "          b,\n"
-                   "      c); // comment"));
-  EXPECT_EQ("aaaaaaaaaa(aaaa(aaaa,\n"
-            "                aaaa), //\n"
-            "           aaaa, bbbbb);",
-            format("aaaaaaaaaa(aaaa(aaaa,\n"
-                   "aaaa), //\n"
-                   "aaaa, bbbbb);"));
+  verifyFormat("SomeFunction(a,\n"
+               "             b, // comment\n"
+               "             c);",
+               "SomeFunction(a,\n"
+               "          b, // comment\n"
+               "      c);");
+  verifyFormat("SomeFunction(a, b,\n"
+               "             // comment\n"
+               "             c);",
+               "SomeFunction(a,\n"
+               "          b,\n"
+               "  // comment\n"
+               "      c);");
+  verifyFormat("SomeFunction(a, b, // comment (unclear relation)\n"
+               "             c);",
+               "SomeFunction(a, b, // comment (unclear relation)\n"
+               "      c);");
+  verifyFormat("SomeFunction(a, // comment\n"
+               "             b,\n"
+               "             c); // comment",
+               "SomeFunction(a,     // comment\n"
+               "          b,\n"
+               "      c); // comment");
+  verifyFormat("aaaaaaaaaa(aaaa(aaaa,\n"
+               "                aaaa), //\n"
+               "           aaaa, bbbbb);",
+               "aaaaaaaaaa(aaaa(aaaa,\n"
+               "aaaa), //\n"
+               "aaaa, bbbbb);");
 
   FormatStyle BreakAlways = getLLVMStyle();
   BreakAlways.BinPackParameters = FormatStyle::BPPS_AlwaysOnePerLine;
@@ -378,12 +380,12 @@ TEST_F(FormatTestComments, KeepsParameterWithTrailingCommentsOnTheirOwnLine) {
 }
 
 TEST_F(FormatTestComments, RemovesTrailingWhitespaceOfComments) {
-  EXPECT_EQ("// comment", format("// comment  "));
-  EXPECT_EQ("int aaaaaaa, bbbbbbb; // comment",
-            format("int aaaaaaa, bbbbbbb; // comment                   ",
-                   getLLVMStyleWithColumns(33)));
-  EXPECT_EQ("// comment\\\n", format("// comment\\\n  \t \v   \f   "));
-  EXPECT_EQ("// comment    \\\n", format("// comment    \\\n  \t \v   \f   "));
+  verifyFormat("// comment", "// comment  ");
+  verifyFormat("int aaaaaaa, bbbbbbb; // comment",
+               "int aaaaaaa, bbbbbbb; // comment                   ",
+               getLLVMStyleWithColumns(33));
+  verifyFormat("// comment\\\n", "// comment\\\n  \t \v   \f   ");
+  verifyFormat("// comment    \\\n", "// comment    \\\n  \t \v   \f   ");
 }
 
 TEST_F(FormatTestComments, UnderstandsBlockComments) {
@@ -393,16 +395,15 @@ TEST_F(FormatTestComments, UnderstandsBlockComments) {
                "    /*qq_=*/move(q), [this, b](bar<void(uint32_t)> b) {},\n"
                "    c);",
                getLLVMStyleWithColumns(60));
-  EXPECT_EQ("f(aaaaaaaaaaaaaaaaaaaaaaaaa, /* Trailing comment for aa... */\n"
-            "  bbbbbbbbbbbbbbbbbbbbbbbbb);",
-            format("f(aaaaaaaaaaaaaaaaaaaaaaaaa ,   \\\n"
-                   "/* Trailing comment for aa... */\n"
-                   "  bbbbbbbbbbbbbbbbbbbbbbbbb);"));
-  EXPECT_EQ(
-      "f(aaaaaaaaaaaaaaaaaaaaaaaaa,\n"
-      "  /* Leading comment for bb... */ bbbbbbbbbbbbbbbbbbbbbbbbb);",
-      format("f(aaaaaaaaaaaaaaaaaaaaaaaaa    ,   \n"
-             "/* Leading comment for bb... */   bbbbbbbbbbbbbbbbbbbbbbbbb);"));
+  verifyFormat("f(aaaaaaaaaaaaaaaaaaaaaaaaa, /* Trailing comment for aa... */\n"
+               "  bbbbbbbbbbbbbbbbbbbbbbbbb);",
+               "f(aaaaaaaaaaaaaaaaaaaaaaaaa ,   \\\n"
+               "/* Trailing comment for aa... */\n"
+               "  bbbbbbbbbbbbbbbbbbbbbbbbb);");
+  verifyFormat("f(aaaaaaaaaaaaaaaaaaaaaaaaa,\n"
+               "  /* Leading comment for bb... */ bbbbbbbbbbbbbbbbbbbbbbbbb);",
+               "f(aaaaaaaaaaaaaaaaaaaaaaaaa    ,   \n"
+               "/* Leading comment for bb... */   bbbbbbbbbbbbbbbbbbbbbbbbb);");
 
   verifyFormat(
       "void aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa(\n"
@@ -445,77 +446,77 @@ TEST_F(FormatTestComments, UnderstandsBlockComments) {
 }
 
 TEST_F(FormatTestComments, AlignsBlockComments) {
-  EXPECT_EQ("/*\n"
-            " * Really multi-line\n"
-            " * comment.\n"
-            " */\n"
-            "void f() {}",
-            format("  /*\n"
-                   "   * Really multi-line\n"
-                   "   * comment.\n"
-                   "   */\n"
-                   "  void f() {}"));
-  EXPECT_EQ("class C {\n"
-            "  /*\n"
-   ...
[truncated]

Copy link
Contributor

@owenca owenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only reviewed the "reducing the number of get...StyleWithColumns calls" part, which should really be split to a separate patch. Oh well.

Copy link
Contributor

@owenca owenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change StringRef foo = ... to StringRef foo(...) as suggested?

Copy link
Contributor

@owenca owenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good otherwise.

Copy link
Contributor

@owenca owenca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are probably 30+ two (or three if you count Style) parameter version of verifyFormat that can be replaced with the one-parameter version or with verifyNoChange, but they can be done in a follow-up patch.

@HazardyKnusperkeks HazardyKnusperkeks merged commit 4cb73cd into llvm:main Oct 29, 2025
10 checks passed
@HazardyKnusperkeks HazardyKnusperkeks deleted the verify branch October 29, 2025 21:04
@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 29, 2025

LLVM Buildbot has detected a new failure on builder lldb-x86_64-debian running on lldb-x86_64-debian while building clang at step 6 "test".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/34180

Here is the relevant piece of the build log for the reference
Step 6 (test) failure: build (failure)
...
PASS: lldb-api :: tools/lldb-server/TestGdbRemoteHostInfo.py (243 of 3261)
PASS: lldb-api :: functionalities/thread/concurrent_events/TestConcurrentWatchpointDelayWatchpointOneBreakpoint.py (244 of 3261)
PASS: lldb-api :: functionalities/inferior-crashing/recursive-inferior/TestRecursiveInferiorStep.py (245 of 3261)
PASS: lldb-api :: lang/c/calling-conventions/TestCCallingConventions.py (246 of 3261)
PASS: lldb-api :: functionalities/tail_call_frames/cross_dso/TestCrossDSOTailCalls.py (247 of 3261)
PASS: lldb-api :: functionalities/thread/ignore_suspended/TestIgnoreSuspendedThread.py (248 of 3261)
PASS: lldb-api :: functionalities/breakpoint/breakpoint_locations/TestBreakpointLocations.py (249 of 3261)
PASS: lldb-api :: functionalities/breakpoint/comp_dir_symlink/TestCompDirSymLink.py (250 of 3261)
PASS: lldb-api :: tools/lldb-dap/repl-mode/TestDAP_repl_mode_detection.py (251 of 3261)
UNRESOLVED: lldb-api :: tools/lldb-dap/server/TestDAP_server.py (252 of 3261)
******************** TEST 'lldb-api :: tools/lldb-dap/server/TestDAP_server.py' FAILED ********************
Script:
--
/usr/bin/python3 /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/./lib --env LLVM_INCLUDE_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/include --env LLVM_TOOLS_DIR=/home/worker/2.0.1/lldb-x86_64-debian/build/./bin --arch x86_64 --build-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex --lldb-module-cache-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/worker/2.0.1/lldb-x86_64-debian/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/lldb --compiler /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/clang --dsymutil /home/worker/2.0.1/lldb-x86_64-debian/build/./bin/dsymutil --make /usr/bin/gmake --llvm-tools-dir /home/worker/2.0.1/lldb-x86_64-debian/build/./bin --lldb-obj-root /home/worker/2.0.1/lldb-x86_64-debian/build/tools/lldb --lldb-libs-dir /home/worker/2.0.1/lldb-x86_64-debian/build/./lib --cmake-build-type Release -t /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/tools/lldb-dap/server -p TestDAP_server.py
--
Exit Code: 1

Command Output (stdout):
--
lldb version 22.0.0git (https://github.com/llvm/llvm-project.git revision 4cb73cdb14e5c1d77b71d0453ce8e4a7a54fa318)
  clang revision 4cb73cdb14e5c1d77b71d0453ce8e4a7a54fa318
  llvm revision 4cb73cdb14e5c1d77b71d0453ce8e4a7a54fa318
Skipping the following test categories: ['libc++', 'msvcstl', 'dsym', 'gmodules', 'debugserver', 'objc']

--
Command Output (stderr):
--
Change dir to: /home/worker/2.0.1/lldb-x86_64-debian/llvm-project/lldb/test/API/tools/lldb-dap/server
runCmd: settings clear --all

output: 

runCmd: settings set symbols.enable-external-lookup false

output: 

runCmd: settings set target.inherit-tcc true

output: 

runCmd: settings set target.disable-aslr false

output: 

runCmd: settings set target.detach-on-error false

output: 

runCmd: settings set target.auto-apply-fixits false

aokblast pushed a commit to aokblast/llvm-project that referenced this pull request Oct 30, 2025
)

And reduce the number of getLLVMStyleWithColumnLimit calls.
@owenca
Copy link
Contributor

owenca commented Nov 2, 2025

There are probably 30+ two (or three if you count Style) parameter version of verifyFormat that can be replaced with the one-parameter version or with verifyNoChange, but they can be done in a follow-up patch.

Done in #166029.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants