[clang] [libclang] Add accessors for template parameters and fix parameter pack handling (PR #183504)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 13 23:53:24 PDT 2026
================
@@ -916,6 +916,213 @@ def test_get_template_argument_unsigned_value(self):
self.assertEqual(foos[1].get_template_argument_unsigned_value(0), 2**32 - 7)
self.assertEqual(foos[1].get_template_argument_unsigned_value(2), True)
+ def test_get_constant_template_argument_type(self):
----------------
fscheidl wrote:
The tests in `test_cursor.py` cover the `CXCursor` APIs (`clang_Cursor_getNumTemplateArguments` and `clang_Cursor_getTemplateArgumentType`) whereas the ones in `test_type.py` cover the `CXType` ones (`clang_Type_getNumTemplateArguments` and `clang_Type_getTemplateArgumentAsType`) so I think we should keep them to not lose coverage.
Note that all of these APIs were pre-existing before this PR.
Changed one misleading variable name in `test_cursor.py` though.
https://github.com/llvm/llvm-project/pull/183504
More information about the cfe-commits
mailing list