mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Extract ordinary array get and set operations as ArrayAccesses, not calls
This commit is contained in:
committed by
Ian Lynagh
parent
387e8db161
commit
2fb54de269
@@ -0,0 +1,18 @@
|
||||
| arrayGetsSets.kt:12:3:12:7 | ...[...] | arrayGetsSets.kt:12:3:12:7 | ...=... |
|
||||
| arrayGetsSets.kt:12:11:12:15 | ...[...] | arrayGetsSets.kt:12:3:12:7 | ...=... |
|
||||
| arrayGetsSets.kt:13:3:13:7 | ...[...] | arrayGetsSets.kt:13:3:13:7 | ...=... |
|
||||
| arrayGetsSets.kt:13:11:13:15 | ...[...] | arrayGetsSets.kt:13:3:13:7 | ...=... |
|
||||
| arrayGetsSets.kt:14:3:14:7 | ...[...] | arrayGetsSets.kt:14:3:14:7 | ...=... |
|
||||
| arrayGetsSets.kt:14:11:14:15 | ...[...] | arrayGetsSets.kt:14:3:14:7 | ...=... |
|
||||
| arrayGetsSets.kt:15:3:15:7 | ...[...] | arrayGetsSets.kt:15:3:15:7 | ...=... |
|
||||
| arrayGetsSets.kt:15:11:15:15 | ...[...] | arrayGetsSets.kt:15:3:15:7 | ...=... |
|
||||
| arrayGetsSets.kt:16:3:16:7 | ...[...] | arrayGetsSets.kt:16:3:16:7 | ...=... |
|
||||
| arrayGetsSets.kt:16:11:16:15 | ...[...] | arrayGetsSets.kt:16:3:16:7 | ...=... |
|
||||
| arrayGetsSets.kt:17:3:17:7 | ...[...] | arrayGetsSets.kt:17:3:17:7 | ...=... |
|
||||
| arrayGetsSets.kt:17:11:17:15 | ...[...] | arrayGetsSets.kt:17:3:17:7 | ...=... |
|
||||
| arrayGetsSets.kt:18:3:18:7 | ...[...] | arrayGetsSets.kt:18:3:18:7 | ...=... |
|
||||
| arrayGetsSets.kt:18:11:18:15 | ...[...] | arrayGetsSets.kt:18:3:18:7 | ...=... |
|
||||
| arrayGetsSets.kt:19:3:19:7 | ...[...] | arrayGetsSets.kt:19:3:19:7 | ...=... |
|
||||
| arrayGetsSets.kt:19:11:19:15 | ...[...] | arrayGetsSets.kt:19:3:19:7 | ...=... |
|
||||
| arrayGetsSets.kt:20:3:20:7 | ...[...] | arrayGetsSets.kt:20:3:20:7 | ...=... |
|
||||
| arrayGetsSets.kt:20:11:20:15 | ...[...] | arrayGetsSets.kt:20:3:20:7 | ...=... |
|
||||
@@ -0,0 +1,4 @@
|
||||
import java
|
||||
|
||||
from ArrayAccess aa
|
||||
select aa, aa.getParent()
|
||||
22
java/ql/test/kotlin/library-tests/arrays/arrayGetsSets.kt
Normal file
22
java/ql/test/kotlin/library-tests/arrays/arrayGetsSets.kt
Normal file
@@ -0,0 +1,22 @@
|
||||
fun arrayGetSet(
|
||||
a1: IntArray,
|
||||
a2: ShortArray,
|
||||
a3: ByteArray,
|
||||
a4: LongArray,
|
||||
a5: FloatArray,
|
||||
a6: DoubleArray,
|
||||
a7: BooleanArray,
|
||||
a8: CharArray,
|
||||
a9: Array<Any>) {
|
||||
|
||||
a1[0] = a1[0]
|
||||
a2[0] = a2[0]
|
||||
a3[0] = a3[0]
|
||||
a4[0] = a4[0]
|
||||
a5[0] = a5[0]
|
||||
a6[0] = a6[0]
|
||||
a7[0] = a7[0]
|
||||
a8[0] = a8[0]
|
||||
a9[0] = a9[0]
|
||||
|
||||
}
|
||||
@@ -17,6 +17,7 @@ sourceSignatures
|
||||
| arrayCreations.kt:26:27:26:36 | invoke | invoke(int) |
|
||||
| arrayCreations.kt:27:24:27:38 | | |
|
||||
| arrayCreations.kt:27:24:27:38 | invoke | invoke(int) |
|
||||
| arrayGetsSets.kt:1:1:22:1 | arrayGetSet | arrayGetSet(int[],short[],byte[],long[],float[],double[],boolean[],char[],java.lang.Object[]) |
|
||||
| primitiveArrays.kt:3:1:7:1 | <obinit> | <obinit>() |
|
||||
| primitiveArrays.kt:3:1:7:1 | Test | Test() |
|
||||
| primitiveArrays.kt:5:3:5:123 | test | test(java.lang.Integer[],java.lang.Integer[],int[],java.lang.Integer[][],java.lang.Integer[][],int[][]) |
|
||||
|
||||
@@ -26,15 +26,9 @@ implicitVarargsArguments
|
||||
| intList.kt:3:14:3:31 | listOf(...) | 0 | intList.kt:3:21:3:22 | 10 |
|
||||
| intList.kt:3:14:3:31 | listOf(...) | 1 | intList.kt:3:25:3:26 | 11 |
|
||||
| intList.kt:3:14:3:31 | listOf(...) | 2 | intList.kt:3:29:3:30 | 12 |
|
||||
| test.kt:7:5:7:19 | sink(...) | 0 | test.kt:7:10:7:18 | get(...) |
|
||||
| test.kt:7:10:7:18 | get(...) | 0 | test.kt:7:13:7:17 | get(...) |
|
||||
| test.kt:7:13:7:17 | get(...) | 0 | test.kt:7:16:7:16 | 0 |
|
||||
| test.kt:11:5:11:19 | sink(...) | 0 | test.kt:11:10:11:18 | get(...) |
|
||||
| test.kt:11:10:11:18 | get(...) | 0 | test.kt:11:13:11:17 | get(...) |
|
||||
| test.kt:11:13:11:17 | get(...) | 0 | test.kt:11:16:11:16 | 0 |
|
||||
| test.kt:15:5:15:19 | sink(...) | 0 | test.kt:15:10:15:18 | get(...) |
|
||||
| test.kt:15:10:15:18 | get(...) | 0 | test.kt:15:13:15:17 | get(...) |
|
||||
| test.kt:15:13:15:17 | get(...) | 0 | test.kt:15:16:15:16 | 0 |
|
||||
| test.kt:7:5:7:19 | sink(...) | 0 | test.kt:7:10:7:18 | ...[...] |
|
||||
| test.kt:11:5:11:19 | sink(...) | 0 | test.kt:11:10:11:18 | ...[...] |
|
||||
| test.kt:15:5:15:19 | sink(...) | 0 | test.kt:15:10:15:18 | ...[...] |
|
||||
| test.kt:19:14:19:31 | listOf(...) | 0 | test.kt:19:21:19:22 | 10 |
|
||||
| test.kt:19:14:19:31 | listOf(...) | 1 | test.kt:19:25:19:26 | 11 |
|
||||
| test.kt:19:14:19:31 | listOf(...) | 2 | test.kt:19:29:19:30 | 12 |
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
| test.kt:20:28:20:30 | 100 | test.kt:7:10:7:18 | ...[...] |
|
||||
| test.kt:20:28:20:30 | 100 | test.kt:11:10:11:18 | ...[...] |
|
||||
| test.kt:20:28:20:30 | 100 | test.kt:15:10:15:18 | ...[...] |
|
||||
| test.kt:20:33:20:35 | 101 | test.kt:7:10:7:18 | ...[...] |
|
||||
| test.kt:20:33:20:35 | 101 | test.kt:11:10:11:18 | ...[...] |
|
||||
| test.kt:20:33:20:35 | 101 | test.kt:15:10:15:18 | ...[...] |
|
||||
| test.kt:20:38:20:40 | 102 | test.kt:7:10:7:18 | ...[...] |
|
||||
| test.kt:20:38:20:40 | 102 | test.kt:11:10:11:18 | ...[...] |
|
||||
| test.kt:20:38:20:40 | 102 | test.kt:15:10:15:18 | ...[...] |
|
||||
| test.kt:21:24:21:25 | 20 | test.kt:7:10:7:18 | ...[...] |
|
||||
| test.kt:21:28:21:29 | 21 | test.kt:7:10:7:18 | ...[...] |
|
||||
| test.kt:21:32:21:33 | 22 | test.kt:7:10:7:18 | ...[...] |
|
||||
| test.kt:22:40:22:41 | 30 | test.kt:11:10:11:18 | ...[...] |
|
||||
| test.kt:22:44:22:45 | 31 | test.kt:11:10:11:18 | ...[...] |
|
||||
| test.kt:22:48:22:49 | 32 | test.kt:11:10:11:18 | ...[...] |
|
||||
|
||||
Reference in New Issue
Block a user