Skip to content

Revert "Reland: [clang][test] add testing for the AST matcher reference" #116477

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

5chmidti
Copy link
Contributor

Reverts #112168

@5chmidti 5chmidti merged commit ec0a27f into main Nov 16, 2024
6 of 9 checks passed
@llvmbot llvmbot added the clang Clang issues not falling into any other category label Nov 16, 2024
@5chmidti 5chmidti deleted the revert-112168-users/5chmidti/add_testing_for_the_AST_matcher_reference branch November 16, 2024 06:34
@llvmbot
Copy link
Member

llvmbot commented Nov 16, 2024

@llvm/pr-subscribers-clang

Author: Julian Schmidt (5chmidti)

Changes

Reverts llvm/llvm-project#112168


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

8 Files Affected:

  • (modified) clang/docs/LibASTMatchersReference.html (+2270-5677)
  • (modified) clang/docs/ReleaseNotes.rst (-3)
  • (modified) clang/docs/doxygen.cfg.in (+1-8)
  • (modified) clang/docs/tools/dump_ast_matchers.py (+5-63)
  • (modified) clang/include/clang/ASTMatchers/ASTMatchers.h (+1662-4115)
  • (modified) clang/unittests/ASTMatchers/ASTMatchersTest.h (+3-427)
  • (modified) clang/unittests/ASTMatchers/CMakeLists.txt (-15)
  • (removed) clang/utils/generate_ast_matcher_doc_tests.py (-1097)
diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html
index 99917ccff52604..c6307954d7f1bb 100644
--- a/clang/docs/LibASTMatchersReference.html
+++ b/clang/docs/LibASTMatchersReference.html
@@ -586,36 +586,28 @@ <h2 id="decl-matchers">Node Matchers</h2>
 
   #pragma omp declare simd
   int min();
-
-The matcher attr()
-matches nodiscard, nonnull, noinline, and
-declare simd.
+attr()
+  matches "nodiscard", "nonnull", "noinline", and the whole "#pragma" line.
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CXXBaseSpecifier.html">CXXBaseSpecifier</a>&gt;</td><td class="name" onclick="toggle('cxxBaseSpecifier0')"><a name="cxxBaseSpecifier0Anchor">cxxBaseSpecifier</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CXXBaseSpecifier.html">CXXBaseSpecifier</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="cxxBaseSpecifier0"><pre>Matches class bases.
 
-Given
+Examples matches public virtual B.
   class B {};
   class C : public virtual B {};
-
-The matcher cxxRecordDecl(hasDirectBase(cxxBaseSpecifier()))
-matches C.
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CXXCtorInitializer.html">CXXCtorInitializer</a>&gt;</td><td class="name" onclick="toggle('cxxCtorInitializer0')"><a name="cxxCtorInitializer0Anchor">cxxCtorInitializer</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CXXCtorInitializer.html">CXXCtorInitializer</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="cxxCtorInitializer0"><pre>Matches constructor initializers.
 
-Given
+Examples matches i(42).
   class C {
     C() : i(42) {}
     int i;
   };
-
-The matcher cxxCtorInitializer()
-matches i(42).
 </pre></td></tr>
 
 
@@ -627,22 +619,17 @@ <h2 id="decl-matchers">Node Matchers</h2>
   public:
     int a;
   };
-
-The matcher accessSpecDecl()
-matches public:.
+accessSpecDecl()
+  matches 'public:'
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('bindingDecl0')"><a name="bindingDecl0Anchor">bindingDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1BindingDecl.html">BindingDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="bindingDecl0"><pre>Matches binding declarations
+Example matches foo and bar
+(matcher = bindingDecl()
 
-Given
-  struct pair { int x; int y; };
-  pair make(int, int);
-  auto [foo, bar] = make(42, 42);
-
-The matcher bindingDecl()
-matches foo and bar.
+  auto [foo, bar] = std::make_pair{42, 42};
 </pre></td></tr>
 
 
@@ -655,18 +642,14 @@ <h2 id="decl-matchers">Node Matchers</h2>
   myFunc(^(int p) {
     printf("%d", p);
   })
-
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('classTemplateDecl0')"><a name="classTemplateDecl0Anchor">classTemplateDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1ClassTemplateDecl.html">ClassTemplateDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="classTemplateDecl0"><pre>Matches C++ class template declarations.
 
-Given
+Example matches Z
   template&lt;class T&gt; class Z {};
-
-The matcher classTemplateDecl()
-matches Z.
 </pre></td></tr>
 
 
@@ -677,14 +660,13 @@ <h2 id="decl-matchers">Node Matchers</h2>
   template&lt;class T1, class T2, int I&gt;
   class A {};
 
-  template&lt;class T, int I&gt; class A&lt;T, T*, I&gt; {};
+  template&lt;class T, int I&gt;
+  class A&lt;T, T*, I&gt; {};
 
   template&lt;&gt;
   class A&lt;int, int, 1&gt; {};
-
-The matcher classTemplatePartialSpecializationDecl()
-matches template&lt;class T, int I&gt; class A&lt;T, T*, I&gt; {},
-but does not match A&lt;int, int, 1&gt;.
+classTemplatePartialSpecializationDecl()
+  matches the specialization A&lt;T,T*,I&gt; but not A&lt;int,int,1&gt;
 </pre></td></tr>
 
 
@@ -695,128 +677,87 @@ <h2 id="decl-matchers">Node Matchers</h2>
   template&lt;typename T&gt; class A {};
   template&lt;&gt; class A&lt;double&gt; {};
   A&lt;int&gt; a;
-
-The matcher classTemplateSpecializationDecl()
-matches class A&lt;int&gt;
-and class A&lt;double&gt;.
+classTemplateSpecializationDecl()
+  matches the specializations A&lt;int&gt; and A&lt;double&gt;
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('conceptDecl0')"><a name="conceptDecl0Anchor">conceptDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1ConceptDecl.html">ConceptDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="conceptDecl0"><pre>Matches concept declarations.
 
-Given
-  template&lt;typename T&gt; concept my_concept = true;
-
-
-The matcher conceptDecl()
-matches template&lt;typename T&gt;
-concept my_concept = true.
+Example matches integral
+  template&lt;typename T&gt;
+  concept integral = std::is_integral_v&lt;T&gt;;
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('cxxConstructorDecl0')"><a name="cxxConstructorDecl0Anchor">cxxConstructorDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CXXConstructorDecl.html">CXXConstructorDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="cxxConstructorDecl0"><pre>Matches C++ constructor declarations.
 
-Given
+Example matches Foo::Foo() and Foo::Foo(int)
   class Foo {
    public:
     Foo();
     Foo(int);
     int DoSomething();
   };
-
-  struct Bar {};
-
-
-The matcher cxxConstructorDecl()
-matches Foo() and Foo(int).
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('cxxConversionDecl0')"><a name="cxxConversionDecl0Anchor">cxxConversionDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CXXConversionDecl.html">CXXConversionDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="cxxConversionDecl0"><pre>Matches conversion operator declarations.
 
-Given
+Example matches the operator.
   class X { operator int() const; };
-
-
-The matcher cxxConversionDecl()
-matches operator int() const.
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('cxxDeductionGuideDecl0')"><a name="cxxDeductionGuideDecl0Anchor">cxxDeductionGuideDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CXXDeductionGuideDecl.html">CXXDeductionGuideDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="cxxDeductionGuideDecl0"><pre>Matches user-defined and implicitly generated deduction guide.
 
-Given
+Example matches the deduction guide.
   template&lt;typename T&gt;
-  class X { X(int); };
+  class X { X(int) };
   X(int) -&gt; X&lt;int&gt;;
-
-
-The matcher cxxDeductionGuideDecl()
-matches the written deduction guide
-auto (int) -&gt; X&lt;int&gt;,
-the implicit copy deduction guide auto (int) -&gt; X&lt;T&gt;
-and the implicitly declared deduction guide
-auto (X&lt;T&gt;) -&gt; X&lt;T&gt;.
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('cxxDestructorDecl0')"><a name="cxxDestructorDecl0Anchor">cxxDestructorDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CXXDestructorDecl.html">CXXDestructorDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="cxxDestructorDecl0"><pre>Matches explicit C++ destructor declarations.
 
-Given
+Example matches Foo::~Foo()
   class Foo {
    public:
     virtual ~Foo();
   };
-
-  struct Bar {};
-
-
-The matcher cxxDestructorDecl()
-matches virtual ~Foo().
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('cxxMethodDecl0')"><a name="cxxMethodDecl0Anchor">cxxMethodDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CXXMethodDecl.html">CXXMethodDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="cxxMethodDecl0"><pre>Matches method declarations.
 
-Given
+Example matches y
   class X { void y(); };
-
-
-The matcher cxxMethodDecl()
-matches void y().
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('cxxRecordDecl0')"><a name="cxxRecordDecl0Anchor">cxxRecordDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1CXXRecordDecl.html">CXXRecordDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="cxxRecordDecl0"><pre>Matches C++ class declarations.
 
-Given
+Example matches X, Z
   class X;
   template&lt;class T&gt; class Z {};
-
-The matcher cxxRecordDecl()
-matches X and Z.
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('decl0')"><a name="decl0Anchor">decl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="decl0"><pre>Matches declarations.
 
-Given
+Examples matches X, C, and the friend declaration inside C;
   void X();
   class C {
-    friend void X();
+    friend X;
   };
-
-The matcher decl()
-matches void X(), C
-and friend void X().
 </pre></td></tr>
 
 
@@ -826,49 +767,40 @@ <h2 id="decl-matchers">Node Matchers</h2>
 
 Given
   class X { int y; };
-
-The matcher declaratorDecl()
-matches int y.
+declaratorDecl()
+  matches int y.
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('decompositionDecl0')"><a name="decompositionDecl0Anchor">decompositionDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1DecompositionDecl.html">DecompositionDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="decompositionDecl0"><pre>Matches decomposition-declarations.
 
-Given
-  struct pair { int x; int y; };
-  pair make(int, int);
-  int number = 42;
-  auto [foo, bar] = make(42, 42);
+Examples matches the declaration node with foo and bar, but not
+number.
+(matcher = declStmt(has(decompositionDecl())))
 
-The matcher decompositionDecl()
-matches auto [foo, bar] = make(42, 42),
-but does not match number.
+  int number = 42;
+  auto [foo, bar] = std::make_pair{42, 42};
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('enumConstantDecl0')"><a name="enumConstantDecl0Anchor">enumConstantDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1EnumConstantDecl.html">EnumConstantDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="enumConstantDecl0"><pre>Matches enum constants.
 
-Given
+Example matches A, B, C
   enum X {
     A, B, C
   };
-The matcher enumConstantDecl()
-matches A, B and C.
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('enumDecl0')"><a name="enumDecl0Anchor">enumDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1EnumDecl.html">EnumDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="enumDecl0"><pre>Matches enum declarations.
 
-Given
+Example matches X
   enum X {
     A, B, C
   };
-
-The matcher enumDecl()
-matches the enum X.
 </pre></td></tr>
 
 
@@ -876,14 +808,9 @@ <h2 id="decl-matchers">Node Matchers</h2>
 <tr><td colspan="4" class="doc" id="fieldDecl0"><pre>Matches field declarations.
 
 Given
-  int a;
-  struct Foo {
-    int x;
-  };
-  void bar(int val);
-
-The matcher fieldDecl()
-matches int x.
+  class X { int m; };
+fieldDecl()
+  matches 'm'.
 </pre></td></tr>
 
 
@@ -892,20 +819,16 @@ <h2 id="decl-matchers">Node Matchers</h2>
 
 Given
   class X { friend void foo(); };
-
-The matcher friendDecl()
-matches friend void foo().
+friendDecl()
+  matches 'friend void foo()'.
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('functionDecl0')"><a name="functionDecl0Anchor">functionDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1FunctionDecl.html">FunctionDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="functionDecl0"><pre>Matches function declarations.
 
-Given
+Example matches f
   void f();
-
-The matcher functionDecl()
-matches void f().
 </pre></td></tr>
 
 
@@ -914,10 +837,6 @@ <h2 id="decl-matchers">Node Matchers</h2>
 
 Example matches f
   template&lt;class T&gt; void f(T t) {}
-
-
-The matcher functionTemplateDecl()
-matches template&lt;class T&gt; void f(T t) {}.
 </pre></td></tr>
 
 
@@ -926,8 +845,8 @@ <h2 id="decl-matchers">Node Matchers</h2>
 
 Given
   struct X { struct { int a; }; };
-The matcher indirectFieldDecl()
-matches a.
+indirectFieldDecl()
+  matches 'a'.
 </pre></td></tr>
 
 
@@ -935,13 +854,10 @@ <h2 id="decl-matchers">Node Matchers</h2>
 <tr><td colspan="4" class="doc" id="labelDecl0"><pre>Matches a declaration of label.
 
 Given
-  void bar();
-  void foo() {
-    goto FOO;
-    FOO: bar();
-  }
-The matcher labelDecl()
-matches FOO: bar().
+  goto FOO;
+  FOO: bar();
+labelDecl()
+  matches 'FOO:'
 </pre></td></tr>
 
 
@@ -950,9 +866,8 @@ <h2 id="decl-matchers">Node Matchers</h2>
 
 Given
   extern "C" {}
-
-The matcher linkageSpecDecl()
-matches extern "C" {}.
+linkageSpecDecl()
+  matches "extern "C" {}"
 </pre></td></tr>
 
 
@@ -960,18 +875,12 @@ <h2 id="decl-matchers">Node Matchers</h2>
 <tr><td colspan="4" class="doc" id="namedDecl0"><pre>Matches a declaration of anything that could have a name.
 
 Example matches X, S, the anonymous union type, i, and U;
-Given
   typedef int X;
   struct S {
     union {
       int i;
     } U;
   };
-The matcher namedDecl()
-matches typedef int X, S, int i
- and U,
-with S matching twice in C++.
-Once for the injected class name and once for the declaration itself.
 </pre></td></tr>
 
 
@@ -981,10 +890,8 @@ <h2 id="decl-matchers">Node Matchers</h2>
 Given
   namespace test {}
   namespace alias = ::test;
-
-The matcher namespaceAliasDecl()
-matches alias,
-but does not match test.
+namespaceAliasDecl()
+  matches "namespace alias" but not "namespace test"
 </pre></td></tr>
 
 
@@ -994,9 +901,8 @@ <h2 id="decl-matchers">Node Matchers</h2>
 Given
   namespace {}
   namespace test {}
-
-The matcher namespaceDecl()
-matches namespace {} and namespace test {}.
+namespaceDecl()
+  matches "namespace {}" and "namespace test {}"
 </pre></td></tr>
 
 
@@ -1005,10 +911,8 @@ <h2 id="decl-matchers">Node Matchers</h2>
 
 Given
   template &lt;typename T, int N&gt; struct C {};
-
-The matcher nonTypeTemplateParmDecl()
-matches int N,
-but does not match typename T.
+nonTypeTemplateParmDecl()
+  matches 'N', but not 'T'.
 </pre></td></tr>
 
 
@@ -1018,7 +922,6 @@ <h2 id="decl-matchers">Node Matchers</h2>
 Example matches Foo (Additions)
   @interface Foo (Additions)
   @end
-
 </pre></td></tr>
 
 
@@ -1028,7 +931,6 @@ <h2 id="decl-matchers">Node Matchers</h2>
 Example matches Foo (Additions)
   @implementation Foo (Additions)
   @end
-
 </pre></td></tr>
 
 
@@ -1038,7 +940,6 @@ <h2 id="decl-matchers">Node Matchers</h2>
 Example matches Foo
   @implementation Foo
   @end
-
 </pre></td></tr>
 
 
@@ -1048,7 +949,6 @@ <h2 id="decl-matchers">Node Matchers</h2>
 Example matches Foo
   @interface Foo
   @end
-
 </pre></td></tr>
 
 
@@ -1060,7 +960,6 @@ <h2 id="decl-matchers">Node Matchers</h2>
     BOOL _enabled;
   }
   @end
