summaryrefslogtreecommitdiffstats
path: root/clang/include/clang-c
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-08-31 22:12:17 +0000
committerDouglas Gregor <dgregor@apple.com>2010-08-31 22:12:17 +0000
commitf11309e1943782d323f195c06824a486982e3340 (patch)
treea9abcb75471da769bbf5469ffbf292db9304bb4f /clang/include/clang-c
parentd657d8259778129bd43393a2d65c4eb029e9eb82 (diff)
downloadbcm5719-llvm-f11309e1943782d323f195c06824a486982e3340.tar.gz
bcm5719-llvm-f11309e1943782d323f195c06824a486982e3340.zip
Add a new libclang function clang_getTemplateCursorKind(), which
determines the kind of declaration that would be generated if the given template were instantiated. This allows a client to distinguish among class/struct/union templates and function/member function/static member function templates. Also, teach clang_CXXMethod_isStatic() about function templates. llvm-svn: 112655
Diffstat (limited to 'clang/include/clang-c')
-rw-r--r--clang/include/clang-c/Index.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/clang/include/clang-c/Index.h b/clang/include/clang-c/Index.h
index be02bcf8c39..404d7aa5140 100644
--- a/clang/include/clang-c/Index.h
+++ b/clang/include/clang-c/Index.h
@@ -1716,11 +1716,31 @@ CINDEX_LINKAGE unsigned clang_isCursorDefinition(CXCursor);
*/
/**
- * \brief Determine if a C++ member function is declared 'static'.
+ * \brief Determine if a C++ member function or member function template is
+ * declared 'static'.
*/
CINDEX_LINKAGE unsigned clang_CXXMethod_isStatic(CXCursor C);
/**
+ * \brief Given a cursor that represents a template, determine
+ * the cursor kind of the specializations would be generated by instantiating
+ * the template.
+ *
+ * This routine can be used to determine what flavor of function template,
+ * class template, or class template partial specialization is stored in the
+ * cursor. For example, it can describe whether a class template cursor is
+ * declared with "struct", "class" or "union".
+ *
+ * \param C The cursor to query. This cursor should represent a template
+ * declaration.
+ *
+ * \returns The cursor kind of the specializations that would be generated
+ * by instantiating the template \p C. If \p C is not a template, returns
+ * \c CXCursor_NoDeclFound.
+ */
+CINDEX_LINKAGE enum CXCursorKind clang_getTemplateCursorKind(CXCursor C);
+
+/**
* @}
*/
OpenPOWER on IntegriCloud