[cfe-dev] Issue with cindex parsing on python: Can't parse function that returns a std::vector<std::vector<int>>

David Blaikie via cfe-dev cfe-dev at lists.llvm.org
Sat Oct 27 10:30:51 PDT 2018

Are you parsing as C++98 (the default, I think? That code is invalid
C++98/C++03, I think (because the ">>" is interpreted as a right shift
operator, not the end of two template argument lists). In C++11 and above,
it should do the right thing.

On Fri, Oct 26, 2018 at 2:17 PM TarcĂ­sio Fischer via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> Hello. I'm new with the clang python bindings (
> https://github.com/llvm-mirror/clang/tree/master/bindings/python), and
> I'm mostly basing my tests on the test examples on
> https://github.com/llvm-mirror/clang/tree/master/bindings/python/tests/cindex .
> Feel free to suggest any better documentation.
> For the following example, I'd expect the two results to be similar, but
> the first one isn't getting any data about the function `example`. Does
> anyone know why?
> https://pastebin.com/TF3RLibt
> Results on my machine:
> t.cpp (TypeKind.INVALID)
> ****************************************************************************************************
> t.cpp (TypeKind.INVALID)
>  example() (TypeKind.FUNCTIONPROTO)
>    (TypeKind.INVALID)
>     (TypeKind.INVALID)
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181027/f770139f/attachment.html>

More information about the cfe-dev mailing list