search for: typedef_decl

Displaying 4 results from an estimated 4 matches for "typedef_decl".

2013 Oct 19
2
[LLVMdev] Parsing C++ headers with Clang bindings for Python
...ssion: >>> import clang.cindex >>> idx = clang.cindex.Index.create() >>> tu = idx.parse('/usr/include/math.h', ['-x', 'c++-header']) >>> c = tu.cursor >>> for d in c.get_children(): ... print d.kind, d.spelling ... CursorKind.TYPEDEF_DECL __int128_t CursorKind.TYPEDEF_DECL __uint128_t CursorKind.TYPEDEF_DECL __builtin_va_list CursorKind.UNEXPOSED_DECL >>> print len(tu.diagnostics) 0 Now that list clearly does not represent the contents of math.h. However, as you can see, I don't get an error, and the list of diagnostic...
2013 Oct 19
0
[LLVMdev] Parsing C++ headers with Clang bindings for Python
...index > >>> idx = clang.cindex.Index.create() > >>> tu = idx.parse('/usr/include/math.h', ['-x', 'c++-header']) > >>> c = tu.cursor > >>> for d in c.get_children(): > ... print d.kind, d.spelling > ... > CursorKind.TYPEDEF_DECL __int128_t > CursorKind.TYPEDEF_DECL __uint128_t > CursorKind.TYPEDEF_DECL __builtin_va_list > CursorKind.UNEXPOSED_DECL > It would seem that the contents on the entire module are hidden inside this UNEXPOSED_DECL. I'd be interesting in knowing why that is, but for now at least I s...
2013 Oct 20
1
[LLVMdev] Parsing C++ headers with Clang bindings for Python
...ndex > >>> idx = clang.cindex.Index.create() > >>> tu = idx.parse('/usr/include/math.h', ['-x', 'c++-header']) > >>> c = tu.cursor > >>> for d in c.get_children(): > ... print d.kind, d.spelling > ... > CursorKind.TYPEDEF_DECL __int128_t > CursorKind.TYPEDEF_DECL __uint128_t > CursorKind.TYPEDEF_DECL __builtin_va_list > CursorKind.UNEXPOSED_DECL > > It would seem that the contents on the entire module are hidden inside this UNEXPOSED_DECL. I'd be interesting in knowing why that is, but for now at lea...
2016 May 08
2
typedef not present in the python AST
...= clang.cindex.Index.create() tu = index.parse(f, ['-x', 'c++', '-std=c++11', '-fsyntax-only', '-I', '.']) and then I display the node kinds of every node in the AST (recursively calling get_children() on every node), I get a node of type CursorKind.TYPEDEF_DECL, but only if it is top-level (or inside a namespace or class). If the typedef is in a function body, it doesn't get reported at all (even though variable declarations before and after are reported). Why are they not reported? Thanks, -- Valentin Tolmer