Commit d259a248 authored by Ole Christian Eidheim's avatar Ole Christian Eidheim
Browse files

Additional type check in Cursor::get_type_description

parent 45abfa43
Pipeline #133735869 passed with stage
in 3 minutes and 51 seconds
......@@ -218,13 +218,13 @@ bool clangmm::Cursor::is_valid_kind() const {
std::string clangmm::Cursor::get_type_description() const {
auto type = clang_getCursorType(cx_cursor);
if(type.kind != CXTypeKind::CXType_Invalid)
if(type.kind != CXTypeKind::CXType_Invalid && type.kind != CXTypeKind::CXType_Unexposed)
return to_string(clang_getTypeSpelling(type));
auto referenced = clang_getCursorReferenced(cx_cursor);
if(!clang_Cursor_isNull(referenced)) {
auto type = clang_getCursorType(referenced);
if(type.kind != CXTypeKind::CXType_Invalid)
if(type.kind != CXTypeKind::CXType_Invalid && type.kind != CXTypeKind::CXType_Unexposed)
return to_string(clang_getTypeSpelling(type));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment