================
@@ -2272,6 +2272,28 @@ def get_template_argument_unsigned_value(self, num: int)
-> int:
"""Returns the value of the indicated arg as an unsigned 64b
integer."""
return conf.lib.clang_Cursor_getTemplateArgumentUnsignedValue(self,
num) # type: ignore [no-any-return]
+ @cursor_null_guard
+ def get_template_argument_integral_type(self, num: int) -> Type:
+ """Returns the type of an integral template argument at the given
index."""
+ return Type.from_result(
+ conf.lib.clang_Cursor_getTemplateArgumentIntegralType(self, num),
self
+ )
+
+ @cursor_null_guard
+ def get_num_template_parameters(self) -> int:
+ """Returns the number of template parameters, or -1 if not a
template."""
+ return conf.lib.clang_Cursor_getNumTemplateParameters(self) # type:
ignore [no-any-return]
+
+ @cursor_null_guard
+ def get_template_parameter(self, num: int) -> Cursor:
+ """Returns the template parameter at the given index."""
----------------
DeinAlptraum wrote:
I think it would be helpful to document what happens when an invalid parameter
index is passed
https://github.com/llvm/llvm-project/pull/183504
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits