[clang] [libclang] Add functions to query template parameters and fix parameter pack handling (PR #183504)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Mon Mar 2 04:44:54 PST 2026


================
@@ -1438,29 +1438,40 @@ CXCursor clang_Cursor_getArgument(CXCursor C, unsigned i) {
 
 int clang_Cursor_getNumTemplateArguments(CXCursor C) {
   CXCursorKind kind = clang_getCursorKind(C);
-  if (kind != CXCursor_FunctionDecl && kind != CXCursor_StructDecl &&
-      kind != CXCursor_ClassDecl &&
+  if (kind != CXCursor_FunctionDecl && kind != CXCursor_CXXMethod &&
----------------
AaronBallman wrote:

If we're updating this, should we update it for variable templates as well?

https://github.com/llvm/llvm-project/pull/183504


More information about the cfe-commits mailing list