-
 </pre></td></tr>
 
 
@@ -1075,7 +974,6 @@ <h2 id="decl-matchers">Node Matchers</h2>
   @implementation Foo
   - (void)method {}
   @end
-
 </pre></td></tr>
 
 
@@ -1086,7 +984,6 @@ <h2 id="decl-matchers">Node Matchers</h2>
   @interface Foo
   @property BOOL enabled;
   @end
-
 </pre></td></tr>
 
 
@@ -1096,7 +993,6 @@ <h2 id="decl-matchers">Node Matchers</h2>
 Example matches FooDelegate
   @protocol FooDelegate
   @end
-
 </pre></td></tr>
 
 
@@ -1105,58 +1001,48 @@ <h2 id="decl-matchers">Node Matchers</h2>
 
 Given
   void f(int x);
-The matcher parmVarDecl()
-matches int x.
+parmVarDecl()
+  matches int x.
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('recordDecl0')"><a name="recordDecl0Anchor">recordDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1RecordDecl.html">RecordDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="recordDecl0"><pre>Matches class, struct, and union declarations.
 
-Given
+Example matches X, Z, U, and S
   class X;
   template&lt;class T&gt; class Z {};
   struct S {};
   union U {};
-
-The matcher recordDecl()
-matches X, Z,
-S and U.
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('staticAssertDecl0')"><a name="staticAssertDecl0Anchor">staticAssertDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1StaticAssertDecl.html">StaticAssertDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="staticAssertDecl0"><pre>Matches a C++ static_assert declaration.
 
-Given
+Example:
+  staticAssertDecl()
+matches
+  static_assert(sizeof(S) == sizeof(int))
+in
   struct S {
     int x;
   };
   static_assert(sizeof(S) == sizeof(int));
-
-
-The matcher staticAssertDecl()
-matches static_assert(sizeof(S) == sizeof(int)).
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('tagDecl0')"><a name="tagDecl0Anchor">tagDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1TagDecl.html">TagDecl</a>&gt;...</td></tr>
 <tr><td colspan="4" class="doc" id="tagDecl0"><pre>Matches tag declarations.
 
-Given
+Example matches X, Z, U, S, E
   class X;
   template&lt;class T&gt; class Z {};
   struct S {};
   union U {};
-  enum E { A, B, C };
-
-
-The matcher tagDecl()
-matches class X, class Z {}, the injected class name
-class Z, struct S {},
-the injected class name struct S, union U {},
-the injected class name union U
-and enum E { A, B, C }.
+  enum E {
+    A, B, C
+  };
 </pre></td></tr>
 
 
@@ -1165,10 +1051,8 @@ <h2 id="decl-matchers">Node Matchers</h2>
 
 Given
   template &lt;template &lt;typename&gt; class Z, int N&gt; struct C {};
-
-The matcher templateTemplateParmDecl()
-matches template &lt;typename&gt; class Z,
-but does not match int N.
+templateTypeParmDecl()
+  matches 'Z', but not 'N'.
 </pre></td></tr>
 
 
