You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now it always returns a Vec<Cursor> but it makes FFI calls to clang_Cursor_getArgument which are only valid if the cursor's referent is a function or method declarations and calls:
The argument cursor can be determined for calls as well as for declarations of functions or methods. For other cursors and for invalid indices, an invalid cursor is returned.
We should check whether the cursor referent is a valid kind, and if it is not, we should return None. This will be one less foot gun.
I can mentor whoever would like to pick up this bug.
The text was updated successfully, but these errors were encountered:
Right now it always returns a
Vec<Cursor>
but it makes FFI calls toclang_Cursor_getArgument
which are only valid if the cursor's referent is a function or method declarations and calls:http://clang.llvm.org/doxygen/group__CINDEX__TYPES.html#ga673c5529d33eedd0b78aca5ac6fc1d7c
We should check whether the cursor referent is a valid kind, and if it is not, we should return
None
. This will be one less foot gun.I can mentor whoever would like to pick up this bug.
The text was updated successfully, but these errors were encountered: