mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
Kotlin: Move useFunctionCommon
This commit is contained in:
@@ -1146,15 +1146,6 @@ open class KotlinUsesExtractor(
|
||||
return res
|
||||
}
|
||||
|
||||
fun <T: DbCallable> useFunctionCommon(f: IrFunction, label: String): Label<out T> {
|
||||
val id: Label<T> = tw.getLabelFor(label)
|
||||
if (isExternalDeclaration(f)) {
|
||||
extractFunctionLaterIfExternalFileMember(f)
|
||||
extractExternalEnclosingClassLater(f)
|
||||
}
|
||||
return id
|
||||
}
|
||||
|
||||
// These are classes with Java equivalents, but whose methods don't all exist on those Java equivalents--
|
||||
// for example, the numeric classes define arithmetic functions (Int.plus, Long.or and so on) that lower to
|
||||
// primitive arithmetic on the JVM, but which we extract as calls to reflect the source syntax more closely.
|
||||
@@ -1224,6 +1215,15 @@ open class KotlinUsesExtractor(
|
||||
useFunctionCommon<T>(it, getFunctionLabel(it, parentId, classTypeArgsIncludingOuterClasses))
|
||||
}
|
||||
|
||||
private fun <T: DbCallable> useFunctionCommon(f: IrFunction, label: String): Label<out T> {
|
||||
val id: Label<T> = tw.getLabelFor(label)
|
||||
if (isExternalDeclaration(f)) {
|
||||
extractFunctionLaterIfExternalFileMember(f)
|
||||
extractExternalEnclosingClassLater(f)
|
||||
}
|
||||
return id
|
||||
}
|
||||
|
||||
fun getTypeArgumentLabel(
|
||||
arg: IrTypeArgument
|
||||
): TypeResult<DbReftype> {
|
||||
|
||||
Reference in New Issue
Block a user