libclang: expose ref-qualifier of function type
Che-Liang Chiou
clchiou at gmail.com
Wed Oct 9 17:05:33 PDT 2013
On Mon, Oct 7, 2013 at 8:45 AM, Argyrios Kyrtzidis <akyrtzi at gmail.com> wrote:
> 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:
Done.
> 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++ ?
Done.
> Finally, could you also add some tests for this ?
>
Done.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: refqualifier-v2.patch
Type: application/octet-stream
Size: 6894 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131009/8a9c62bd/attachment.obj>
More information about the cfe-commits
mailing list