[clang] [libclang] Add accessors for template parameters and fix parameter pack handling (PR #183504)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 8 08:11:27 PDT 2026
================
@@ -1571,6 +1615,27 @@ CXType clang_Cursor_getTemplateArgumentType(CXCursor C, unsigned I) {
return cxtype::MakeCXType(TA.getAsType(), getCursorTU(C));
}
+CXType clang_Cursor_getConstantTemplateArgumentType(CXCursor C, unsigned I) {
+ TemplateArgument TA;
+ if (clang_Cursor_getTemplateArgument(C, I, &TA) !=
+ CXGetTemplateArgumentStatus_Success) {
+ return cxtype::MakeCXType(QualType(), getCursorTU(C));
+ }
+
+ switch (TA.getKind()) {
----------------
AaronBallman wrote:
Thanks, I missed that!
https://github.com/llvm/llvm-project/pull/183504
More information about the cfe-commits
mailing list