[cfe-dev] how to query if instance method is const?

David Blaikie dblaikie at gmail.com
Fri Jan 20 12:41:07 PST 2012


Not being familiar with libclang but I'll take a stab in the dark - does
'this' appear in the parameter list through libclang? Can you detect
whether the 'this' parameter is const?

On Fri, Jan 20, 2012 at 12:26 PM, Robert Anderson
<rwa at alumni.princeton.edu>wrote:

>
> I have a class with two implementations of operator(), one is const and
> one is not.
>
> What call in the libclang API allows me to determine which one I am
> looking at if I am traversing the AST?
>
> I found the two calls:
>
> clang_CXXMethod_isStatic( CXCursor C )
> clang_CXXMethod_isVirtual( CXCursor C )
>
> but there is no corresponding call to _isConst(). Is there some other way
> to accomplish this?
>
> Thanks,
> Bob Anderson
>
>
>
>
>
>
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120120/dde3549e/attachment.html>


More information about the cfe-dev mailing list