@@ -1177,10 +1061,8 @@ <h2 id="decl-matchers">Node Matchers</h2>
 
 Given
   template &lt;typename T, int N&gt; struct C {};
-
-The matcher templateTypeParmDecl()
-matches typename T,
-but does not int N.
+templateTypeParmDecl()
+  matches 'T', but not 'N'.
 </pre></td></tr>
 
 
@@ -1190,12 +1072,10 @@ <h2 id="decl-matchers">Node Matchers</h2>
 Given
   int X;
   namespace NS {
-    int Y;
+  int Y;
   }  // namespace NS
-
-The matcher namedDecl(hasDeclContext(translationUnitDecl()))
-matches X and NS,
-but does not match Y.
+decl(hasDeclContext(translationUnitDecl()))
+  matches "int X", but not "int Y".
 </pre></td></tr>
 
 
@@ -1205,22 +1085,17 @@ <h2 id="decl-matchers">Node Matchers</h2>
 Given
   typedef int X;
   using Y = int;
-
-The matcher typeAliasDecl()
-matches using Y = int,
-but does not match typedef int X.
+typeAliasDecl()
+  matches "using Y = int", but not "typedef int X"
 </pre></td></tr>
 
 
 <tr><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1Decl.html">Decl</a>&gt;</td><td class="name" onclick="toggle('typeAliasTemplateDecl0')"><a name="typeAliasTemplateDecl0Anchor">typeAliasTemplateDecl</a></td><td>Matcher&lt;<a href="https://clang.llvm.org/doxygen/classclang_1_1TypeAliasTemplateDecl.html">TypeAliasTemplateDecl</a>&gt;......
[truncated]

@llvm-ci
Copy link
Collaborator

llvm-ci commented Nov 16, 2024

LLVM Buildbot has detected a new failure on builder lldb-remote-linux-ubuntu running on as-builder-9 while building clang at step 16 "test-check-lldb-api".

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

Here is the relevant piece of the build log for the reference
Step 16 (test-check-lldb-api) failure: Test just built components: check-lldb-api completed (failure)
...
PASS: lldb-api :: types/TestIntegerTypeExpr.py (1202 of 1211)
PASS: lldb-api :: types/TestRecursiveTypes.py (1203 of 1211)
PASS: lldb-api :: tools/lldb-server/TestGdbRemote_vCont.py (1204 of 1211)
PASS: lldb-api :: types/TestLongTypes.py (1205 of 1211)
PASS: lldb-api :: types/TestShortType.py (1206 of 1211)
PASS: lldb-api :: types/TestLongTypesExpr.py (1207 of 1211)
PASS: lldb-api :: types/TestShortTypeExpr.py (1208 of 1211)
PASS: lldb-api :: tools/lldb-server/TestNonStop.py (1209 of 1211)
PASS: lldb-api :: tools/lldb-server/TestLldbGdbServer.py (1210 of 1211)
UNRESOLVED: lldb-api :: tools/lldb-server/vCont-threads/TestPartialResume.py (1211 of 1211)
******************** TEST 'lldb-api :: tools/lldb-server/vCont-threads/TestPartialResume.py' FAILED ********************
Script:
--
/usr/bin/python3.12 /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/dotest.py -u CXXFLAGS -u CFLAGS --env LLVM_LIBS_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib --env LLVM_INCLUDE_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include --env LLVM_TOOLS_DIR=/home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin --libcxx-include-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include/c++/v1 --libcxx-include-target-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/include/aarch64-unknown-linux-gnu/c++/v1 --libcxx-library-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib/aarch64-unknown-linux-gnu --arch aarch64 --build-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex --lldb-module-cache-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex/module-cache-lldb/lldb-api --clang-module-cache-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/lldb-test-build.noindex/module-cache-clang/lldb-api --executable /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin/lldb --compiler /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/bin/clang --dsymutil /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin/dsymutil --make /usr/bin/make --llvm-tools-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./bin --lldb-obj-root /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/tools/lldb --lldb-libs-dir /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/build/./lib --platform-url connect://jetson-agx-2198.lab.llvm.org:1234 --platform-working-dir /home/ubuntu/lldb-tests --sysroot /mnt/fs/jetson-agx-ubuntu --env ARCH_CFLAGS=-mcpu=cortex-a78 --platform-name remote-linux /home/buildbot/worker/as-builder-9/lldb-remote-linux-ubuntu/llvm-project/lldb/test/API/tools/lldb-server/vCont-threads -p TestPartialResume.py
--
Exit Code: 1

