diff options
Diffstat (limited to 'clang/include/clang-c/Index.h')
-rw-r--r-- | clang/include/clang-c/Index.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h index 02abfcab30f..b77ddcb6c05 100644 --- a/clang/include/clang-c/Index.h +++ b/clang/include/clang-c/Index.h @@ -3081,6 +3081,24 @@ enum CXRefQualifierKind { }; /** + * \brief Returns the number of template arguments for given class template + * specialization, or -1 if type \c T is not a class template specialization. + * + * Variadic argument packs count as only one argument, and can not be inspected + * further. + */ +CINDEX_LINKAGE int clang_Type_getNumTemplateArguments(CXType T); + +/** + * \brief Returns the type template argument of a template class specialization + * at given index. + * + * This function only returns template type arguments and does not handle + * template template arguments or variadic packs. + */ +CINDEX_LINKAGE CXType clang_Type_getTemplateArgumentAsType(CXType T, unsigned i); + +/** * \brief Retrieve the ref-qualifier kind of a function or method. * * The ref-qualifier is returned for C++ functions or methods. For other types |