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 we just directly do an FFI call that returns -1 if the cursor's referent is not a function/method call or declaration. We should inspect the return value and return None if it is -1 or Some if it is >= 0. This would be one less foot gun where we require callers of this method to remember to check.
fix: clang::Cursor::num_args should return Option<u32> #132
Hi, tried to fix the issue mentioned. Not sure, if changing fn args makes sense (the err message probably doesn't...). cargo test --features llvm_stable was succesful.
- changed output of fn num_args to option<u32>
- changed fn args to handle option<u32> instead of usize
Right now we just directly do an FFI call that returns -1 if the cursor's referent is not a function/method call or declaration. We should inspect the return value and return
None
if it is-1
orSome
if it is>= 0
. This would be one less foot gun where we require callers of this method to remember to check.http://clang.llvm.org/doxygen/group__CINDEX__TYPES.html#ga5254f761b57fd78de3ac9c6bfcaa7fed
I can mentor whoever picks up this bug.
The text was updated successfully, but these errors were encountered: