Open Fengxiaoxx opened 10 months ago
Hi. Please check parsing errors:
print(your_cursor.translation_unit.diagnostics)
There you will see a list of parse errors, identical to the compiler's.
In your case the case is clear, you are missing include to std::string. This is the first step, it should usually help, but on some Linux systems it may not be enough (in my clangtools package, Devana, I provide the libcxx header for this reason).
Hello, I've encountered an issue while parsing the AST of header files using the libclang library. It seems that all class and namespace CursorKind are recognized as VAR_DECL. Is there any solution to this problem?The correct solution is to use CursorKind.CLASS_DECL for classes and CursorKind.NAMESPACE_DECL for namespaces.Looking forward to your reply!