Open deadlocklogic opened 1 year ago
After some digging, (including trying cindex python
), I noticed that the compiler generates some synthetic typenames.
A quick fix could be in: https://github.com/foonathan/cppast/blob/f00df6675d87c6983033d270728c57a55cd3db22/src/libclang/type_parser.cpp#L310-L330
by simply not using auto canonical = type; // clang_getCanonicalType(type);
but the type directly.
So maybe it is a hint because I haven't dug enough to know if it is code breaking or sufficient, but a quick and dirty patch worked for now.
If you want I can submit a PR.
Actually I noticed few simple bugs which make the compilation fail with clang on windows (few CMake bugs).
And I was considering harvesting more infos from libclang
for example:
1- if the constructor is default/copy/move
2- source location of the entity (we talked about it previously)
libclang_parser
Explanation of the error: Consider parsing: https://github.com/foonathan/cppast/blob/f00df6675d87c6983033d270728c57a55cd3db22/include/cppast/code_generator.hpp#L30-L32
Input:
Output:
Expected result:
Where the underscore come from? Thanks.