[clang] [libclang] Add accessors for template parameters and fix parameter pack handling (PR #183504)

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 7 09:20:46 PDT 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 &&
----------------
fscheidl wrote:

PR is quite extensive now with the variable template additions. Can move those portions into a separate one if you prefer @AaronBallman

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


More information about the cfe-commits mailing list