diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html index e6b8c771f1a39..bde8ac7de52a7 100644 --- a/clang/docs/LibASTMatchersReference.html +++ b/clang/docs/LibASTMatchersReference.html @@ -1455,6 +1455,16 @@

Node Matchers

+Matcher<Stmt>coroutineBodyStmtMatcher<CoroutineBodyStmt>... +
Matches coroutine body statements.
+
+coroutineBodyStmt() matches the coroutine below
+  generator<int> gen() {
+    co_return;
+  }
+
+ + Matcher<Stmt>coyieldExprMatcher<CoyieldExpr>...
Matches co_yield expressions.
 
@@ -3037,10 +3047,11 @@ 

Narrowing Matchers

Matcher<CXXConstructExpr>argumentCountAtLeastunsigned N -
Checks that a call expression or a constructor call expression has
-at least the specified number of arguments (including absent default arguments).
+
Checks that a call expression or a constructor call expression has at least
+the specified number of arguments (including absent default arguments).
 
-Example matches f(0, 0) and g(0, 0, 0) (matcher = callExpr(argumentCountAtLeast(2)))
+Example matches f(0, 0) and g(0, 0, 0)
+(matcher = callExpr(argumentCountAtLeast(2)))
   void f(int x, int y);
   void g(int x, int y, int z);
   f(0, 0);
@@ -3706,10 +3717,11 @@ 

Narrowing Matchers

Matcher<CXXUnresolvedConstructExpr>argumentCountAtLeastunsigned N -
Checks that a call expression or a constructor call expression has
-at least the specified number of arguments (including absent default arguments).
+
Checks that a call expression or a constructor call expression has at least
+the specified number of arguments (including absent default arguments).
 
-Example matches f(0, 0) and g(0, 0, 0) (matcher = callExpr(argumentCountAtLeast(2)))
+Example matches f(0, 0) and g(0, 0, 0)
+(matcher = callExpr(argumentCountAtLeast(2)))
   void f(int x, int y);
   void g(int x, int y, int z);
   f(0, 0);
@@ -3728,10 +3740,11 @@ 

Narrowing Matchers

Matcher<CallExpr>argumentCountAtLeastunsigned N -
Checks that a call expression or a constructor call expression has
-at least the specified number of arguments (including absent default arguments).
+
Checks that a call expression or a constructor call expression has at least
+the specified number of arguments (including absent default arguments).
 
-Example matches f(0, 0) and g(0, 0, 0) (matcher = callExpr(argumentCountAtLeast(2)))
+Example matches f(0, 0) and g(0, 0, 0)
+(matcher = callExpr(argumentCountAtLeast(2)))
   void f(int x, int y);
   void g(int x, int y, int z);
   f(0, 0);
@@ -4897,10 +4910,11 @@ 

Narrowing Matchers

Matcher<ObjCMessageExpr>argumentCountAtLeastunsigned N -
Checks that a call expression or a constructor call expression has
-at least the specified number of arguments (including absent default arguments).
+
Checks that a call expression or a constructor call expression has at least
+the specified number of arguments (including absent default arguments).
 
-Example matches f(0, 0) and g(0, 0, 0) (matcher = callExpr(argumentCountAtLeast(2)))
+Example matches f(0, 0) and g(0, 0, 0)
+(matcher = callExpr(argumentCountAtLeast(2)))
   void f(int x, int y);
   void g(int x, int y, int z);
   f(0, 0);
@@ -6795,9 +6809,10 @@ 

AST Traversal Matchers

Matcher<CXXForRangeStmt>hasBodyMatcher<Stmt> InnerMatcher -
Matches a 'for', 'while', 'do' statement or a function definition that has
-a given body. Note that in case of functions this matcher only matches the
-definition itself and not the other declarations of the same function.
+
Matches a 'for', 'while', 'while' statement or a function or coroutine
+definition that has a given body. Note that in case of functions or
+coroutines this matcher only matches the definition itself and not the
+other declarations of the same function or coroutine.
 
 Given
   for (;;) {}
@@ -7682,6 +7697,30 @@ 

AST Traversal Matchers

+Matcher<CoroutineBodyStmt>hasBodyMatcher<Stmt> InnerMatcher +
Matches a 'for', 'while', 'while' statement or a function or coroutine
+definition that has a given body. Note that in case of functions or
+coroutines this matcher only matches the definition itself and not the
+other declarations of the same function or coroutine.
+
+Given
+  for (;;) {}
+forStmt(hasBody(compoundStmt()))
+  matches 'for (;;) {}'
+with compoundStmt()
+  matching '{}'
+
+Given
+  void f();
+  void f() {}
+functionDecl(hasBody(compoundStmt()))
+  matches 'void f() {}'
+with compoundStmt()
+  matching '{}'
+  but does not match 'void f();'
+
+ + Matcher<DecayedType>hasDecayedTypeMatcher<QualType> InnerType
Matches the decayed type, whoes decayed type matches InnerMatcher
 
@@ -7890,9 +7929,10 @@

AST Traversal Matchers

Matcher<DoStmt>hasBodyMatcher<Stmt> InnerMatcher -
Matches a 'for', 'while', 'do' statement or a function definition that has
-a given body. Note that in case of functions this matcher only matches the
-definition itself and not the other declarations of the same function.
+
Matches a 'for', 'while', 'while' statement or a function or coroutine
+definition that has a given body. Note that in case of functions or
+coroutines this matcher only matches the definition itself and not the
+other declarations of the same function or coroutine.
 
 Given
   for (;;) {}
@@ -8226,9 +8266,10 @@ 

AST Traversal Matchers

Matcher<ForStmt>hasBodyMatcher<Stmt> InnerMatcher -
Matches a 'for', 'while', 'do' statement or a function definition that has
-a given body. Note that in case of functions this matcher only matches the
-definition itself and not the other declarations of the same function.
+
Matches a 'for', 'while', 'while' statement or a function or coroutine
+definition that has a given body. Note that in case of functions or
+coroutines this matcher only matches the definition itself and not the
+other declarations of the same function or coroutine.
 
 Given
   for (;;) {}
@@ -8420,9 +8461,10 @@ 

AST Traversal Matchers

Matcher<FunctionDecl>hasBodyMatcher<Stmt> InnerMatcher -
Matches a 'for', 'while', 'do' statement or a function definition that has
-a given body. Note that in case of functions this matcher only matches the
-definition itself and not the other declarations of the same function.
+
Matches a 'for', 'while', 'while' statement or a function or coroutine
+definition that has a given body. Note that in case of functions or
+coroutines this matcher only matches the definition itself and not the
+other declarations of the same function or coroutine.
 
 Given
   for (;;) {}
@@ -10082,9 +10124,10 @@ 

AST Traversal Matchers

Matcher<WhileStmt>hasBodyMatcher<Stmt> InnerMatcher -
Matches a 'for', 'while', 'do' statement or a function definition that has
-a given body. Note that in case of functions this matcher only matches the
-definition itself and not the other declarations of the same function.
+
Matches a 'for', 'while', 'while' statement or a function or coroutine
+definition that has a given body. Note that in case of functions or
+coroutines this matcher only matches the definition itself and not the
+other declarations of the same function or coroutine.
 
 Given
   for (;;) {}