diff --git a/src/cursor.cc b/src/cursor.cc index 915d782..da18044 100644 --- a/src/cursor.cc +++ b/src/cursor.cc @@ -207,6 +207,10 @@ bool clangmm::Cursor::operator==(const Cursor& rhs) const { return clang_equalCursors(cx_cursor, rhs.cx_cursor); } +unsigned clangmm::Cursor::hash() const { + return clang_hashCursor(cx_cursor); +} + bool clangmm::Cursor::is_valid_kind() const { auto referenced=clang_getCursorReferenced(cx_cursor); if(clang_Cursor_isNull(referenced)) diff --git a/src/cursor.h b/src/cursor.h index b4a62c1..6334304 100644 --- a/src/cursor.h +++ b/src/cursor.h @@ -213,6 +213,7 @@ namespace clangmm { std::vector get_all_overridden_cursors() const; operator bool() const; bool operator==(const Cursor& rhs) const; + unsigned hash() const; bool is_valid_kind() const; std::string get_type_description() const;