clang - Libclang returning incorrect cursor types (stdlib and namespaced types) -
i using libclang basic reflection of c++. creating translation unit header , visiting tree elements using cursors, in cases fall onto qualtypes necessary information out. problem right cursor types libclang returns incorrect. example header file below:
#include <vector> #include <string> namespace somenamespace { struct b { std::string m_string; std::vector<float> m_vector; }; }
i parse using clang_parsetranslationunit2 following inputs:
args: "-x", "c++"
options: cxtranslationunit_detailedpreprocessingrecord | cxtranslationunit_skipfunctionbodies | cxtranslationunit_incomplete;
now when visiting fields struct b get:
cxtype_int cursor m_vector instead of cxtype_unexposed
but std::string member m_string, cxtype_unexposed allows me visit field , extract necessary info. when visiting field string correctly "namespace" "typeref" cursor types.
i out of ideas going on, why lib clang fail understand std::vector type?
i got latest on libclang version on june 1st, 2015.
Comments
Post a Comment