Author: Rashmi Mudduluru Date: 2023-07-18T15:27:59-07:00 New Revision: 3ea673a97b0583affc22345b9d62e863ba36b3d8
URL: https://github.com/llvm/llvm-project/commit/3ea673a97b0583affc22345b9d62e863ba36b3d8 DIFF: https://github.com/llvm/llvm-project/commit/3ea673a97b0583affc22345b9d62e863ba36b3d8.diff LOG: [clang][docs] Update LibASTMatchersReference.html Differential Revision: https://reviews.llvm.org/D155304 Added: Modified: clang/docs/LibASTMatchersReference.html Removed: ################################################################################ diff --git a/clang/docs/LibASTMatchersReference.html b/clang/docs/LibASTMatchersReference.html index e6b8c771f1a394..bde8ac7de52a73 100644 --- a/clang/docs/LibASTMatchersReference.html +++ b/clang/docs/LibASTMatchersReference.html @@ -1455,6 +1455,16 @@ <h2 id="decl-matchers">Node Matchers</h2> </pre></td></tr> +<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>></td><td class="name" onclick="toggle('coroutineBodyStmt0')"><a name="coroutineBodyStmt0Anchor">coroutineBodyStmt</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1CoroutineBodyStmt.html">CoroutineBodyStmt</a>>...</td></tr> +<tr><td colspan="4" class="doc" id="coroutineBodyStmt0"><pre>Matches coroutine body statements. + +coroutineBodyStmt() matches the coroutine below + generator<int> gen() { + co_return; + } +</pre></td></tr> + + <tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>></td><td class="name" onclick="toggle('coyieldExpr0')"><a name="coyieldExpr0Anchor">coyieldExpr</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1CoyieldExpr.html">CoyieldExpr</a>>...</td></tr> <tr><td colspan="4" class="doc" id="coyieldExpr0"><pre>Matches co_yield expressions. @@ -3037,10 +3047,11 @@ <h2 id="narrowing-matchers">Narrowing Matchers</h2> <tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1CXXConstructExpr.html">CXXConstructExpr</a>></td><td class="name" onclick="toggle('argumentCountAtLeast1')"><a name="argumentCountAtLeast1Anchor">argumentCountAtLeast</a></td><td>unsigned N</td></tr> -<tr><td colspan="4" class="doc" id="argumentCountAtLeast1"><pre>Checks that a call expression or a constructor call expression has -at least the specified number of arguments (including absent default arguments). +<tr><td colspan="4" class="doc" id="argumentCountAtLeast1"><pre>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 @@ <h2 id="narrowing-matchers">Narrowing Matchers</h2> <tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1CXXUnresolvedConstructExpr.html">CXXUnresolvedConstructExpr</a>></td><td class="name" onclick="toggle('argumentCountAtLeast2')"><a name="argumentCountAtLeast2Anchor">argumentCountAtLeast</a></td><td>unsigned N</td></tr> -<tr><td colspan="4" class="doc" id="argumentCountAtLeast2"><pre>Checks that a call expression or a constructor call expression has -at least the specified number of arguments (including absent default arguments). +<tr><td colspan="4" class="doc" id="argumentCountAtLeast2"><pre>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 @@ <h2 id="narrowing-matchers">Narrowing Matchers</h2> <tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1CallExpr.html">CallExpr</a>></td><td class="name" onclick="toggle('argumentCountAtLeast0')"><a name="argumentCountAtLeast0Anchor">argumentCountAtLeast</a></td><td>unsigned N</td></tr> -<tr><td colspan="4" class="doc" id="argumentCountAtLeast0"><pre>Checks that a call expression or a constructor call expression has -at least the specified number of arguments (including absent default arguments). +<tr><td colspan="4" class="doc" id="argumentCountAtLeast0"><pre>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 @@ <h2 id="narrowing-matchers">Narrowing Matchers</h2> <tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1ObjCMessageExpr.html">ObjCMessageExpr</a>></td><td class="name" onclick="toggle('argumentCountAtLeast3')"><a name="argumentCountAtLeast3Anchor">argumentCountAtLeast</a></td><td>unsigned N</td></tr> -<tr><td colspan="4" class="doc" id="argumentCountAtLeast3"><pre>Checks that a call expression or a constructor call expression has -at least the specified number of arguments (including absent default arguments). +<tr><td colspan="4" class="doc" id="argumentCountAtLeast3"><pre>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 @@ <h2 id="traversal-matchers">AST Traversal Matchers</h2> <tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1CXXForRangeStmt.html">CXXForRangeStmt</a>></td><td class="name" onclick="toggle('hasBody3')"><a name="hasBody3Anchor">hasBody</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>> InnerMatcher</td></tr> -<tr><td colspan="4" class="doc" id="hasBody3"><pre>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. +<tr><td colspan="4" class="doc" id="hasBody3"><pre>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 @@ <h2 id="traversal-matchers">AST Traversal Matchers</h2> </pre></td></tr> +<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1CoroutineBodyStmt.html">CoroutineBodyStmt</a>></td><td class="name" onclick="toggle('hasBody5')"><a name="hasBody5Anchor">hasBody</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>> InnerMatcher</td></tr> +<tr><td colspan="4" class="doc" id="hasBody5"><pre>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();' +</pre></td></tr> + + <tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1DecayedType.html">DecayedType</a>></td><td class="name" onclick="toggle('hasDecayedType0')"><a name="hasDecayedType0Anchor">hasDecayedType</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1QualType.html">QualType</a>> InnerType</td></tr> <tr><td colspan="4" class="doc" id="hasDecayedType0"><pre>Matches the decayed type, whoes decayed type matches InnerMatcher </pre></td></tr> @@ -7890,9 +7929,10 @@ <h2 id="traversal-matchers">AST Traversal Matchers</h2> <tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1DoStmt.html">DoStmt</a>></td><td class="name" onclick="toggle('hasBody0')"><a name="hasBody0Anchor">hasBody</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>> InnerMatcher</td></tr> -<tr><td colspan="4" class="doc" id="hasBody0"><pre>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. +<tr><td colspan="4" class="doc" id="hasBody0"><pre>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 @@ <h2 id="traversal-matchers">AST Traversal Matchers</h2> <tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1ForStmt.html">ForStmt</a>></td><td class="name" onclick="toggle('hasBody1')"><a name="hasBody1Anchor">hasBody</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>> InnerMatcher</td></tr> -<tr><td colspan="4" class="doc" id="hasBody1"><pre>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. +<tr><td colspan="4" class="doc" id="hasBody1"><pre>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 @@ <h2 id="traversal-matchers">AST Traversal Matchers</h2> <tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1FunctionDecl.html">FunctionDecl</a>></td><td class="name" onclick="toggle('hasBody4')"><a name="hasBody4Anchor">hasBody</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>> InnerMatcher</td></tr> -<tr><td colspan="4" class="doc" id="hasBody4"><pre>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. +<tr><td colspan="4" class="doc" id="hasBody4"><pre>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 @@ <h2 id="traversal-matchers">AST Traversal Matchers</h2> <tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1WhileStmt.html">WhileStmt</a>></td><td class="name" onclick="toggle('hasBody2')"><a name="hasBody2Anchor">hasBody</a></td><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1Stmt.html">Stmt</a>> InnerMatcher</td></tr> -<tr><td colspan="4" class="doc" id="hasBody2"><pre>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. +<tr><td colspan="4" class="doc" id="hasBody2"><pre>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 (;;) {} _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits