Skip to content

Commit 50eeb47

Browse files
committed
Kotlin: Mark <clinit> as compiler-generated
1 parent c060082 commit 50eeb47

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,8 @@ open class KotlinFileExtractor(
595595
tw.writeMethods(clinitId, "<clinit>", "<clinit>()", returnType.javaResult.id, parentId, clinitId)
596596
tw.writeMethodsKotlinType(clinitId, returnType.kotlinResult.id)
597597

598+
tw.writeCompiler_generated(clinitId, 4)
599+
598600
val locId = tw.getWholeFileLocation()
599601
tw.writeHasLocation(clinitId, locId)
600602

java/ql/lib/semmle/code/java/Element.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ class Element extends @element, Top {
5353
i = 2 and result = "Generated data class member"
5454
or
5555
i = 3 and result = "Default property accessor"
56+
or
57+
i = 4 and result = "Class initialisation method <clinit>"
5658
)
5759
}
5860
}

0 commit comments

Comments
 (0)