mirror of
https://github.com/github/codeql.git
synced 2026-05-24 16:17:07 +02:00
Merge duplicate functions
This commit is contained in:
@@ -449,10 +449,6 @@ open class FileTrapWriter(
|
||||
return getLocation(file, range)
|
||||
}
|
||||
|
||||
fun getFileOnlyLocation(): Label<DbLocation> {
|
||||
return getLocation(fileId, 0, 0, 0, 0)
|
||||
}
|
||||
|
||||
/*
|
||||
OLD: KE1
|
||||
/** Gets a label for the location of `e`. */
|
||||
|
||||
@@ -62,7 +62,7 @@ fun KotlinFileExtractor.extractClassSource(
|
||||
}
|
||||
}
|
||||
|
||||
val locId = c.psiSafe<KtElement>()?.let { tw.getLocation(it) } ?: tw.getFileOnlyLocation()
|
||||
val locId = c.psiSafe<KtElement>()?.let { tw.getLocation(it) } ?: tw.getWholeFileLocation()
|
||||
tw.writeHasLocation(id, locId)
|
||||
|
||||
// OLD: KE1
|
||||
|
||||
@@ -510,7 +510,7 @@ OLD: KE1
|
||||
val functionSyntax = f.psi as? KtDeclarationWithBody
|
||||
val locId = functionSyntax?.let {
|
||||
tw.getLocation(functionSyntax ?: TODO())
|
||||
} ?: tw.getFileOnlyLocation()
|
||||
} ?: tw.getWholeFileLocation()
|
||||
/*
|
||||
OLD: KE1
|
||||
overriddenAttributes?.sourceLoc
|
||||
|
||||
Reference in New Issue
Block a user