libclang: expose ref-qualifier of function type
Argyrios Kyrtzidis
akyrtzi at gmail.com
Mon Oct 7 08:45:57 PDT 2013
Hi Che-Liang,
On Oct 4, 2013, at 9:53 PM, Che-Liang Chiou <clchiou at gmail.com> wrote:
> This patch exposes ref-qualifier information of function type.
> <refqualifier.patch>
+enum CXRefQualifierKind {
+ /** \brief No ref-qualifier was provided. */
+ CXRQ_None = 0,
+ /** \brief An lvalue ref-qualifier was provided (\c &). */
+ CXRQ_LValue,
+ /** \brief An rvalue ref-qualifier was provided (\c &&). */
+ CXRQ_RValue
+};
The general convention used is to repeat the enumerator name without 'kind' in the enumerators:
enum CXRefQualifierKind {
/** \brief No ref-qualifier was provided. */
CXRefQualifier_None = 0,
/** \brief An lvalue ref-qualifier was provided (\c &). */
CXRefQualifier_LValue,
/** \brief An rvalue ref-qualifier was provided (\c &&). */
CXRefQualifier_RValue
};
+ * \brief Retrieve the ref-qualifier kind of a function or method.
+ *
+ * The ref-qualifier is returned for functions or methods. For other types
+ * CXRQ_None is returned.
+ */
+CINDEX_LINKAGE enum CXRefQualifierKind clang_Type_getRefQualifier(CXType T);
Could you rename it to clang_Type_getCXXRefQualifier and mention in the comments that this is only relevant for C++ ?
Finally, could you also add some tests for this ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131007/b531c5a9/attachment.html>
More information about the cfe-commits
mailing list