[clang] [clang-tools-extra] [AstMatcher]`templateArgumentCountIs` support `FunctionDecl` (PR #130416)
Carlos Galvez via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 11 02:09:19 PDT 2025
================
@@ -4833,6 +4833,17 @@ <h2 id="narrowing-matchers">Narrowing Matchers</h2>
</pre></td></tr>
+<tr><td>Matcher<<a href="https://clang.llvm.org/doxygen/classclang_1_1FunctionDecl.html">FunctionDecl</a>></td><td class="name" onclick="toggle('templateArgumentCountIs2')"><a name="templateArgumentCountIs2Anchor">templateArgumentCountIs</a></td><td>unsigned N</td></tr>
+<tr><td colspan="4" class="doc" id="templateArgumentCountIs2"><pre>Matches if the number of template arguments equals N.
+
+Given
+ template<typename T> struct C {};
----------------
carlosgalvezp wrote:
Shouldn't this example be for `functionDecl`, instead of `classTemplateSpecializationDecl`?
https://github.com/llvm/llvm-project/pull/130416
More information about the cfe-commits
mailing list