Command Output (stdout):
--
lldb version 20.0.0git (https://github.com/llvm/llvm-project.git revision ec0a27f6589c5407e98efd9ffcc5edd17c63a108)
  clang revision ec0a27f6589c5407e98efd9ffcc5edd17c63a108
  llvm revision ec0a27f6589c5407e98efd9ffcc5edd17c63a108
Setting up remote platform 'remote-linux'
Connecting to remote platform 'remote-linux' at 'connect://jetson-agx-2198.lab.llvm.org:1234'...
Connected.
Setting remote platform working directory to '/home/ubuntu/lldb-tests'...
Skipping the following test categories: ['dsym', 'gmodules', 'debugserver', 'objc', 'lldb-dap']
connect to debug monitor on port 12979 failed, attempt #1 of 20
connect to debug monitor on port 15244 failed, attempt #2 of 20
connect to debug monitor on port 14564 failed, attempt #3 of 20
connect to debug monitor on port 12184 failed, attempt #4 of 20
connect to debug monitor on port 14338 failed, attempt #5 of 20
connect to debug monitor on port 12647 failed, attempt #6 of 20
connect to debug monitor on port 12883 failed, attempt #7 of 20
connect to debug monitor on port 14394 failed, attempt #8 of 20
connect to debug monitor on port 14430 failed, attempt #9 of 20
connect to debug monitor on port 15149 failed, attempt #10 of 20
connect to debug monitor on port 15430 failed, attempt #11 of 20
connect to debug monitor on port 15701 failed, attempt #12 of 20
connect to debug monitor on port 14622 failed, attempt #13 of 20
connect to debug monitor on port 13394 failed, attempt #14 of 20
connect to debug monitor on port 13335 failed, attempt #15 of 20
connect to debug monitor on port 12165 failed, attempt #16 of 20
connect to debug monitor on port 13087 failed, attempt #17 of 20
connect to debug monitor on port 15077 failed, attempt #18 of 20
connect to debug monitor on port 14468 failed, attempt #19 of 20
connect to debug monitor on port 14096 failed, attempt #20 of 20

--

@mizvekov
Copy link
Contributor

Can you please describe the reason the patch was reverted?

It's better to put this information in the commit message.

@5chmidti
Copy link
Contributor Author

Reverts #112168

LLVM Buildbot has detected a new failure on builder clang-arm64-windows-msvc running on linaro-armv8-windows-msvc-04 while building clang at step 5 "ninja check 1".

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

Here is the relevant piece of the build log for the reference
Step 5 (ninja check 1) failure: 1200 seconds without output running [b'ninja', b'check-all'], attempting to kill
...
[1516/1535] Linking CXX executable unittests\Transforms\Coroutines\CoroTests.exe
[1517/1535] Linking CXX executable unittests\Transforms\Vectorize\SandboxVectorizer\SandboxVectorizerTests.exe
[1518/1535] Linking CXX executable unittests\Transforms\Instrumentation\InstrumentationTests.exe
[1519/1535] Linking CXX executable unittests\tools\llvm-profgen\LLVMProfgenTests.exe
[1520/1535] Linking CXX executable unittests\Transforms\Utils\UtilsTests.exe
[1521/1535] Linking CXX executable unittests\tools\llvm-profdata\LLVMProfdataTests.exe
[1522/1535] Linking CXX executable unittests\Transforms\Scalar\ScalarTests.exe
[1523/1535] Linking CXX executable unittests\tools\llvm-cfi-verify\CFIVerifyTests.exe
[1524/1535] Linking CXX executable unittests\tools\llvm-mca\LLVMMCATests.exe
[1525/1535] Linking CXX executable unittests\tools\llvm-exegesis\LLVMExegesisTests.exe
command timed out: 1200 seconds without output running [b'ninja', b'check-all'], attempting to kill
program finished with exit code 1
elapsedTime=2216.650482

@5chmidti
Copy link
Contributor Author

Sure! It timed out on the Windows arm builder again, I'm already in contact with the bot owner.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants