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 Cursor but it makes an FFI call to clang_Cursor_getCursorResultType which is only valid if the cursor's referent is a function or method declarations and calls:
This only returns a valid type if the cursor refers to a function or method.
We should check whether the cursor referent is a valid function/method call/decl 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
Cursor
but it makes an FFI call toclang_Cursor_getCursorResultType
which is only valid if the cursor's referent is a function or method declarations and calls:http://clang.llvm.org/doxygen/group__CINDEX__TYPES.html#ga6995a2d6352e7136868574b299005a63
We should check whether the cursor referent is a valid function/method call/decl 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: