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
501 stars 66 forks source link

Fix function pointer fields share parameters #6

Closed leafgarland closed 5 years ago

leafgarland commented 5 years ago

Hi, thanks for this library - I'm making good use of it to generate a pinvoke wrapper using Roslyn AST to generate the code. It's working well apart from this bug I hit with a struct that contains function pointer fields, the CppAst result duplicated the first function pointer field's parmaters to all the rest. See the test for an example.

The fix makes sense to me, and passes current test suite but I might be going the wrong way with it. I've not used libclang before.

xoofx commented 5 years ago

Good catch, thanks!