mirror of
https://github.com/github/codeql.git
synced 2026-05-22 15:17:09 +02:00
KE2: Remove the declaration stack for now
Lets see if we still need it in KE2, or if there's a simpler way.
This commit is contained in:
@@ -554,7 +554,6 @@ private fun doFile(
|
||||
KotlinFileExtractor(
|
||||
logger,
|
||||
sftw,
|
||||
KotlinFileExtractor.DeclarationStack()
|
||||
/*
|
||||
OLD: KE1
|
||||
linesOfCode,
|
||||
|
||||
@@ -87,7 +87,6 @@ context (KaSession)
|
||||
open class KotlinFileExtractor(
|
||||
override val logger: FileLogger,
|
||||
override val tw: FileTrapWriter,
|
||||
val declarationStack: DeclarationStack,
|
||||
/*
|
||||
OLD: KE1
|
||||
val linesOfCode: LinesOfCode?,
|
||||
@@ -8914,7 +8913,6 @@ OLD: KE1
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
inner class DeclarationStackAdjuster(
|
||||
val declaration: KaDeclarationSymbol,
|
||||
val overriddenAttributes: OverriddenFunctionAttributes? = null
|
||||
@@ -8944,6 +8942,7 @@ OLD: KE1
|
||||
|
||||
fun findOverriddenAttributes(f: KaFunctionSymbol) = stack.lastOrNull { it.first == f }?.second
|
||||
}
|
||||
*/
|
||||
|
||||
data class OverriddenFunctionAttributes(
|
||||
val id: Label<out DbCallable>? = null,
|
||||
|
||||
@@ -23,7 +23,7 @@ fun KotlinFileExtractor.extractClassSource(
|
||||
*/
|
||||
): Label<out DbClassorinterface> {
|
||||
with("class source", c.psiSafe() ?: TODO()) {
|
||||
DeclarationStackAdjuster(c).use {
|
||||
// OLD: KE1: DeclarationStackAdjuster(c).use {
|
||||
val id = useClassSource(c)
|
||||
val pkg = c.classId?.packageFqName?.asString() ?: ""
|
||||
val cls =
|
||||
@@ -182,7 +182,7 @@ fun KotlinFileExtractor.extractClassSource(
|
||||
*/
|
||||
|
||||
return id
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,4 +373,4 @@ fun KotlinUsesExtractor.useType(t: KaType, context: TypeContext = TypeContext.OT
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user