зеркало из https://github.com/github/codeql.git
Annotate generated static proxy methods as compiler-generated
This commit is contained in:
Родитель
466cf7573b
Коммит
5a47e1dd95
|
@ -490,6 +490,7 @@ open class KotlinFileExtractor(
|
|||
// but suppress outputting the body, which we will replace with a delegating call below.
|
||||
forceExtractFunction(f, classId, extractBody = false, extractMethodAndParameterTypeAccesses = extractFunctionBodies, typeSubstitution = null, classTypeArgsIncludingOuterClasses = listOf(), idOverride = proxyFunctionId, locOverride = null)
|
||||
addModifiers(proxyFunctionId, "static")
|
||||
tw.writeCompiler_generated(proxyFunctionId, CompilerGeneratedKinds.JVMSTATIC_PROXY_METHOD.kind)
|
||||
if (extractFunctionBodies) {
|
||||
val realFunctionLocId = tw.getLocation(f)
|
||||
extractExpressionBody(proxyFunctionId, realFunctionLocId).also { returnId ->
|
||||
|
@ -4537,5 +4538,6 @@ open class KotlinFileExtractor(
|
|||
ENUM_CLASS_SPECIAL_MEMBER(5),
|
||||
DELEGATED_PROPERTY_GETTER(6),
|
||||
DELEGATED_PROPERTY_SETTER(7),
|
||||
JVMSTATIC_PROXY_METHOD(8),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -57,6 +57,12 @@ class Element extends @element, Top {
|
|||
i = 4 and result = "Class initialisation method <clinit>"
|
||||
or
|
||||
i = 5 and result = "Enum class special member"
|
||||
or
|
||||
i = 6 and result = "Getter for a Kotlin delegated property"
|
||||
or
|
||||
i = 7 and result = "Setter for a Kotlin delegated property"
|
||||
or
|
||||
i = 8 and result = "Proxy static method for a @JvmStatic-annotated function or property"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче