Add quickfix for unsupported types in Objective-C methods
This commit is contained in:
committed by
SvyatoslavScherbina
parent
7795a7856a
commit
c1b0dba1d2
@@ -752,6 +752,10 @@ internal class NativeIndexImpl(val library: NativeLibrary) : NativeIndex() {
|
|||||||
val returnType = convertType(clang_getCursorResultType(cursor), clang_getCursorResultTypeAttributes(cursor))
|
val returnType = convertType(clang_getCursorResultType(cursor), clang_getCursorResultTypeAttributes(cursor))
|
||||||
val parameters = getFunctionParameters(cursor)
|
val parameters = getFunctionParameters(cursor)
|
||||||
|
|
||||||
|
if (returnType == UnsupportedType || parameters.any { it.type == UnsupportedType }) {
|
||||||
|
return null // TODO: make a more universal fix.
|
||||||
|
}
|
||||||
|
|
||||||
val isClass = when (cursor.kind) {
|
val isClass = when (cursor.kind) {
|
||||||
CXCursorKind.CXCursor_ObjCClassMethodDecl -> true
|
CXCursorKind.CXCursor_ObjCClassMethodDecl -> true
|
||||||
CXCursorKind.CXCursor_ObjCInstanceMethodDecl -> false
|
CXCursorKind.CXCursor_ObjCInstanceMethodDecl -> false
|
||||||
|
|||||||
Reference in New Issue
Block a user