xoofx / CppAst.NET

CppAst is a .NET library providing a C/C++ parser for header files powered by Clang/libclang with access to the full AST, comments and macros
BSD 2-Clause "Simplified" License
482 stars 63 forks source link

CXCursor_TypeAliasDecl and CXCursor_TypeAliasTemplateDecl don't get parsed #14

Closed wackoisgod closed 4 years ago

wackoisgod commented 4 years ago

I am wondering if these should just be parsed as Typedefs, right now nothing happens.

https://github.com/xoofx/CppAst/blob/bd802efde243b95aca4769e5173b1ccd494423d5/src/CppAst/CppModelBuilder.cs#L226

(I would make a PR but my tree is dirty at the moment), the parsing seems to work fine in testing by just adding

case CXCursorKind.CXCursor_TypeAliasDecl: case CXCursorKind.CXCursor_TypeAliasTemplateDecl

xoofx commented 4 years ago

I am wondering if these should just be parsed as Typedefs, right now nothing happens.

You should at least get warnings in the results if they are not handle no? PR welcome with some tests for these cases (I don't know when they happen frankly)

wackoisgod commented 4 years ago

Yes, you do get the Unhandled warning which is how I found they were not being parsed to anything.

I added a PR https://github.com/xoofx/CppAst/pull/15