From d259a248e37e3a1660e6f2d77d51613379f67c29 Mon Sep 17 00:00:00 2001 From: eidheim Date: Tue, 7 Apr 2020 18:06:32 +0200 Subject: [PATCH] Additional type check in Cursor::get_type_description --- src/cursor.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cursor.cc b/src/cursor.cc index f1dea65..62f5189 100644 --- a/src/cursor.cc +++ b/src/cursor.cc @@ -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)); }