summaryrefslogtreecommitdiffstats
path: root/clang/include/clang-c/Index.h
diff options
context:
space:
mode:
authorDmitri Gribenko <gribozavr@gmail.com>2014-02-27 16:05:05 +0000
committerDmitri Gribenko <gribozavr@gmail.com>2014-02-27 16:05:05 +0000
commit6ede6aba287269a369486b094710bb8cc916e54f (patch)
treeff566aa158c88cb5f5095806b8acfbb8430518b6 /clang/include/clang-c/Index.h
parentd8c2fbd57fdd003b8960975757ab996fb2196a84 (diff)
downloadbcm5719-llvm-6ede6aba287269a369486b094710bb8cc916e54f.tar.gz
bcm5719-llvm-6ede6aba287269a369486b094710bb8cc916e54f.zip
libclang: New functions clang_Type_getNumTemplateArguments,
clang_Type_getTemplateArgument Note that these functions don't handle variadic templates -- see tests. Patch by Matthieu Nottale and Philippe Daouadi. llvm-svn: 202406
Diffstat (limited to 'clang/include/clang-c/Index.h')
-rw-r--r--clang/include/clang-c/Index.h18
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
OpenPOWER on IntegriCloud