Browse Source

Added Cursor::hash() method

merge-requests/37/head
Florian Jung 8 years ago
parent
commit
d5bfee1b7e
  1. 4
      src/cursor.cc
  2. 1
      src/cursor.h

4
src/cursor.cc

@ -195,6 +195,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))

1
src/cursor.h

@ -212,6 +212,7 @@ namespace clangmm {
std::vector<Cursor> 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;

Loading…
Cancel
Save