mirror of
https://github.com/github/codeql.git
synced 2026-07-01 09:35:42 +02:00
Compare commits
73 Commits
bazookamus
...
workflow/c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3cbb8ba87e | ||
|
|
11e75c12a8 | ||
|
|
c045da01a1 | ||
|
|
a9617f18a1 | ||
|
|
8a46f03308 | ||
|
|
fc94d1c035 | ||
|
|
a93501a1eb | ||
|
|
06f54d1bbb | ||
|
|
396bea6e6a | ||
|
|
a43c5cee61 | ||
|
|
81ed5c59d7 | ||
|
|
8d564d31e6 | ||
|
|
cbcf85a953 | ||
|
|
c0871defe9 | ||
|
|
be39051c29 | ||
|
|
8447b76c12 | ||
|
|
3d8991a4db | ||
|
|
4a7afb7aeb | ||
|
|
37d2224b9d | ||
|
|
0a737c97f3 | ||
|
|
28f0be5c67 | ||
|
|
f353a17431 | ||
|
|
caaed72288 | ||
|
|
08c383df6a | ||
|
|
2625c304bf | ||
|
|
49bde567dd | ||
|
|
d519f79703 | ||
|
|
12bd3e2860 | ||
|
|
3e1ca82cbf | ||
|
|
f1cc1e5c47 | ||
|
|
f14a5678be | ||
|
|
041a8e6adc | ||
|
|
fb424020af | ||
|
|
bda8e7dae1 | ||
|
|
37c8111c18 | ||
|
|
807bb51df7 | ||
|
|
b6abfe6e5c | ||
|
|
b3dc7009a4 | ||
|
|
e59f646870 | ||
|
|
cc3c232631 | ||
|
|
9a5cc3c5e3 | ||
|
|
3983e4db29 | ||
|
|
72f1a0d89b | ||
|
|
96e88a1f9a | ||
|
|
3058198c0d | ||
|
|
d985c48e84 | ||
|
|
330bb17d69 | ||
|
|
818a25b64e | ||
|
|
4237a76251 | ||
|
|
2ef06c9f96 | ||
|
|
727f7d2afa | ||
|
|
3c5f70de11 | ||
|
|
1842382e23 | ||
|
|
db449dca6a | ||
|
|
7216d12b9a | ||
|
|
c4b4fde0d7 | ||
|
|
c0c8958db1 | ||
|
|
0ee40417ea | ||
|
|
46382cbc8e | ||
|
|
93439db87b | ||
|
|
897d16929b | ||
|
|
6f997ae15c | ||
|
|
300e48e48e | ||
|
|
f840f6104a | ||
|
|
70ca7af04c | ||
|
|
664f0125b9 | ||
|
|
1b7f589000 | ||
|
|
eb7f8cc43d | ||
|
|
18913ce4b8 | ||
|
|
a45ef5845a | ||
|
|
d32c4d838d | ||
|
|
8042fba94a | ||
|
|
bbad4f6069 |
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: deprecated
|
||||
---
|
||||
* Models-as-data flow summaries now use fully qualified field names (for example, `MyNamespace::MyStruct::myField`) instead of unqualified field names such as `myField`. We recommend updating existing flow summaries to use fully qualified field names. Unqualified field names are still supported, but that support will be removed in a future release.
|
||||
@@ -40,12 +40,24 @@ module Input implements InputSig<Location, DataFlowImplSpecific::CppDataFlow> {
|
||||
arg = repeatStars(rk.(NormalReturnKind).getIndirectionIndex())
|
||||
}
|
||||
|
||||
bindingset[namespace, type, base]
|
||||
private string formatQualifiedName(string namespace, string type, string base) {
|
||||
if namespace = ""
|
||||
then result = type + "::" + base
|
||||
else result = namespace + "::" + type + "::" + base
|
||||
}
|
||||
|
||||
string encodeContent(ContentSet cs, string arg) {
|
||||
exists(FieldContent c |
|
||||
exists(FieldContent c, string namespace, string type, string base |
|
||||
cs.isSingleton(c) and
|
||||
// FieldContent indices have 0 for the address, 1 for content, so we need to subtract one.
|
||||
result = "Field" and
|
||||
arg = repeatStars(c.getIndirectionIndex() - 1) + c.getField().getName()
|
||||
c.getField().hasQualifiedName(namespace, type, base)
|
||||
|
|
||||
arg = repeatStars(c.getIndirectionIndex() - 1) + formatQualifiedName(namespace, type, base)
|
||||
or
|
||||
// TODO: This disjunct can be removed once we stop supporting unqualified field names.
|
||||
arg = repeatStars(c.getIndirectionIndex() - 1) + base
|
||||
)
|
||||
or
|
||||
exists(ElementContent ec |
|
||||
|
||||
@@ -1378,6 +1378,8 @@ predicate nodeIsHidden(Node n) {
|
||||
n instanceof InitialGlobalValue
|
||||
or
|
||||
n instanceof SsaSynthNode
|
||||
or
|
||||
n.(FlowSummaryNode).getSummaryNode().isHidden()
|
||||
}
|
||||
|
||||
predicate neverSkipInPathGraph(Node n) {
|
||||
|
||||
@@ -48,19 +48,20 @@ models
|
||||
| 47 | Summary: ; ; false; callWithArgument; ; ; Argument[1]; Argument[0].Parameter[0]; value; manual |
|
||||
| 48 | Summary: ; ; false; callWithNonTypeTemplate<T>; (const T &); ; Argument[*0]; ReturnValue; value; manual |
|
||||
| 49 | Summary: ; ; false; pthread_create; ; ; Argument[@3]; Argument[2].Parameter[@0]; value; manual |
|
||||
| 50 | Summary: ; ; false; ymlStepGenerated; ; ; Argument[0]; ReturnValue; taint; df-generated |
|
||||
| 51 | Summary: ; ; false; ymlStepManual; ; ; Argument[0]; ReturnValue; taint; manual |
|
||||
| 52 | Summary: ; ; false; ymlStepManual_with_body; ; ; Argument[0]; ReturnValue; taint; manual |
|
||||
| 53 | Summary: ; TemplateClass1; true; templateFunction2<U,V>; (U,V); ; Argument[1]; ReturnValue; value; manual |
|
||||
| 54 | Summary: ; TemplateClass1<T>; false; templateFunction<U>; (T,U); ; Argument[0]; ReturnValue; value; manual |
|
||||
| 55 | Summary: ; TemplateClass2<T,U>; true; function; (U,T); ; Argument[1]; ReturnValue; value; manual |
|
||||
| 56 | Summary: Azure::Core::IO; BodyStream; true; Read; ; ; Argument[-1]; Argument[*0]; taint; manual |
|
||||
| 57 | Summary: Azure::Core::IO; BodyStream; true; ReadToCount; ; ; Argument[-1]; Argument[*0]; taint; manual |
|
||||
| 58 | Summary: Azure::Core::IO; BodyStream; true; ReadToEnd; ; ; Argument[-1]; ReturnValue.Element; taint; manual |
|
||||
| 59 | Summary: Azure; Nullable; true; Value; ; ; Argument[-1]; ReturnValue[*]; taint; manual |
|
||||
| 60 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual |
|
||||
| 50 | Summary: ; ; false; read_field_from_struct; ; ; Argument[*0].Field[MyNamespace::MyStructInNamespace::myField]; ReturnValue; value; manual |
|
||||
| 51 | Summary: ; ; false; read_field_from_struct_2; ; ; Argument[*0].Field[MyGlobalStruct::myField]; ReturnValue; value; manual |
|
||||
| 52 | Summary: ; ; false; ymlStepGenerated; ; ; Argument[0]; ReturnValue; taint; df-generated |
|
||||
| 53 | Summary: ; ; false; ymlStepManual; ; ; Argument[0]; ReturnValue; taint; manual |
|
||||
| 54 | Summary: ; ; false; ymlStepManual_with_body; ; ; Argument[0]; ReturnValue; taint; manual |
|
||||
| 55 | Summary: ; TemplateClass1; true; templateFunction2<U,V>; (U,V); ; Argument[1]; ReturnValue; value; manual |
|
||||
| 56 | Summary: ; TemplateClass1<T>; false; templateFunction<U>; (T,U); ; Argument[0]; ReturnValue; value; manual |
|
||||
| 57 | Summary: ; TemplateClass2<T,U>; true; function; (U,T); ; Argument[1]; ReturnValue; value; manual |
|
||||
| 58 | Summary: Azure::Core::IO; BodyStream; true; Read; ; ; Argument[-1]; Argument[*0]; taint; manual |
|
||||
| 59 | Summary: Azure::Core::IO; BodyStream; true; ReadToCount; ; ; Argument[-1]; Argument[*0]; taint; manual |
|
||||
| 60 | Summary: Azure::Core::IO; BodyStream; true; ReadToEnd; ; ; Argument[-1]; ReturnValue.Element; taint; manual |
|
||||
| 61 | Summary: Azure; Nullable; true; Value; ; ; Argument[-1]; ReturnValue[*]; taint; manual |
|
||||
| 62 | Summary: boost::asio; ; false; buffer; ; ; Argument[*0]; ReturnValue; taint; manual |
|
||||
edges
|
||||
| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | provenance | MaD:60 |
|
||||
| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:91:7:91:17 | recv_buffer | provenance | Src:MaD:32 |
|
||||
| asio_streams.cpp:87:34:87:44 | read_until output argument | asio_streams.cpp:93:29:93:39 | *recv_buffer | provenance | Src:MaD:32 Sink:MaD:2 |
|
||||
| asio_streams.cpp:97:37:97:44 | call to source | asio_streams.cpp:98:7:98:14 | send_str | provenance | TaintFunction |
|
||||
@@ -68,25 +69,16 @@ edges
|
||||
| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | |
|
||||
| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:101:7:101:17 | send_buffer | provenance | |
|
||||
| asio_streams.cpp:100:44:100:62 | call to buffer | asio_streams.cpp:103:29:103:39 | *send_buffer | provenance | Sink:MaD:2 |
|
||||
| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | provenance | |
|
||||
| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:60 |
|
||||
| azure.cpp:62:10:62:14 | [summary param] this in Value | azure.cpp:62:10:62:14 | [summary] to write: ReturnValue[*] in Value | provenance | MaD:59 |
|
||||
| azure.cpp:113:16:113:19 | [summary param] this in Read | azure.cpp:113:16:113:19 | [summary param] *0 in Read [Return] | provenance | MaD:56 |
|
||||
| azure.cpp:114:16:114:26 | [summary param] this in ReadToCount | azure.cpp:114:16:114:26 | [summary param] *0 in ReadToCount [Return] | provenance | MaD:57 |
|
||||
| azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue.Element in ReadToEnd | provenance | MaD:58 |
|
||||
| azure.cpp:115:30:115:38 | [summary] to write: ReturnValue.Element in ReadToEnd | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue in ReadToEnd [element] | provenance | |
|
||||
| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:100:44:100:62 | call to buffer | provenance | MaD:62 |
|
||||
| azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:253:48:253:60 | *call to GetBodyStream | provenance | Src:MaD:29 |
|
||||
| azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:257:5:257:8 | *resp | provenance | |
|
||||
| azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:262:5:262:8 | *resp | provenance | |
|
||||
| azure.cpp:253:48:253:60 | *call to GetBodyStream | azure.cpp:266:38:266:41 | *resp | provenance | |
|
||||
| azure.cpp:257:5:257:8 | *resp | azure.cpp:113:16:113:19 | [summary param] this in Read | provenance | |
|
||||
| azure.cpp:257:5:257:8 | *resp | azure.cpp:257:16:257:21 | Read output argument | provenance | MaD:56 |
|
||||
| azure.cpp:257:5:257:8 | *resp | azure.cpp:257:16:257:21 | Read output argument | provenance | MaD:58 |
|
||||
| azure.cpp:257:16:257:21 | Read output argument | azure.cpp:258:10:258:16 | * ... | provenance | |
|
||||
| azure.cpp:262:5:262:8 | *resp | azure.cpp:114:16:114:26 | [summary param] this in ReadToCount | provenance | |
|
||||
| azure.cpp:262:5:262:8 | *resp | azure.cpp:262:23:262:28 | ReadToCount output argument | provenance | MaD:57 |
|
||||
| azure.cpp:262:5:262:8 | *resp | azure.cpp:262:23:262:28 | ReadToCount output argument | provenance | MaD:59 |
|
||||
| azure.cpp:262:23:262:28 | ReadToCount output argument | azure.cpp:263:10:263:16 | * ... | provenance | |
|
||||
| azure.cpp:266:38:266:41 | *resp | azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | provenance | |
|
||||
| azure.cpp:266:38:266:41 | *resp | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | provenance | MaD:58 |
|
||||
| azure.cpp:266:38:266:41 | *resp | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | provenance | MaD:60 |
|
||||
| azure.cpp:266:44:266:52 | call to ReadToEnd [element] | azure.cpp:266:44:266:52 | call to ReadToEnd [element] | provenance | |
|
||||
| azure.cpp:266:44:266:52 | call to ReadToEnd [element] | azure.cpp:267:10:267:12 | vec [element] | provenance | |
|
||||
| azure.cpp:267:10:267:12 | vec [element] | azure.cpp:267:10:267:12 | vec | provenance | |
|
||||
@@ -102,12 +94,10 @@ edges
|
||||
| azure.cpp:278:10:278:13 | body | azure.cpp:278:10:278:13 | body | provenance | |
|
||||
| azure.cpp:281:68:281:84 | *call to ExtractBodyStream | azure.cpp:281:68:281:84 | *call to ExtractBodyStream | provenance | Src:MaD:26 |
|
||||
| azure.cpp:281:68:281:84 | *call to ExtractBodyStream | azure.cpp:282:21:282:23 | *call to get | provenance | |
|
||||
| azure.cpp:282:21:282:23 | *call to get | azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | provenance | |
|
||||
| azure.cpp:282:21:282:23 | *call to get | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | provenance | MaD:58 |
|
||||
| azure.cpp:282:21:282:23 | *call to get | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | provenance | MaD:60 |
|
||||
| azure.cpp:282:28:282:36 | call to ReadToEnd [element] | azure.cpp:282:10:282:38 | call to ReadToEnd | provenance | |
|
||||
| azure.cpp:282:28:282:36 | call to ReadToEnd [element] | azure.cpp:282:28:282:36 | call to ReadToEnd [element] | provenance | |
|
||||
| azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:62:10:62:14 | [summary param] this in Value | provenance | |
|
||||
| azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:289:63:289:65 | call to Value | provenance | MaD:59 |
|
||||
| azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:289:63:289:65 | call to Value | provenance | MaD:61 |
|
||||
| azure.cpp:289:32:289:40 | call to GetHeader | azure.cpp:289:24:289:56 | call to GetHeader | provenance | |
|
||||
| azure.cpp:289:32:289:40 | call to GetHeader | azure.cpp:289:32:289:40 | call to GetHeader | provenance | Src:MaD:30 |
|
||||
| azure.cpp:289:63:289:65 | call to Value | azure.cpp:289:63:289:65 | call to Value | provenance | |
|
||||
@@ -119,9 +109,6 @@ edges
|
||||
| azure.cpp:294:38:294:53 | call to operator[] | azure.cpp:295:10:295:20 | contentType | provenance | |
|
||||
| azure.cpp:294:38:294:53 | call to operator[] | azure.cpp:295:10:295:20 | contentType | provenance | |
|
||||
| azure.cpp:295:10:295:20 | contentType | azure.cpp:295:10:295:20 | contentType | provenance | |
|
||||
| test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | test.cpp:4:5:4:17 | [summary] to write: ReturnValue in ymlStepManual | provenance | MaD:51 |
|
||||
| test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | test.cpp:5:5:5:20 | [summary] to write: ReturnValue in ymlStepGenerated | provenance | MaD:50 |
|
||||
| test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | provenance | MaD:52 |
|
||||
| test.cpp:7:47:7:52 | value2 | test.cpp:7:64:7:69 | value2 | provenance | |
|
||||
| test.cpp:7:64:7:69 | value2 | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | provenance | |
|
||||
| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:10:10:10:18 | call to ymlSource | provenance | Src:MaD:25 |
|
||||
@@ -132,16 +119,13 @@ edges
|
||||
| test.cpp:10:10:10:18 | call to ymlSource | test.cpp:32:41:32:41 | x | provenance | |
|
||||
| test.cpp:17:10:17:22 | call to ymlStepManual | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | |
|
||||
| test.cpp:17:10:17:22 | call to ymlStepManual | test.cpp:18:10:18:10 | y | provenance | Sink:MaD:1 |
|
||||
| test.cpp:17:24:17:24 | x | test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | provenance | |
|
||||
| test.cpp:17:24:17:24 | x | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | MaD:51 |
|
||||
| test.cpp:17:24:17:24 | x | test.cpp:17:10:17:22 | call to ymlStepManual | provenance | MaD:53 |
|
||||
| test.cpp:21:10:21:25 | call to ymlStepGenerated | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | |
|
||||
| test.cpp:21:10:21:25 | call to ymlStepGenerated | test.cpp:22:10:22:10 | z | provenance | Sink:MaD:1 |
|
||||
| test.cpp:21:27:21:27 | x | test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | provenance | |
|
||||
| test.cpp:21:27:21:27 | x | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | MaD:50 |
|
||||
| test.cpp:21:27:21:27 | x | test.cpp:21:10:21:25 | call to ymlStepGenerated | provenance | MaD:52 |
|
||||
| test.cpp:25:11:25:33 | call to ymlStepManual_with_body | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | |
|
||||
| test.cpp:25:11:25:33 | call to ymlStepManual_with_body | test.cpp:26:10:26:11 | y2 | provenance | Sink:MaD:1 |
|
||||
| test.cpp:25:35:25:35 | x | test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | provenance | |
|
||||
| test.cpp:25:35:25:35 | x | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | MaD:52 |
|
||||
| test.cpp:25:35:25:35 | x | test.cpp:25:11:25:33 | call to ymlStepManual_with_body | provenance | MaD:54 |
|
||||
| test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | provenance | |
|
||||
| test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body | test.cpp:33:10:33:11 | z2 | provenance | Sink:MaD:1 |
|
||||
| test.cpp:32:41:32:41 | x | test.cpp:7:47:7:52 | value2 | provenance | |
|
||||
@@ -149,20 +133,10 @@ edges
|
||||
| test.cpp:46:30:46:32 | *arg [x] | test.cpp:47:12:47:19 | *arg [x] | provenance | |
|
||||
| test.cpp:47:12:47:19 | *arg [x] | test.cpp:48:13:48:13 | *s [x] | provenance | |
|
||||
| test.cpp:48:13:48:13 | *s [x] | test.cpp:48:16:48:16 | x | provenance | Sink:MaD:1 |
|
||||
| test.cpp:52:5:52:18 | [summary param] *3 in pthread_create [x] | test.cpp:52:5:52:18 | [summary] to write: Argument[2].Parameter[*0] in pthread_create [x] | provenance | MaD:49 |
|
||||
| test.cpp:52:5:52:18 | [summary] to write: Argument[2].Parameter[*0] in pthread_create [x] | test.cpp:46:30:46:32 | *arg [x] | provenance | |
|
||||
| test.cpp:56:2:56:2 | *s [post update] [x] | test.cpp:59:55:59:64 | *& ... [x] | provenance | |
|
||||
| test.cpp:56:2:56:18 | ... = ... | test.cpp:56:2:56:2 | *s [post update] [x] | provenance | |
|
||||
| test.cpp:56:8:56:16 | call to ymlSource | test.cpp:56:2:56:18 | ... = ... | provenance | Src:MaD:25 |
|
||||
| test.cpp:59:55:59:64 | *& ... [x] | test.cpp:52:5:52:18 | [summary param] *3 in pthread_create [x] | provenance | |
|
||||
| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | provenance | MaD:47 |
|
||||
| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | provenance | MaD:47 |
|
||||
| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | provenance | MaD:47 |
|
||||
| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | provenance | MaD:47 |
|
||||
| test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | test.cpp:68:22:68:22 | y | provenance | |
|
||||
| test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | test.cpp:74:22:74:22 | y | provenance | |
|
||||
| test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | test.cpp:82:22:82:22 | y | provenance | |
|
||||
| test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | test.cpp:88:22:88:22 | y | provenance | |
|
||||
| test.cpp:59:55:59:64 | *& ... [x] | test.cpp:46:30:46:32 | *arg [x] | provenance | MaD:49 |
|
||||
| test.cpp:68:22:68:22 | y | test.cpp:69:11:69:11 | y | provenance | Sink:MaD:1 |
|
||||
| test.cpp:74:22:74:22 | y | test.cpp:75:11:75:11 | y | provenance | Sink:MaD:1 |
|
||||
| test.cpp:82:22:82:22 | y | test.cpp:83:11:83:11 | y | provenance | Sink:MaD:1 |
|
||||
@@ -172,69 +146,61 @@ edges
|
||||
| test.cpp:94:10:94:18 | call to ymlSource | test.cpp:101:26:101:26 | x | provenance | |
|
||||
| test.cpp:94:10:94:18 | call to ymlSource | test.cpp:103:63:103:63 | x | provenance | |
|
||||
| test.cpp:94:10:94:18 | call to ymlSource | test.cpp:104:62:104:62 | x | provenance | |
|
||||
| test.cpp:97:26:97:26 | x | test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | provenance | |
|
||||
| test.cpp:101:26:101:26 | x | test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | provenance | |
|
||||
| test.cpp:103:63:103:63 | x | test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | provenance | |
|
||||
| test.cpp:104:62:104:62 | x | test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | provenance | |
|
||||
| test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | test.cpp:111:3:111:25 | [summary] to write: ReturnValue in callWithNonTypeTemplate | provenance | MaD:48 |
|
||||
| test.cpp:97:26:97:26 | x | test.cpp:68:22:68:22 | y | provenance | MaD:47 |
|
||||
| test.cpp:101:26:101:26 | x | test.cpp:74:22:74:22 | y | provenance | MaD:47 |
|
||||
| test.cpp:103:63:103:63 | x | test.cpp:82:22:82:22 | y | provenance | MaD:47 |
|
||||
| test.cpp:104:62:104:62 | x | test.cpp:88:22:88:22 | y | provenance | MaD:47 |
|
||||
| test.cpp:114:10:114:18 | call to ymlSource | test.cpp:114:10:114:18 | call to ymlSource | provenance | Src:MaD:25 |
|
||||
| test.cpp:114:10:114:18 | call to ymlSource | test.cpp:118:44:118:44 | *x | provenance | |
|
||||
| test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | provenance | |
|
||||
| test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | test.cpp:119:10:119:11 | y2 | provenance | Sink:MaD:1 |
|
||||
| test.cpp:118:44:118:44 | *x | test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | provenance | |
|
||||
| test.cpp:118:44:118:44 | *x | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | provenance | MaD:48 |
|
||||
| test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | test.cpp:125:5:125:20 | [summary] to write: ReturnValue in templateFunction | provenance | MaD:54 |
|
||||
| test.cpp:128:5:128:21 | [summary param] 1 in templateFunction2 | test.cpp:128:5:128:21 | [summary] to write: ReturnValue in templateFunction2 | provenance | MaD:53 |
|
||||
| test.cpp:133:10:133:18 | call to ymlSource | test.cpp:133:10:133:18 | call to ymlSource | provenance | Src:MaD:25 |
|
||||
| test.cpp:133:10:133:18 | call to ymlSource | test.cpp:134:45:134:45 | x | provenance | |
|
||||
| test.cpp:134:13:134:43 | call to templateFunction | test.cpp:134:13:134:43 | call to templateFunction | provenance | |
|
||||
| test.cpp:134:13:134:43 | call to templateFunction | test.cpp:135:10:135:10 | y | provenance | Sink:MaD:1 |
|
||||
| test.cpp:134:45:134:45 | x | test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | provenance | |
|
||||
| test.cpp:134:45:134:45 | x | test.cpp:134:13:134:43 | call to templateFunction | provenance | MaD:54 |
|
||||
| test.cpp:140:4:140:11 | [summary param] 1 in function | test.cpp:140:4:140:11 | [summary] to write: ReturnValue in function | provenance | MaD:55 |
|
||||
| test.cpp:140:4:140:11 | [summary param] 1 in function | test.cpp:140:4:140:11 | [summary] to write: ReturnValue in function | provenance | MaD:55 |
|
||||
| test.cpp:134:45:134:45 | x | test.cpp:134:13:134:43 | call to templateFunction | provenance | MaD:56 |
|
||||
| test.cpp:146:10:146:18 | call to ymlSource | test.cpp:146:10:146:18 | call to ymlSource | provenance | Src:MaD:25 |
|
||||
| test.cpp:146:10:146:18 | call to ymlSource | test.cpp:148:26:148:26 | x | provenance | |
|
||||
| test.cpp:148:10:148:27 | call to function | test.cpp:148:10:148:27 | call to function | provenance | |
|
||||
| test.cpp:148:10:148:27 | call to function | test.cpp:149:10:149:10 | z | provenance | Sink:MaD:1 |
|
||||
| test.cpp:148:26:148:26 | x | test.cpp:140:4:140:11 | [summary param] 1 in function | provenance | |
|
||||
| test.cpp:148:26:148:26 | x | test.cpp:148:10:148:27 | call to function | provenance | MaD:55 |
|
||||
| test.cpp:148:26:148:26 | x | test.cpp:148:10:148:27 | call to function | provenance | MaD:57 |
|
||||
| test.cpp:155:10:155:18 | call to ymlSource | test.cpp:155:10:155:18 | call to ymlSource | provenance | Src:MaD:25 |
|
||||
| test.cpp:155:10:155:18 | call to ymlSource | test.cpp:157:26:157:26 | x | provenance | |
|
||||
| test.cpp:157:13:157:20 | call to function | test.cpp:157:13:157:20 | call to function | provenance | |
|
||||
| test.cpp:157:13:157:20 | call to function | test.cpp:158:10:158:10 | z | provenance | Sink:MaD:1 |
|
||||
| test.cpp:157:26:157:26 | x | test.cpp:140:4:140:11 | [summary param] 1 in function | provenance | |
|
||||
| test.cpp:157:26:157:26 | x | test.cpp:157:13:157:20 | call to function | provenance | MaD:55 |
|
||||
| test.cpp:157:26:157:26 | x | test.cpp:157:13:157:20 | call to function | provenance | MaD:57 |
|
||||
| test.cpp:164:34:164:34 | x | test.cpp:165:69:165:69 | x | provenance | |
|
||||
| test.cpp:165:12:165:64 | call to templateFunction2 | test.cpp:164:7:164:7 | *templateFunction3 | provenance | |
|
||||
| test.cpp:165:12:165:64 | call to templateFunction2 | test.cpp:165:12:165:64 | call to templateFunction2 | provenance | |
|
||||
| test.cpp:165:69:165:69 | x | test.cpp:128:5:128:21 | [summary param] 1 in templateFunction2 | provenance | |
|
||||
| test.cpp:165:69:165:69 | x | test.cpp:165:12:165:64 | call to templateFunction2 | provenance | MaD:53 |
|
||||
| test.cpp:165:69:165:69 | x | test.cpp:165:12:165:64 | call to templateFunction2 | provenance | MaD:55 |
|
||||
| test.cpp:170:10:170:18 | call to ymlSource | test.cpp:170:10:170:18 | call to ymlSource | provenance | Src:MaD:25 |
|
||||
| test.cpp:170:10:170:18 | call to ymlSource | test.cpp:172:51:172:51 | x | provenance | |
|
||||
| test.cpp:172:13:172:44 | call to templateFunction3 | test.cpp:172:13:172:44 | call to templateFunction3 | provenance | |
|
||||
| test.cpp:172:13:172:44 | call to templateFunction3 | test.cpp:173:10:173:10 | y | provenance | Sink:MaD:1 |
|
||||
| test.cpp:172:51:172:51 | x | test.cpp:164:34:164:34 | x | provenance | |
|
||||
| test.cpp:172:51:172:51 | x | test.cpp:172:13:172:44 | call to templateFunction3 | provenance | MaD:53 |
|
||||
| windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | provenance | MaD:33 |
|
||||
| test.cpp:172:51:172:51 | x | test.cpp:172:13:172:44 | call to templateFunction3 | provenance | MaD:55 |
|
||||
| test.cpp:186:2:186:2 | *s [post update] [myField] | test.cpp:187:33:187:34 | *& ... [myField] | provenance | |
|
||||
| test.cpp:186:2:186:24 | ... = ... | test.cpp:186:2:186:2 | *s [post update] [myField] | provenance | |
|
||||
| test.cpp:186:14:186:22 | call to ymlSource | test.cpp:186:2:186:24 | ... = ... | provenance | Src:MaD:25 |
|
||||
| test.cpp:187:10:187:31 | call to read_field_from_struct | test.cpp:187:10:187:31 | call to read_field_from_struct | provenance | |
|
||||
| test.cpp:187:10:187:31 | call to read_field_from_struct | test.cpp:188:10:188:10 | x | provenance | Sink:MaD:1 |
|
||||
| test.cpp:187:33:187:34 | *& ... [myField] | test.cpp:187:10:187:31 | call to read_field_from_struct | provenance | MaD:50 |
|
||||
| test.cpp:199:2:199:2 | *s [post update] [myField] | test.cpp:200:35:200:36 | *& ... [myField] | provenance | |
|
||||
| test.cpp:199:2:199:24 | ... = ... | test.cpp:199:2:199:2 | *s [post update] [myField] | provenance | |
|
||||
| test.cpp:199:14:199:22 | call to ymlSource | test.cpp:199:2:199:24 | ... = ... | provenance | Src:MaD:25 |
|
||||
| test.cpp:200:10:200:33 | call to read_field_from_struct_2 | test.cpp:200:10:200:33 | call to read_field_from_struct_2 | provenance | |
|
||||
| test.cpp:200:10:200:33 | call to read_field_from_struct_2 | test.cpp:201:10:201:10 | x | provenance | Sink:MaD:1 |
|
||||
| test.cpp:200:35:200:36 | *& ... [myField] | test.cpp:200:10:200:33 | call to read_field_from_struct_2 | provenance | MaD:51 |
|
||||
| windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:22:15:22:29 | *call to GetCommandLineA | provenance | Src:MaD:3 |
|
||||
| windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:24:8:24:11 | * ... | provenance | |
|
||||
| windows.cpp:22:15:22:29 | *call to GetCommandLineA | windows.cpp:27:36:27:38 | *cmd | provenance | |
|
||||
| windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | provenance | |
|
||||
| windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | windows.cpp:30:8:30:15 | * ... | provenance | |
|
||||
| windows.cpp:27:36:27:38 | *cmd | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | provenance | |
|
||||
| windows.cpp:27:36:27:38 | *cmd | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA | provenance | MaD:33 |
|
||||
| windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | provenance | Src:MaD:4 |
|
||||
| windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | windows.cpp:36:10:36:13 | * ... | provenance | |
|
||||
| windows.cpp:39:36:39:38 | GetEnvironmentVariableA output argument | windows.cpp:41:10:41:13 | * ... | provenance | Src:MaD:5 |
|
||||
| windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [*hEvent] | windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[*hEvent] in ReadFileEx | provenance | |
|
||||
| windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [hEvent] | windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[hEvent] in ReadFileEx | provenance | |
|
||||
| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[*hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[*hEvent] in ReadFileEx | provenance | MaD:37 |
|
||||
| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[hEvent] in ReadFileEx | provenance | MaD:37 |
|
||||
| windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [*hEvent] | windows.cpp:147:16:147:27 | *lpOverlapped [*hEvent] | provenance | |
|
||||
| windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [hEvent] | windows.cpp:157:16:157:27 | *lpOverlapped [hEvent] | provenance | |
|
||||
| windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[*hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [*hEvent] | provenance | |
|
||||
| windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[hEvent] in ReadFileEx | windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [hEvent] | provenance | |
|
||||
| windows.cpp:147:16:147:27 | *lpOverlapped [*hEvent] | windows.cpp:149:42:149:53 | *lpOverlapped [*hEvent] | provenance | |
|
||||
| windows.cpp:149:18:149:62 | *hEvent | windows.cpp:149:18:149:62 | *hEvent | provenance | |
|
||||
| windows.cpp:149:18:149:62 | *hEvent | windows.cpp:151:8:151:14 | * ... | provenance | |
|
||||
@@ -251,11 +217,11 @@ edges
|
||||
| windows.cpp:189:21:189:26 | ReadFile output argument | windows.cpp:190:5:190:56 | *... = ... | provenance | Src:MaD:17 |
|
||||
| windows.cpp:190:5:190:14 | *overlapped [post update] [*hEvent] | windows.cpp:192:53:192:63 | *& ... [*hEvent] | provenance | |
|
||||
| windows.cpp:190:5:190:56 | *... = ... | windows.cpp:190:5:190:14 | *overlapped [post update] [*hEvent] | provenance | |
|
||||
| windows.cpp:192:53:192:63 | *& ... [*hEvent] | windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [*hEvent] | provenance | |
|
||||
| windows.cpp:192:53:192:63 | *& ... [*hEvent] | windows.cpp:147:16:147:27 | *lpOverlapped [*hEvent] | provenance | MaD:37 |
|
||||
| windows.cpp:198:21:198:26 | ReadFile output argument | windows.cpp:199:5:199:57 | ... = ... | provenance | Src:MaD:17 |
|
||||
| windows.cpp:199:5:199:14 | *overlapped [post update] [hEvent] | windows.cpp:201:53:201:63 | *& ... [hEvent] | provenance | |
|
||||
| windows.cpp:199:5:199:57 | ... = ... | windows.cpp:199:5:199:14 | *overlapped [post update] [hEvent] | provenance | |
|
||||
| windows.cpp:201:53:201:63 | *& ... [hEvent] | windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [hEvent] | provenance | |
|
||||
| windows.cpp:201:53:201:63 | *& ... [hEvent] | windows.cpp:157:16:157:27 | *lpOverlapped [hEvent] | provenance | MaD:37 |
|
||||
| windows.cpp:209:84:209:89 | NtReadFile output argument | windows.cpp:211:10:211:16 | * ... | provenance | Src:MaD:16 |
|
||||
| windows.cpp:286:23:286:35 | *call to MapViewOfFile | windows.cpp:286:23:286:35 | *call to MapViewOfFile | provenance | Src:MaD:12 |
|
||||
| windows.cpp:286:23:286:35 | *call to MapViewOfFile | windows.cpp:287:20:287:52 | *pMapView | provenance | |
|
||||
@@ -278,12 +244,6 @@ edges
|
||||
| windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | provenance | Src:MaD:15 |
|
||||
| windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | windows.cpp:333:20:333:52 | *pMapView | provenance | |
|
||||
| windows.cpp:333:20:333:52 | *pMapView | windows.cpp:335:10:335:16 | * ... | provenance | |
|
||||
| windows.cpp:349:8:349:19 | [summary param] *3 in CreateThread [x] | windows.cpp:349:8:349:19 | [summary] to write: Argument[2].Parameter[*0] in CreateThread [x] | provenance | MaD:36 |
|
||||
| windows.cpp:349:8:349:19 | [summary] to write: Argument[2].Parameter[*0] in CreateThread [x] | windows.cpp:403:26:403:36 | *lpParameter [x] | provenance | |
|
||||
| windows.cpp:357:8:357:25 | [summary param] *4 in CreateRemoteThread [x] | windows.cpp:357:8:357:25 | [summary] to write: Argument[3].Parameter[*0] in CreateRemoteThread [x] | provenance | MaD:34 |
|
||||
| windows.cpp:357:8:357:25 | [summary] to write: Argument[3].Parameter[*0] in CreateRemoteThread [x] | windows.cpp:410:26:410:36 | *lpParameter [x] | provenance | |
|
||||
| windows.cpp:387:8:387:27 | [summary param] *4 in CreateRemoteThreadEx [x] | windows.cpp:387:8:387:27 | [summary] to write: Argument[3].Parameter[*0] in CreateRemoteThreadEx [x] | provenance | MaD:35 |
|
||||
| windows.cpp:387:8:387:27 | [summary] to write: Argument[3].Parameter[*0] in CreateRemoteThreadEx [x] | windows.cpp:417:26:417:36 | *lpParameter [x] | provenance | |
|
||||
| windows.cpp:403:26:403:36 | *lpParameter [x] | windows.cpp:405:10:405:25 | *lpParameter [x] | provenance | |
|
||||
| windows.cpp:405:10:405:25 | *lpParameter [x] | windows.cpp:406:8:406:8 | *s [x] | provenance | |
|
||||
| windows.cpp:406:8:406:8 | *s [x] | windows.cpp:406:8:406:11 | x | provenance | |
|
||||
@@ -298,22 +258,9 @@ edges
|
||||
| windows.cpp:431:3:431:3 | *s [post update] [x] | windows.cpp:464:7:464:8 | *& ... [x] | provenance | |
|
||||
| windows.cpp:431:3:431:16 | ... = ... | windows.cpp:431:3:431:3 | *s [post update] [x] | provenance | |
|
||||
| windows.cpp:431:9:431:14 | call to source | windows.cpp:431:3:431:16 | ... = ... | provenance | |
|
||||
| windows.cpp:439:7:439:8 | *& ... [x] | windows.cpp:349:8:349:19 | [summary param] *3 in CreateThread [x] | provenance | |
|
||||
| windows.cpp:451:7:451:8 | *& ... [x] | windows.cpp:357:8:357:25 | [summary param] *4 in CreateRemoteThread [x] | provenance | |
|
||||
| windows.cpp:464:7:464:8 | *& ... [x] | windows.cpp:387:8:387:27 | [summary param] *4 in CreateRemoteThreadEx [x] | provenance | |
|
||||
| windows.cpp:473:17:473:37 | [summary param] *1 in RtlCopyVolatileMemory | windows.cpp:473:17:473:37 | [summary param] *0 in RtlCopyVolatileMemory [Return] | provenance | MaD:42 |
|
||||
| windows.cpp:479:17:479:35 | [summary param] *1 in RtlCopyDeviceMemory | windows.cpp:479:17:479:35 | [summary param] *0 in RtlCopyDeviceMemory [Return] | provenance | MaD:38 |
|
||||
| windows.cpp:485:6:485:18 | [summary param] *1 in RtlCopyMemory | windows.cpp:485:6:485:18 | [summary param] *0 in RtlCopyMemory [Return] | provenance | MaD:39 |
|
||||
| windows.cpp:493:6:493:29 | [summary param] *1 in RtlCopyMemoryNonTemporal | windows.cpp:493:6:493:29 | [summary param] *0 in RtlCopyMemoryNonTemporal [Return] | provenance | MaD:40 |
|
||||
| windows.cpp:510:6:510:25 | [summary param] *1 in RtlCopyUnicodeString [*Buffer] | windows.cpp:510:6:510:25 | [summary] read: Argument[*1].Field[*Buffer] in RtlCopyUnicodeString | provenance | |
|
||||
| windows.cpp:510:6:510:25 | [summary] read: Argument[*1].Field[*Buffer] in RtlCopyUnicodeString | windows.cpp:510:6:510:25 | [summary] to write: Argument[*0].Field[*Buffer] in RtlCopyUnicodeString | provenance | MaD:41 |
|
||||
| windows.cpp:510:6:510:25 | [summary] to write: Argument[*0] in RtlCopyUnicodeString [*Buffer] | windows.cpp:510:6:510:25 | [summary param] *0 in RtlCopyUnicodeString [Return] [*Buffer] | provenance | |
|
||||
| windows.cpp:510:6:510:25 | [summary] to write: Argument[*0].Field[*Buffer] in RtlCopyUnicodeString | windows.cpp:510:6:510:25 | [summary] to write: Argument[*0] in RtlCopyUnicodeString [*Buffer] | provenance | |
|
||||
| windows.cpp:515:6:515:18 | [summary param] *1 in RtlMoveMemory | windows.cpp:515:6:515:18 | [summary param] *0 in RtlMoveMemory [Return] | provenance | MaD:44 |
|
||||
| windows.cpp:521:17:521:37 | [summary param] *1 in RtlMoveVolatileMemory | windows.cpp:521:17:521:37 | [summary param] *0 in RtlMoveVolatileMemory [Return] | provenance | MaD:45 |
|
||||
| windows.cpp:527:6:527:25 | [summary param] *1 in RtlInitUnicodeString | windows.cpp:527:6:527:25 | [summary] to write: Argument[*0].Field[*Buffer] in RtlInitUnicodeString | provenance | MaD:43 |
|
||||
| windows.cpp:527:6:527:25 | [summary] to write: Argument[*0] in RtlInitUnicodeString [*Buffer] | windows.cpp:527:6:527:25 | [summary param] *0 in RtlInitUnicodeString [Return] [*Buffer] | provenance | |
|
||||
| windows.cpp:527:6:527:25 | [summary] to write: Argument[*0].Field[*Buffer] in RtlInitUnicodeString | windows.cpp:527:6:527:25 | [summary] to write: Argument[*0] in RtlInitUnicodeString [*Buffer] | provenance | |
|
||||
| windows.cpp:439:7:439:8 | *& ... [x] | windows.cpp:403:26:403:36 | *lpParameter [x] | provenance | MaD:36 |
|
||||
| windows.cpp:451:7:451:8 | *& ... [x] | windows.cpp:410:26:410:36 | *lpParameter [x] | provenance | MaD:34 |
|
||||
| windows.cpp:464:7:464:8 | *& ... [x] | windows.cpp:417:26:417:36 | *lpParameter [x] | provenance | MaD:35 |
|
||||
| windows.cpp:533:11:533:16 | call to source | windows.cpp:533:11:533:16 | call to source | provenance | |
|
||||
| windows.cpp:533:11:533:16 | call to source | windows.cpp:537:40:537:41 | *& ... | provenance | |
|
||||
| windows.cpp:533:11:533:16 | call to source | windows.cpp:542:38:542:39 | *& ... | provenance | |
|
||||
@@ -322,37 +269,29 @@ edges
|
||||
| windows.cpp:533:11:533:16 | call to source | windows.cpp:568:32:568:33 | *& ... | provenance | |
|
||||
| windows.cpp:533:11:533:16 | call to source | windows.cpp:573:40:573:41 | *& ... | provenance | |
|
||||
| windows.cpp:537:27:537:37 | RtlCopyVolatileMemory output argument | windows.cpp:538:10:538:23 | access to array | provenance | |
|
||||
| windows.cpp:537:40:537:41 | *& ... | windows.cpp:473:17:473:37 | [summary param] *1 in RtlCopyVolatileMemory | provenance | |
|
||||
| windows.cpp:537:40:537:41 | *& ... | windows.cpp:537:27:537:37 | RtlCopyVolatileMemory output argument | provenance | MaD:42 |
|
||||
| windows.cpp:542:25:542:35 | RtlCopyDeviceMemory output argument | windows.cpp:543:10:543:23 | access to array | provenance | |
|
||||
| windows.cpp:542:38:542:39 | *& ... | windows.cpp:479:17:479:35 | [summary param] *1 in RtlCopyDeviceMemory | provenance | |
|
||||
| windows.cpp:542:38:542:39 | *& ... | windows.cpp:542:25:542:35 | RtlCopyDeviceMemory output argument | provenance | MaD:38 |
|
||||
| windows.cpp:547:19:547:29 | RtlCopyMemory output argument | windows.cpp:548:10:548:23 | access to array | provenance | |
|
||||
| windows.cpp:547:32:547:33 | *& ... | windows.cpp:485:6:485:18 | [summary param] *1 in RtlCopyMemory | provenance | |
|
||||
| windows.cpp:547:32:547:33 | *& ... | windows.cpp:547:19:547:29 | RtlCopyMemory output argument | provenance | MaD:39 |
|
||||
| windows.cpp:552:30:552:40 | RtlCopyMemoryNonTemporal output argument | windows.cpp:553:10:553:23 | access to array | provenance | |
|
||||
| windows.cpp:552:43:552:44 | *& ... | windows.cpp:493:6:493:29 | [summary param] *1 in RtlCopyMemoryNonTemporal | provenance | |
|
||||
| windows.cpp:552:43:552:44 | *& ... | windows.cpp:552:30:552:40 | RtlCopyMemoryNonTemporal output argument | provenance | MaD:40 |
|
||||
| windows.cpp:559:5:559:24 | ... = ... | windows.cpp:561:39:561:44 | *buffer | provenance | |
|
||||
| windows.cpp:559:17:559:24 | call to source | windows.cpp:559:5:559:24 | ... = ... | provenance | |
|
||||
| windows.cpp:561:26:561:36 | RtlInitUnicodeString output argument [*Buffer] | windows.cpp:562:10:562:19 | *src_string [*Buffer] | provenance | |
|
||||
| windows.cpp:561:26:561:36 | RtlInitUnicodeString output argument [*Buffer] | windows.cpp:563:40:563:50 | *& ... [*Buffer] | provenance | |
|
||||
| windows.cpp:561:39:561:44 | *buffer | windows.cpp:527:6:527:25 | [summary param] *1 in RtlInitUnicodeString | provenance | |
|
||||
| windows.cpp:561:39:561:44 | *buffer | windows.cpp:561:26:561:36 | RtlInitUnicodeString output argument [*Buffer] | provenance | MaD:43 |
|
||||
| windows.cpp:562:10:562:19 | *src_string [*Buffer] | windows.cpp:562:10:562:29 | access to array | provenance | |
|
||||
| windows.cpp:562:10:562:19 | *src_string [*Buffer] | windows.cpp:562:21:562:26 | *Buffer | provenance | |
|
||||
| windows.cpp:562:21:562:26 | *Buffer | windows.cpp:562:10:562:29 | access to array | provenance | |
|
||||
| windows.cpp:563:26:563:37 | RtlCopyUnicodeString output argument [*Buffer] | windows.cpp:564:10:564:20 | *dest_string [*Buffer] | provenance | |
|
||||
| windows.cpp:563:40:563:50 | *& ... [*Buffer] | windows.cpp:510:6:510:25 | [summary param] *1 in RtlCopyUnicodeString [*Buffer] | provenance | |
|
||||
| windows.cpp:563:40:563:50 | *& ... [*Buffer] | windows.cpp:563:26:563:37 | RtlCopyUnicodeString output argument [*Buffer] | provenance | MaD:41 |
|
||||
| windows.cpp:564:10:564:20 | *dest_string [*Buffer] | windows.cpp:564:10:564:30 | access to array | provenance | |
|
||||
| windows.cpp:564:10:564:20 | *dest_string [*Buffer] | windows.cpp:564:22:564:27 | *Buffer | provenance | |
|
||||
| windows.cpp:564:22:564:27 | *Buffer | windows.cpp:564:10:564:30 | access to array | provenance | |
|
||||
| windows.cpp:568:19:568:29 | RtlMoveMemory output argument | windows.cpp:569:10:569:23 | access to array | provenance | |
|
||||
| windows.cpp:568:32:568:33 | *& ... | windows.cpp:515:6:515:18 | [summary param] *1 in RtlMoveMemory | provenance | |
|
||||
| windows.cpp:568:32:568:33 | *& ... | windows.cpp:568:19:568:29 | RtlMoveMemory output argument | provenance | MaD:44 |
|
||||
| windows.cpp:573:27:573:37 | RtlMoveVolatileMemory output argument | windows.cpp:574:10:574:23 | access to array | provenance | |
|
||||
| windows.cpp:573:40:573:41 | *& ... | windows.cpp:521:17:521:37 | [summary param] *1 in RtlMoveVolatileMemory | provenance | |
|
||||
| windows.cpp:573:40:573:41 | *& ... | windows.cpp:573:27:573:37 | RtlMoveVolatileMemory output argument | provenance | MaD:45 |
|
||||
| windows.cpp:645:45:645:50 | WinHttpReadData output argument | windows.cpp:647:10:647:16 | * ... | provenance | Src:MaD:23 |
|
||||
| windows.cpp:652:48:652:53 | WinHttpReadDataEx output argument | windows.cpp:654:10:654:16 | * ... | provenance | Src:MaD:24 |
|
||||
@@ -360,10 +299,8 @@ edges
|
||||
| windows.cpp:669:70:669:79 | WinHttpQueryHeadersEx output argument | windows.cpp:673:10:673:29 | * ... | provenance | Src:MaD:21 |
|
||||
| windows.cpp:669:82:669:87 | WinHttpQueryHeadersEx output argument | windows.cpp:671:10:671:16 | * ... | provenance | Src:MaD:22 |
|
||||
| windows.cpp:669:105:669:112 | WinHttpQueryHeadersEx output argument | windows.cpp:675:10:675:27 | * ... | provenance | Src:MaD:20 |
|
||||
| windows.cpp:714:6:714:20 | [summary param] *0 in WinHttpCrackUrl | windows.cpp:714:6:714:20 | [summary param] *3 in WinHttpCrackUrl [Return] | provenance | MaD:46 |
|
||||
| windows.cpp:728:5:728:28 | ... = ... | windows.cpp:729:35:729:35 | *x | provenance | |
|
||||
| windows.cpp:728:12:728:28 | call to source | windows.cpp:728:5:728:28 | ... = ... | provenance | |
|
||||
| windows.cpp:729:35:729:35 | *x | windows.cpp:714:6:714:20 | [summary param] *0 in WinHttpCrackUrl | provenance | |
|
||||
| windows.cpp:729:35:729:35 | *x | windows.cpp:729:44:729:57 | WinHttpCrackUrl output argument | provenance | MaD:46 |
|
||||
| windows.cpp:729:44:729:57 | WinHttpCrackUrl output argument | windows.cpp:731:10:731:36 | * ... | provenance | |
|
||||
| windows.cpp:729:44:729:57 | WinHttpCrackUrl output argument | windows.cpp:733:10:733:35 | * ... | provenance | |
|
||||
@@ -386,8 +323,6 @@ edges
|
||||
| windows.cpp:936:70:936:78 | HttpReceiveClientCertificate output argument | windows.cpp:941:10:941:31 | * ... | provenance | Src:MaD:6 |
|
||||
| windows.cpp:937:15:937:48 | *& ... | windows.cpp:939:10:939:11 | * ... | provenance | |
|
||||
nodes
|
||||
| asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | semmle.label | [summary param] *0 in buffer |
|
||||
| asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | semmle.label | [summary] to write: ReturnValue in buffer |
|
||||
| asio_streams.cpp:87:34:87:44 | read_until output argument | semmle.label | read_until output argument |
|
||||
| asio_streams.cpp:91:7:91:17 | recv_buffer | semmle.label | recv_buffer |
|
||||
| asio_streams.cpp:93:29:93:39 | *recv_buffer | semmle.label | *recv_buffer |
|
||||
@@ -398,15 +333,6 @@ nodes
|
||||
| asio_streams.cpp:100:64:100:71 | *send_str | semmle.label | *send_str |
|
||||
| asio_streams.cpp:101:7:101:17 | send_buffer | semmle.label | send_buffer |
|
||||
| asio_streams.cpp:103:29:103:39 | *send_buffer | semmle.label | *send_buffer |
|
||||
| azure.cpp:62:10:62:14 | [summary param] this in Value | semmle.label | [summary param] this in Value |
|
||||
| azure.cpp:62:10:62:14 | [summary] to write: ReturnValue[*] in Value | semmle.label | [summary] to write: ReturnValue[*] in Value |
|
||||
| azure.cpp:113:16:113:19 | [summary param] *0 in Read [Return] | semmle.label | [summary param] *0 in Read [Return] |
|
||||
| azure.cpp:113:16:113:19 | [summary param] this in Read | semmle.label | [summary param] this in Read |
|
||||
| azure.cpp:114:16:114:26 | [summary param] *0 in ReadToCount [Return] | semmle.label | [summary param] *0 in ReadToCount [Return] |
|
||||
| azure.cpp:114:16:114:26 | [summary param] this in ReadToCount | semmle.label | [summary param] this in ReadToCount |
|
||||
| azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | semmle.label | [summary param] this in ReadToEnd |
|
||||
| azure.cpp:115:30:115:38 | [summary] to write: ReturnValue in ReadToEnd [element] | semmle.label | [summary] to write: ReturnValue in ReadToEnd [element] |
|
||||
| azure.cpp:115:30:115:38 | [summary] to write: ReturnValue.Element in ReadToEnd | semmle.label | [summary] to write: ReturnValue.Element in ReadToEnd |
|
||||
| azure.cpp:253:48:253:60 | *call to GetBodyStream | semmle.label | *call to GetBodyStream |
|
||||
| azure.cpp:253:48:253:60 | *call to GetBodyStream | semmle.label | *call to GetBodyStream |
|
||||
| azure.cpp:257:5:257:8 | *resp | semmle.label | *resp |
|
||||
@@ -451,12 +377,6 @@ nodes
|
||||
| azure.cpp:295:10:295:20 | contentType | semmle.label | contentType |
|
||||
| azure.cpp:295:10:295:20 | contentType | semmle.label | contentType |
|
||||
| azure.cpp:295:10:295:20 | contentType | semmle.label | contentType |
|
||||
| test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | semmle.label | [summary param] 0 in ymlStepManual |
|
||||
| test.cpp:4:5:4:17 | [summary] to write: ReturnValue in ymlStepManual | semmle.label | [summary] to write: ReturnValue in ymlStepManual |
|
||||
| test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | semmle.label | [summary param] 0 in ymlStepGenerated |
|
||||
| test.cpp:5:5:5:20 | [summary] to write: ReturnValue in ymlStepGenerated | semmle.label | [summary] to write: ReturnValue in ymlStepGenerated |
|
||||
| test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | semmle.label | [summary param] 0 in ymlStepManual_with_body |
|
||||
| test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | semmle.label | [summary] to write: ReturnValue in ymlStepManual_with_body |
|
||||
| test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | semmle.label | *ymlStepGenerated_with_body |
|
||||
| test.cpp:7:47:7:52 | value2 | semmle.label | value2 |
|
||||
| test.cpp:7:64:7:69 | value2 | semmle.label | value2 |
|
||||
@@ -483,20 +403,10 @@ nodes
|
||||
| test.cpp:47:12:47:19 | *arg [x] | semmle.label | *arg [x] |
|
||||
| test.cpp:48:13:48:13 | *s [x] | semmle.label | *s [x] |
|
||||
| test.cpp:48:16:48:16 | x | semmle.label | x |
|
||||
| test.cpp:52:5:52:18 | [summary param] *3 in pthread_create [x] | semmle.label | [summary param] *3 in pthread_create [x] |
|
||||
| test.cpp:52:5:52:18 | [summary] to write: Argument[2].Parameter[*0] in pthread_create [x] | semmle.label | [summary] to write: Argument[2].Parameter[*0] in pthread_create [x] |
|
||||
| test.cpp:56:2:56:2 | *s [post update] [x] | semmle.label | *s [post update] [x] |
|
||||
| test.cpp:56:2:56:18 | ... = ... | semmle.label | ... = ... |
|
||||
| test.cpp:56:8:56:16 | call to ymlSource | semmle.label | call to ymlSource |
|
||||
| test.cpp:59:55:59:64 | *& ... [x] | semmle.label | *& ... [x] |
|
||||
| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | semmle.label | [summary param] 1 in callWithArgument |
|
||||
| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | semmle.label | [summary param] 1 in callWithArgument |
|
||||
| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | semmle.label | [summary param] 1 in callWithArgument |
|
||||
| test.cpp:63:6:63:21 | [summary param] 1 in callWithArgument | semmle.label | [summary param] 1 in callWithArgument |
|
||||
| test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | semmle.label | [summary] to write: Argument[0].Parameter[0] in callWithArgument |
|
||||
| test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | semmle.label | [summary] to write: Argument[0].Parameter[0] in callWithArgument |
|
||||
| test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | semmle.label | [summary] to write: Argument[0].Parameter[0] in callWithArgument |
|
||||
| test.cpp:63:6:63:21 | [summary] to write: Argument[0].Parameter[0] in callWithArgument | semmle.label | [summary] to write: Argument[0].Parameter[0] in callWithArgument |
|
||||
| test.cpp:68:22:68:22 | y | semmle.label | y |
|
||||
| test.cpp:69:11:69:11 | y | semmle.label | y |
|
||||
| test.cpp:74:22:74:22 | y | semmle.label | y |
|
||||
@@ -511,28 +421,18 @@ nodes
|
||||
| test.cpp:101:26:101:26 | x | semmle.label | x |
|
||||
| test.cpp:103:63:103:63 | x | semmle.label | x |
|
||||
| test.cpp:104:62:104:62 | x | semmle.label | x |
|
||||
| test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | semmle.label | [summary param] *0 in callWithNonTypeTemplate |
|
||||
| test.cpp:111:3:111:25 | [summary] to write: ReturnValue in callWithNonTypeTemplate | semmle.label | [summary] to write: ReturnValue in callWithNonTypeTemplate |
|
||||
| test.cpp:114:10:114:18 | call to ymlSource | semmle.label | call to ymlSource |
|
||||
| test.cpp:114:10:114:18 | call to ymlSource | semmle.label | call to ymlSource |
|
||||
| test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | semmle.label | call to callWithNonTypeTemplate |
|
||||
| test.cpp:118:11:118:42 | call to callWithNonTypeTemplate | semmle.label | call to callWithNonTypeTemplate |
|
||||
| test.cpp:118:44:118:44 | *x | semmle.label | *x |
|
||||
| test.cpp:119:10:119:11 | y2 | semmle.label | y2 |
|
||||
| test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | semmle.label | [summary param] 0 in templateFunction |
|
||||
| test.cpp:125:5:125:20 | [summary] to write: ReturnValue in templateFunction | semmle.label | [summary] to write: ReturnValue in templateFunction |
|
||||
| test.cpp:128:5:128:21 | [summary param] 1 in templateFunction2 | semmle.label | [summary param] 1 in templateFunction2 |
|
||||
| test.cpp:128:5:128:21 | [summary] to write: ReturnValue in templateFunction2 | semmle.label | [summary] to write: ReturnValue in templateFunction2 |
|
||||
| test.cpp:133:10:133:18 | call to ymlSource | semmle.label | call to ymlSource |
|
||||
| test.cpp:133:10:133:18 | call to ymlSource | semmle.label | call to ymlSource |
|
||||
| test.cpp:134:13:134:43 | call to templateFunction | semmle.label | call to templateFunction |
|
||||
| test.cpp:134:13:134:43 | call to templateFunction | semmle.label | call to templateFunction |
|
||||
| test.cpp:134:45:134:45 | x | semmle.label | x |
|
||||
| test.cpp:135:10:135:10 | y | semmle.label | y |
|
||||
| test.cpp:140:4:140:11 | [summary param] 1 in function | semmle.label | [summary param] 1 in function |
|
||||
| test.cpp:140:4:140:11 | [summary param] 1 in function | semmle.label | [summary param] 1 in function |
|
||||
| test.cpp:140:4:140:11 | [summary] to write: ReturnValue in function | semmle.label | [summary] to write: ReturnValue in function |
|
||||
| test.cpp:140:4:140:11 | [summary] to write: ReturnValue in function | semmle.label | [summary] to write: ReturnValue in function |
|
||||
| test.cpp:146:10:146:18 | call to ymlSource | semmle.label | call to ymlSource |
|
||||
| test.cpp:146:10:146:18 | call to ymlSource | semmle.label | call to ymlSource |
|
||||
| test.cpp:148:10:148:27 | call to function | semmle.label | call to function |
|
||||
@@ -556,8 +456,20 @@ nodes
|
||||
| test.cpp:172:13:172:44 | call to templateFunction3 | semmle.label | call to templateFunction3 |
|
||||
| test.cpp:172:51:172:51 | x | semmle.label | x |
|
||||
| test.cpp:173:10:173:10 | y | semmle.label | y |
|
||||
| windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | semmle.label | [summary param] *0 in CommandLineToArgvA |
|
||||
| windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | semmle.label | [summary] to write: ReturnValue[**] in CommandLineToArgvA |
|
||||
| test.cpp:186:2:186:2 | *s [post update] [myField] | semmle.label | *s [post update] [myField] |
|
||||
| test.cpp:186:2:186:24 | ... = ... | semmle.label | ... = ... |
|
||||
| test.cpp:186:14:186:22 | call to ymlSource | semmle.label | call to ymlSource |
|
||||
| test.cpp:187:10:187:31 | call to read_field_from_struct | semmle.label | call to read_field_from_struct |
|
||||
| test.cpp:187:10:187:31 | call to read_field_from_struct | semmle.label | call to read_field_from_struct |
|
||||
| test.cpp:187:33:187:34 | *& ... [myField] | semmle.label | *& ... [myField] |
|
||||
| test.cpp:188:10:188:10 | x | semmle.label | x |
|
||||
| test.cpp:199:2:199:2 | *s [post update] [myField] | semmle.label | *s [post update] [myField] |
|
||||
| test.cpp:199:2:199:24 | ... = ... | semmle.label | ... = ... |
|
||||
| test.cpp:199:14:199:22 | call to ymlSource | semmle.label | call to ymlSource |
|
||||
| test.cpp:200:10:200:33 | call to read_field_from_struct_2 | semmle.label | call to read_field_from_struct_2 |
|
||||
| test.cpp:200:10:200:33 | call to read_field_from_struct_2 | semmle.label | call to read_field_from_struct_2 |
|
||||
| test.cpp:200:35:200:36 | *& ... [myField] | semmle.label | *& ... [myField] |
|
||||
| test.cpp:201:10:201:10 | x | semmle.label | x |
|
||||
| windows.cpp:22:15:22:29 | *call to GetCommandLineA | semmle.label | *call to GetCommandLineA |
|
||||
| windows.cpp:22:15:22:29 | *call to GetCommandLineA | semmle.label | *call to GetCommandLineA |
|
||||
| windows.cpp:24:8:24:11 | * ... | semmle.label | * ... |
|
||||
@@ -570,14 +482,6 @@ nodes
|
||||
| windows.cpp:36:10:36:13 | * ... | semmle.label | * ... |
|
||||
| windows.cpp:39:36:39:38 | GetEnvironmentVariableA output argument | semmle.label | GetEnvironmentVariableA output argument |
|
||||
| windows.cpp:41:10:41:13 | * ... | semmle.label | * ... |
|
||||
| windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [*hEvent] | semmle.label | [summary param] *3 in ReadFileEx [*hEvent] |
|
||||
| windows.cpp:90:6:90:15 | [summary param] *3 in ReadFileEx [hEvent] | semmle.label | [summary param] *3 in ReadFileEx [hEvent] |
|
||||
| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[*hEvent] in ReadFileEx | semmle.label | [summary] read: Argument[*3].Field[*hEvent] in ReadFileEx |
|
||||
| windows.cpp:90:6:90:15 | [summary] read: Argument[*3].Field[hEvent] in ReadFileEx | semmle.label | [summary] read: Argument[*3].Field[hEvent] in ReadFileEx |
|
||||
| windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [*hEvent] | semmle.label | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [*hEvent] |
|
||||
| windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [hEvent] | semmle.label | [summary] to write: Argument[4].Parameter[*2] in ReadFileEx [hEvent] |
|
||||
| windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[*hEvent] in ReadFileEx | semmle.label | [summary] to write: Argument[4].Parameter[*2].Field[*hEvent] in ReadFileEx |
|
||||
| windows.cpp:90:6:90:15 | [summary] to write: Argument[4].Parameter[*2].Field[hEvent] in ReadFileEx | semmle.label | [summary] to write: Argument[4].Parameter[*2].Field[hEvent] in ReadFileEx |
|
||||
| windows.cpp:147:16:147:27 | *lpOverlapped [*hEvent] | semmle.label | *lpOverlapped [*hEvent] |
|
||||
| windows.cpp:149:18:149:62 | *hEvent | semmle.label | *hEvent |
|
||||
| windows.cpp:149:18:149:62 | *hEvent | semmle.label | *hEvent |
|
||||
@@ -631,12 +535,6 @@ nodes
|
||||
| windows.cpp:332:23:332:40 | *call to MapViewOfFileNuma2 | semmle.label | *call to MapViewOfFileNuma2 |
|
||||
| windows.cpp:333:20:333:52 | *pMapView | semmle.label | *pMapView |
|
||||
| windows.cpp:335:10:335:16 | * ... | semmle.label | * ... |
|
||||
| windows.cpp:349:8:349:19 | [summary param] *3 in CreateThread [x] | semmle.label | [summary param] *3 in CreateThread [x] |
|
||||
| windows.cpp:349:8:349:19 | [summary] to write: Argument[2].Parameter[*0] in CreateThread [x] | semmle.label | [summary] to write: Argument[2].Parameter[*0] in CreateThread [x] |
|
||||
| windows.cpp:357:8:357:25 | [summary param] *4 in CreateRemoteThread [x] | semmle.label | [summary param] *4 in CreateRemoteThread [x] |
|
||||
| windows.cpp:357:8:357:25 | [summary] to write: Argument[3].Parameter[*0] in CreateRemoteThread [x] | semmle.label | [summary] to write: Argument[3].Parameter[*0] in CreateRemoteThread [x] |
|
||||
| windows.cpp:387:8:387:27 | [summary param] *4 in CreateRemoteThreadEx [x] | semmle.label | [summary param] *4 in CreateRemoteThreadEx [x] |
|
||||
| windows.cpp:387:8:387:27 | [summary] to write: Argument[3].Parameter[*0] in CreateRemoteThreadEx [x] | semmle.label | [summary] to write: Argument[3].Parameter[*0] in CreateRemoteThreadEx [x] |
|
||||
| windows.cpp:403:26:403:36 | *lpParameter [x] | semmle.label | *lpParameter [x] |
|
||||
| windows.cpp:405:10:405:25 | *lpParameter [x] | semmle.label | *lpParameter [x] |
|
||||
| windows.cpp:406:8:406:8 | *s [x] | semmle.label | *s [x] |
|
||||
@@ -655,27 +553,6 @@ nodes
|
||||
| windows.cpp:439:7:439:8 | *& ... [x] | semmle.label | *& ... [x] |
|
||||
| windows.cpp:451:7:451:8 | *& ... [x] | semmle.label | *& ... [x] |
|
||||
| windows.cpp:464:7:464:8 | *& ... [x] | semmle.label | *& ... [x] |
|
||||
| windows.cpp:473:17:473:37 | [summary param] *0 in RtlCopyVolatileMemory [Return] | semmle.label | [summary param] *0 in RtlCopyVolatileMemory [Return] |
|
||||
| windows.cpp:473:17:473:37 | [summary param] *1 in RtlCopyVolatileMemory | semmle.label | [summary param] *1 in RtlCopyVolatileMemory |
|
||||
| windows.cpp:479:17:479:35 | [summary param] *0 in RtlCopyDeviceMemory [Return] | semmle.label | [summary param] *0 in RtlCopyDeviceMemory [Return] |
|
||||
| windows.cpp:479:17:479:35 | [summary param] *1 in RtlCopyDeviceMemory | semmle.label | [summary param] *1 in RtlCopyDeviceMemory |
|
||||
| windows.cpp:485:6:485:18 | [summary param] *0 in RtlCopyMemory [Return] | semmle.label | [summary param] *0 in RtlCopyMemory [Return] |
|
||||
| windows.cpp:485:6:485:18 | [summary param] *1 in RtlCopyMemory | semmle.label | [summary param] *1 in RtlCopyMemory |
|
||||
| windows.cpp:493:6:493:29 | [summary param] *0 in RtlCopyMemoryNonTemporal [Return] | semmle.label | [summary param] *0 in RtlCopyMemoryNonTemporal [Return] |
|
||||
| windows.cpp:493:6:493:29 | [summary param] *1 in RtlCopyMemoryNonTemporal | semmle.label | [summary param] *1 in RtlCopyMemoryNonTemporal |
|
||||
| windows.cpp:510:6:510:25 | [summary param] *0 in RtlCopyUnicodeString [Return] [*Buffer] | semmle.label | [summary param] *0 in RtlCopyUnicodeString [Return] [*Buffer] |
|
||||
| windows.cpp:510:6:510:25 | [summary param] *1 in RtlCopyUnicodeString [*Buffer] | semmle.label | [summary param] *1 in RtlCopyUnicodeString [*Buffer] |
|
||||
| windows.cpp:510:6:510:25 | [summary] read: Argument[*1].Field[*Buffer] in RtlCopyUnicodeString | semmle.label | [summary] read: Argument[*1].Field[*Buffer] in RtlCopyUnicodeString |
|
||||
| windows.cpp:510:6:510:25 | [summary] to write: Argument[*0] in RtlCopyUnicodeString [*Buffer] | semmle.label | [summary] to write: Argument[*0] in RtlCopyUnicodeString [*Buffer] |
|
||||
| windows.cpp:510:6:510:25 | [summary] to write: Argument[*0].Field[*Buffer] in RtlCopyUnicodeString | semmle.label | [summary] to write: Argument[*0].Field[*Buffer] in RtlCopyUnicodeString |
|
||||
| windows.cpp:515:6:515:18 | [summary param] *0 in RtlMoveMemory [Return] | semmle.label | [summary param] *0 in RtlMoveMemory [Return] |
|
||||
| windows.cpp:515:6:515:18 | [summary param] *1 in RtlMoveMemory | semmle.label | [summary param] *1 in RtlMoveMemory |
|
||||
| windows.cpp:521:17:521:37 | [summary param] *0 in RtlMoveVolatileMemory [Return] | semmle.label | [summary param] *0 in RtlMoveVolatileMemory [Return] |
|
||||
| windows.cpp:521:17:521:37 | [summary param] *1 in RtlMoveVolatileMemory | semmle.label | [summary param] *1 in RtlMoveVolatileMemory |
|
||||
| windows.cpp:527:6:527:25 | [summary param] *0 in RtlInitUnicodeString [Return] [*Buffer] | semmle.label | [summary param] *0 in RtlInitUnicodeString [Return] [*Buffer] |
|
||||
| windows.cpp:527:6:527:25 | [summary param] *1 in RtlInitUnicodeString | semmle.label | [summary param] *1 in RtlInitUnicodeString |
|
||||
| windows.cpp:527:6:527:25 | [summary] to write: Argument[*0] in RtlInitUnicodeString [*Buffer] | semmle.label | [summary] to write: Argument[*0] in RtlInitUnicodeString [*Buffer] |
|
||||
| windows.cpp:527:6:527:25 | [summary] to write: Argument[*0].Field[*Buffer] in RtlInitUnicodeString | semmle.label | [summary] to write: Argument[*0].Field[*Buffer] in RtlInitUnicodeString |
|
||||
| windows.cpp:533:11:533:16 | call to source | semmle.label | call to source |
|
||||
| windows.cpp:533:11:533:16 | call to source | semmle.label | call to source |
|
||||
| windows.cpp:537:27:537:37 | RtlCopyVolatileMemory output argument | semmle.label | RtlCopyVolatileMemory output argument |
|
||||
@@ -720,8 +597,6 @@ nodes
|
||||
| windows.cpp:671:10:671:16 | * ... | semmle.label | * ... |
|
||||
| windows.cpp:673:10:673:29 | * ... | semmle.label | * ... |
|
||||
| windows.cpp:675:10:675:27 | * ... | semmle.label | * ... |
|
||||
| windows.cpp:714:6:714:20 | [summary param] *0 in WinHttpCrackUrl | semmle.label | [summary param] *0 in WinHttpCrackUrl |
|
||||
| windows.cpp:714:6:714:20 | [summary param] *3 in WinHttpCrackUrl [Return] | semmle.label | [summary param] *3 in WinHttpCrackUrl [Return] |
|
||||
| windows.cpp:728:5:728:28 | ... = ... | semmle.label | ... = ... |
|
||||
| windows.cpp:728:12:728:28 | call to source | semmle.label | call to source |
|
||||
| windows.cpp:729:35:729:35 | *x | semmle.label | *x |
|
||||
@@ -750,30 +625,6 @@ nodes
|
||||
| windows.cpp:939:10:939:11 | * ... | semmle.label | * ... |
|
||||
| windows.cpp:941:10:941:31 | * ... | semmle.label | * ... |
|
||||
subpaths
|
||||
| asio_streams.cpp:100:64:100:71 | *send_str | asio_streams.cpp:56:18:56:23 | [summary param] *0 in buffer | asio_streams.cpp:56:18:56:23 | [summary] to write: ReturnValue in buffer | asio_streams.cpp:100:44:100:62 | call to buffer |
|
||||
| azure.cpp:257:5:257:8 | *resp | azure.cpp:113:16:113:19 | [summary param] this in Read | azure.cpp:113:16:113:19 | [summary param] *0 in Read [Return] | azure.cpp:257:16:257:21 | Read output argument |
|
||||
| azure.cpp:262:5:262:8 | *resp | azure.cpp:114:16:114:26 | [summary param] this in ReadToCount | azure.cpp:114:16:114:26 | [summary param] *0 in ReadToCount [Return] | azure.cpp:262:23:262:28 | ReadToCount output argument |
|
||||
| azure.cpp:266:38:266:41 | *resp | azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue in ReadToEnd [element] | azure.cpp:266:44:266:52 | call to ReadToEnd [element] |
|
||||
| azure.cpp:282:21:282:23 | *call to get | azure.cpp:115:30:115:38 | [summary param] this in ReadToEnd | azure.cpp:115:30:115:38 | [summary] to write: ReturnValue in ReadToEnd [element] | azure.cpp:282:28:282:36 | call to ReadToEnd [element] |
|
||||
| azure.cpp:289:24:289:56 | call to GetHeader | azure.cpp:62:10:62:14 | [summary param] this in Value | azure.cpp:62:10:62:14 | [summary] to write: ReturnValue[*] in Value | azure.cpp:289:63:289:65 | call to Value |
|
||||
| test.cpp:17:24:17:24 | x | test.cpp:4:5:4:17 | [summary param] 0 in ymlStepManual | test.cpp:4:5:4:17 | [summary] to write: ReturnValue in ymlStepManual | test.cpp:17:10:17:22 | call to ymlStepManual |
|
||||
| test.cpp:21:27:21:27 | x | test.cpp:5:5:5:20 | [summary param] 0 in ymlStepGenerated | test.cpp:5:5:5:20 | [summary] to write: ReturnValue in ymlStepGenerated | test.cpp:21:10:21:25 | call to ymlStepGenerated |
|
||||
| test.cpp:25:35:25:35 | x | test.cpp:6:5:6:27 | [summary param] 0 in ymlStepManual_with_body | test.cpp:6:5:6:27 | [summary] to write: ReturnValue in ymlStepManual_with_body | test.cpp:25:11:25:33 | call to ymlStepManual_with_body |
|
||||
| test.cpp:32:41:32:41 | x | test.cpp:7:47:7:52 | value2 | test.cpp:7:5:7:30 | *ymlStepGenerated_with_body | test.cpp:32:11:32:36 | call to ymlStepGenerated_with_body |
|
||||
| test.cpp:118:44:118:44 | *x | test.cpp:111:3:111:25 | [summary param] *0 in callWithNonTypeTemplate | test.cpp:111:3:111:25 | [summary] to write: ReturnValue in callWithNonTypeTemplate | test.cpp:118:11:118:42 | call to callWithNonTypeTemplate |
|
||||
| test.cpp:134:45:134:45 | x | test.cpp:125:5:125:20 | [summary param] 0 in templateFunction | test.cpp:125:5:125:20 | [summary] to write: ReturnValue in templateFunction | test.cpp:134:13:134:43 | call to templateFunction |
|
||||
| test.cpp:148:26:148:26 | x | test.cpp:140:4:140:11 | [summary param] 1 in function | test.cpp:140:4:140:11 | [summary] to write: ReturnValue in function | test.cpp:148:10:148:27 | call to function |
|
||||
| test.cpp:157:26:157:26 | x | test.cpp:140:4:140:11 | [summary param] 1 in function | test.cpp:140:4:140:11 | [summary] to write: ReturnValue in function | test.cpp:157:13:157:20 | call to function |
|
||||
| test.cpp:165:69:165:69 | x | test.cpp:128:5:128:21 | [summary param] 1 in templateFunction2 | test.cpp:128:5:128:21 | [summary] to write: ReturnValue in templateFunction2 | test.cpp:165:12:165:64 | call to templateFunction2 |
|
||||
| test.cpp:172:51:172:51 | x | test.cpp:164:34:164:34 | x | test.cpp:164:7:164:7 | *templateFunction3 | test.cpp:172:13:172:44 | call to templateFunction3 |
|
||||
| windows.cpp:27:36:27:38 | *cmd | windows.cpp:17:8:17:25 | [summary param] *0 in CommandLineToArgvA | windows.cpp:17:8:17:25 | [summary] to write: ReturnValue[**] in CommandLineToArgvA | windows.cpp:27:17:27:34 | **call to CommandLineToArgvA |
|
||||
| windows.cpp:537:40:537:41 | *& ... | windows.cpp:473:17:473:37 | [summary param] *1 in RtlCopyVolatileMemory | windows.cpp:473:17:473:37 | [summary param] *0 in RtlCopyVolatileMemory [Return] | windows.cpp:537:27:537:37 | RtlCopyVolatileMemory output argument |
|
||||
| windows.cpp:542:38:542:39 | *& ... | windows.cpp:479:17:479:35 | [summary param] *1 in RtlCopyDeviceMemory | windows.cpp:479:17:479:35 | [summary param] *0 in RtlCopyDeviceMemory [Return] | windows.cpp:542:25:542:35 | RtlCopyDeviceMemory output argument |
|
||||
| windows.cpp:547:32:547:33 | *& ... | windows.cpp:485:6:485:18 | [summary param] *1 in RtlCopyMemory | windows.cpp:485:6:485:18 | [summary param] *0 in RtlCopyMemory [Return] | windows.cpp:547:19:547:29 | RtlCopyMemory output argument |
|
||||
| windows.cpp:552:43:552:44 | *& ... | windows.cpp:493:6:493:29 | [summary param] *1 in RtlCopyMemoryNonTemporal | windows.cpp:493:6:493:29 | [summary param] *0 in RtlCopyMemoryNonTemporal [Return] | windows.cpp:552:30:552:40 | RtlCopyMemoryNonTemporal output argument |
|
||||
| windows.cpp:561:39:561:44 | *buffer | windows.cpp:527:6:527:25 | [summary param] *1 in RtlInitUnicodeString | windows.cpp:527:6:527:25 | [summary param] *0 in RtlInitUnicodeString [Return] [*Buffer] | windows.cpp:561:26:561:36 | RtlInitUnicodeString output argument [*Buffer] |
|
||||
| windows.cpp:563:40:563:50 | *& ... [*Buffer] | windows.cpp:510:6:510:25 | [summary param] *1 in RtlCopyUnicodeString [*Buffer] | windows.cpp:510:6:510:25 | [summary param] *0 in RtlCopyUnicodeString [Return] [*Buffer] | windows.cpp:563:26:563:37 | RtlCopyUnicodeString output argument [*Buffer] |
|
||||
| windows.cpp:568:32:568:33 | *& ... | windows.cpp:515:6:515:18 | [summary param] *1 in RtlMoveMemory | windows.cpp:515:6:515:18 | [summary param] *0 in RtlMoveMemory [Return] | windows.cpp:568:19:568:29 | RtlMoveMemory output argument |
|
||||
| windows.cpp:573:40:573:41 | *& ... | windows.cpp:521:17:521:37 | [summary param] *1 in RtlMoveVolatileMemory | windows.cpp:521:17:521:37 | [summary param] *0 in RtlMoveVolatileMemory [Return] | windows.cpp:573:27:573:37 | RtlMoveVolatileMemory output argument |
|
||||
| windows.cpp:729:35:729:35 | *x | windows.cpp:714:6:714:20 | [summary param] *0 in WinHttpCrackUrl | windows.cpp:714:6:714:20 | [summary param] *3 in WinHttpCrackUrl [Return] | windows.cpp:729:44:729:57 | WinHttpCrackUrl output argument |
|
||||
testFailures
|
||||
|
||||
@@ -21,4 +21,6 @@ extensions:
|
||||
- ["", "", False, "callWithNonTypeTemplate<T>", "(const T &)", "", "Argument[*0]", "ReturnValue", "value", "manual"]
|
||||
- ["", "TemplateClass1<T>", False, "templateFunction<U>", "(T,U)", "", "Argument[0]", "ReturnValue", "value", "manual"]
|
||||
- ["", "TemplateClass1", True, "templateFunction2<U,V>", "(U,V)", "", "Argument[1]", "ReturnValue", "value", "manual"]
|
||||
- ["", "TemplateClass2<T,U>", True, "function", "(U,T)", "", "Argument[1]", "ReturnValue", "value", "manual"]
|
||||
- ["", "TemplateClass2<T,U>", True, "function", "(U,T)", "", "Argument[1]", "ReturnValue", "value", "manual"]
|
||||
- ["", "", False, "read_field_from_struct", "", "", "Argument[*0].Field[MyNamespace::MyStructInNamespace::myField]", "ReturnValue", "value", "manual"]
|
||||
- ["", "", False, "read_field_from_struct_2", "", "", "Argument[*0].Field[MyGlobalStruct::myField]", "ReturnValue", "value", "manual"]
|
||||
@@ -19,3 +19,5 @@
|
||||
| test.cpp:149:10:149:10 | z | test-sink |
|
||||
| test.cpp:158:10:158:10 | z | test-sink |
|
||||
| test.cpp:173:10:173:10 | y | test-sink |
|
||||
| test.cpp:188:10:188:10 | x | test-sink |
|
||||
| test.cpp:201:10:201:10 | x | test-sink |
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
| test.cpp:146:10:146:18 | call to ymlSource | local |
|
||||
| test.cpp:155:10:155:18 | call to ymlSource | local |
|
||||
| test.cpp:170:10:170:18 | call to ymlSource | local |
|
||||
| test.cpp:186:14:186:22 | call to ymlSource | local |
|
||||
| test.cpp:199:14:199:22 | call to ymlSource | local |
|
||||
| windows.cpp:22:15:22:29 | *call to GetCommandLineA | local |
|
||||
| windows.cpp:34:17:34:38 | *call to GetEnvironmentStringsA | local |
|
||||
| windows.cpp:39:36:39:38 | GetEnvironmentVariableA output argument | local |
|
||||
|
||||
@@ -171,4 +171,32 @@ void test_class1() {
|
||||
Class1<int> c;
|
||||
auto y = c.templateFunction3<unsigned long>(0UL, x);
|
||||
ymlSink(y); // $ ir
|
||||
}
|
||||
|
||||
namespace MyNamespace {
|
||||
struct MyStructInNamespace {
|
||||
int myField;
|
||||
};
|
||||
}
|
||||
|
||||
int read_field_from_struct(MyNamespace::MyStructInNamespace* s);
|
||||
|
||||
void test_fully_qualified_field_test() {
|
||||
MyNamespace::MyStructInNamespace s;
|
||||
s.myField = ymlSource();
|
||||
int x = read_field_from_struct(&s);
|
||||
ymlSink(x); // $ ir
|
||||
}
|
||||
|
||||
struct MyGlobalStruct {
|
||||
int myField;
|
||||
};
|
||||
|
||||
int read_field_from_struct_2(MyGlobalStruct* s);
|
||||
|
||||
void test_fully_qualified_field_test_2() {
|
||||
MyGlobalStruct s;
|
||||
s.myField = ymlSource();
|
||||
int x = read_field_from_struct_2(&s);
|
||||
ymlSink(x); // $ ir
|
||||
}
|
||||
@@ -321,23 +321,23 @@ flowSummaryNode
|
||||
| tests.cpp:155:5:155:28 | [summary param] 2 in madAndImplementedComplex | ParameterNode | madAndImplementedComplex | madAndImplementedComplex |
|
||||
| tests.cpp:155:5:155:28 | [summary] to write: ReturnValue in madAndImplementedComplex | ReturnNode | madAndImplementedComplex | madAndImplementedComplex |
|
||||
| tests.cpp:160:5:160:24 | [summary param] 0 in madArg0FieldToReturn | ParameterNode | madArg0FieldToReturn | madArg0FieldToReturn |
|
||||
| tests.cpp:160:5:160:24 | [summary] read: Argument[0].Field[value] in madArg0FieldToReturn | | madArg0FieldToReturn | madArg0FieldToReturn |
|
||||
| tests.cpp:160:5:160:24 | [summary] read: Argument[0].Field[MyContainer::value]/Field[value] in madArg0FieldToReturn | | madArg0FieldToReturn | madArg0FieldToReturn |
|
||||
| tests.cpp:160:5:160:24 | [summary] to write: ReturnValue in madArg0FieldToReturn | ReturnNode | madArg0FieldToReturn | madArg0FieldToReturn |
|
||||
| tests.cpp:161:5:161:32 | [summary param] *0 in madArg0IndirectFieldToReturn | ParameterNode | madArg0IndirectFieldToReturn | madArg0IndirectFieldToReturn |
|
||||
| tests.cpp:161:5:161:32 | [summary] read: Argument[*0].Field[value] in madArg0IndirectFieldToReturn | | madArg0IndirectFieldToReturn | madArg0IndirectFieldToReturn |
|
||||
| tests.cpp:161:5:161:32 | [summary] read: Argument[*0].Field[MyContainer::value]/Field[value] in madArg0IndirectFieldToReturn | | madArg0IndirectFieldToReturn | madArg0IndirectFieldToReturn |
|
||||
| tests.cpp:161:5:161:32 | [summary] to write: ReturnValue in madArg0IndirectFieldToReturn | ReturnNode | madArg0IndirectFieldToReturn | madArg0IndirectFieldToReturn |
|
||||
| tests.cpp:162:5:162:32 | [summary param] 0 in madArg0FieldIndirectToReturn | ParameterNode | madArg0FieldIndirectToReturn | madArg0FieldIndirectToReturn |
|
||||
| tests.cpp:162:5:162:32 | [summary] read: Argument[0].Field[*ptr] in madArg0FieldIndirectToReturn | | madArg0FieldIndirectToReturn | madArg0FieldIndirectToReturn |
|
||||
| tests.cpp:162:5:162:32 | [summary] read: Argument[0].Field[*MyContainer::ptr]/Field[*ptr] in madArg0FieldIndirectToReturn | | madArg0FieldIndirectToReturn | madArg0FieldIndirectToReturn |
|
||||
| tests.cpp:162:5:162:32 | [summary] to write: ReturnValue in madArg0FieldIndirectToReturn | ReturnNode | madArg0FieldIndirectToReturn | madArg0FieldIndirectToReturn |
|
||||
| tests.cpp:163:13:163:32 | [summary param] 0 in madArg0ToReturnField | ParameterNode | madArg0ToReturnField | madArg0ToReturnField |
|
||||
| tests.cpp:163:13:163:32 | [summary] to write: ReturnValue in madArg0ToReturnField | ReturnNode | madArg0ToReturnField | madArg0ToReturnField |
|
||||
| tests.cpp:163:13:163:32 | [summary] to write: ReturnValue.Field[value] in madArg0ToReturnField | | madArg0ToReturnField | madArg0ToReturnField |
|
||||
| tests.cpp:163:13:163:32 | [summary] to write: ReturnValue.Field[MyContainer::value]/Field[value] in madArg0ToReturnField | | madArg0ToReturnField | madArg0ToReturnField |
|
||||
| tests.cpp:164:14:164:41 | [summary param] 0 in madArg0ToReturnIndirectField | ParameterNode | madArg0ToReturnIndirectField | madArg0ToReturnIndirectField |
|
||||
| tests.cpp:164:14:164:41 | [summary] to write: ReturnValue[*] in madArg0ToReturnIndirectField | ReturnNode | madArg0ToReturnIndirectField | madArg0ToReturnIndirectField |
|
||||
| tests.cpp:164:14:164:41 | [summary] to write: ReturnValue[*].Field[value] in madArg0ToReturnIndirectField | | madArg0ToReturnIndirectField | madArg0ToReturnIndirectField |
|
||||
| tests.cpp:164:14:164:41 | [summary] to write: ReturnValue[*].Field[MyContainer::value]/Field[value] in madArg0ToReturnIndirectField | | madArg0ToReturnIndirectField | madArg0ToReturnIndirectField |
|
||||
| tests.cpp:165:13:165:40 | [summary param] 0 in madArg0ToReturnFieldIndirect | ParameterNode | madArg0ToReturnFieldIndirect | madArg0ToReturnFieldIndirect |
|
||||
| tests.cpp:165:13:165:40 | [summary] to write: ReturnValue in madArg0ToReturnFieldIndirect | ReturnNode | madArg0ToReturnFieldIndirect | madArg0ToReturnFieldIndirect |
|
||||
| tests.cpp:165:13:165:40 | [summary] to write: ReturnValue.Field[*ptr] in madArg0ToReturnFieldIndirect | | madArg0ToReturnFieldIndirect | madArg0ToReturnFieldIndirect |
|
||||
| tests.cpp:165:13:165:40 | [summary] to write: ReturnValue.Field[*MyContainer::ptr]/Field[*ptr] in madArg0ToReturnFieldIndirect | | madArg0ToReturnFieldIndirect | madArg0ToReturnFieldIndirect |
|
||||
| tests.cpp:284:7:284:19 | [summary param] 0 in madArg0ToSelf | ParameterNode | madArg0ToSelf | madArg0ToSelf |
|
||||
| tests.cpp:284:7:284:19 | [summary param] this in madArg0ToSelf | ParameterNode | madArg0ToSelf | madArg0ToSelf |
|
||||
| tests.cpp:284:7:284:19 | [summary] to write: Argument[this] in madArg0ToSelf | PostUpdateNode | madArg0ToSelf | madArg0ToSelf |
|
||||
@@ -346,9 +346,9 @@ flowSummaryNode
|
||||
| tests.cpp:287:7:287:20 | [summary param] 0 in madArg0ToField | ParameterNode | madArg0ToField | madArg0ToField |
|
||||
| tests.cpp:287:7:287:20 | [summary param] this in madArg0ToField | ParameterNode | madArg0ToField | madArg0ToField |
|
||||
| tests.cpp:287:7:287:20 | [summary] to write: Argument[this] in madArg0ToField | PostUpdateNode | madArg0ToField | madArg0ToField |
|
||||
| tests.cpp:287:7:287:20 | [summary] to write: Argument[this].Field[val] in madArg0ToField | | madArg0ToField | madArg0ToField |
|
||||
| tests.cpp:287:7:287:20 | [summary] to write: Argument[this].Field[MyClass::val]/Field[val] in madArg0ToField | | madArg0ToField | madArg0ToField |
|
||||
| tests.cpp:288:6:288:21 | [summary param] this in madFieldToReturn | ParameterNode | madFieldToReturn | madFieldToReturn |
|
||||
| tests.cpp:288:6:288:21 | [summary] read: Argument[this].Field[val] in madFieldToReturn | | madFieldToReturn | madFieldToReturn |
|
||||
| tests.cpp:288:6:288:21 | [summary] read: Argument[this].Field[MyClass::val]/Field[val] in madFieldToReturn | | madFieldToReturn | madFieldToReturn |
|
||||
| tests.cpp:288:6:288:21 | [summary] to write: ReturnValue in madFieldToReturn | ReturnNode | madFieldToReturn | madFieldToReturn |
|
||||
| tests.cpp:313:7:313:30 | [summary param] this in namespaceMadSelfToReturn | ParameterNode | namespaceMadSelfToReturn | namespaceMadSelfToReturn |
|
||||
| tests.cpp:313:7:313:30 | [summary] to write: ReturnValue in namespaceMadSelfToReturn | ReturnNode | namespaceMadSelfToReturn | namespaceMadSelfToReturn |
|
||||
@@ -362,7 +362,7 @@ flowSummaryNode
|
||||
| tests.cpp:435:9:435:38 | [summary] read: Argument[0].ReturnValue in madCallArg0ReturnToReturnFirst | OutNode | madCallArg0ReturnToReturnFirst | madCallArg0ReturnToReturnFirst |
|
||||
| tests.cpp:435:9:435:38 | [summary] to write: Argument[0].Parameter[this pointer] in madCallArg0ReturnToReturnFirst | ArgumentNode | madCallArg0ReturnToReturnFirst | madCallArg0ReturnToReturnFirst |
|
||||
| tests.cpp:435:9:435:38 | [summary] to write: ReturnValue in madCallArg0ReturnToReturnFirst | ReturnNode | madCallArg0ReturnToReturnFirst | madCallArg0ReturnToReturnFirst |
|
||||
| tests.cpp:435:9:435:38 | [summary] to write: ReturnValue.Field[first] in madCallArg0ReturnToReturnFirst | | madCallArg0ReturnToReturnFirst | madCallArg0ReturnToReturnFirst |
|
||||
| tests.cpp:435:9:435:38 | [summary] to write: ReturnValue.Field[first]/Field[intPair::first] in madCallArg0ReturnToReturnFirst | | madCallArg0ReturnToReturnFirst | madCallArg0ReturnToReturnFirst |
|
||||
| tests.cpp:436:6:436:25 | [summary param] 0 in madCallArg0WithValue | ParameterNode | madCallArg0WithValue | madCallArg0WithValue |
|
||||
| tests.cpp:436:6:436:25 | [summary param] 1 in madCallArg0WithValue | ParameterNode | madCallArg0WithValue | madCallArg0WithValue |
|
||||
| tests.cpp:436:6:436:25 | [summary] read: Argument[0].Parameter[0] in madCallArg0WithValue | PostUpdateNode | madCallArg0WithValue | madCallArg0WithValue |
|
||||
|
||||
@@ -11,12 +11,10 @@ edges
|
||||
| nested.cpp:86:19:86:46 | *call to __builtin_alloca | nested.cpp:87:18:87:20 | *fmt | provenance | |
|
||||
| test.cpp:46:27:46:30 | **argv | test.cpp:130:20:130:26 | *access to array | provenance | |
|
||||
| test.cpp:167:31:167:34 | *data | test.cpp:170:12:170:14 | *res | provenance | DataFlowFunction |
|
||||
| test.cpp:179:6:179:21 | [summary param] *2 in StringCchPrintfW | test.cpp:179:6:179:21 | [summary param] *0 in StringCchPrintfW [Return] | provenance | MaD:403 |
|
||||
| test.cpp:193:32:193:34 | *str | test.cpp:195:31:195:33 | *str | provenance | |
|
||||
| test.cpp:193:32:193:34 | *str | test.cpp:195:31:195:33 | *str | provenance | |
|
||||
| test.cpp:193:32:193:34 | *str | test.cpp:197:11:197:14 | *wstr | provenance | TaintFunction |
|
||||
| test.cpp:195:20:195:23 | StringCchPrintfW output argument | test.cpp:197:11:197:14 | *wstr | provenance | |
|
||||
| test.cpp:195:31:195:33 | *str | test.cpp:179:6:179:21 | [summary param] *2 in StringCchPrintfW | provenance | |
|
||||
| test.cpp:195:31:195:33 | *str | test.cpp:195:20:195:23 | StringCchPrintfW output argument | provenance | MaD:403 |
|
||||
| test.cpp:204:25:204:36 | *call to get_string | test.cpp:204:25:204:36 | *call to get_string | provenance | |
|
||||
| test.cpp:204:25:204:36 | *call to get_string | test.cpp:205:12:205:20 | *... + ... | provenance | |
|
||||
@@ -60,8 +58,6 @@ nodes
|
||||
| test.cpp:130:20:130:26 | *access to array | semmle.label | *access to array |
|
||||
| test.cpp:167:31:167:34 | *data | semmle.label | *data |
|
||||
| test.cpp:170:12:170:14 | *res | semmle.label | *res |
|
||||
| test.cpp:179:6:179:21 | [summary param] *0 in StringCchPrintfW [Return] | semmle.label | [summary param] *0 in StringCchPrintfW [Return] |
|
||||
| test.cpp:179:6:179:21 | [summary param] *2 in StringCchPrintfW | semmle.label | [summary param] *2 in StringCchPrintfW |
|
||||
| test.cpp:193:32:193:34 | *str | semmle.label | *str |
|
||||
| test.cpp:195:20:195:23 | StringCchPrintfW output argument | semmle.label | StringCchPrintfW output argument |
|
||||
| test.cpp:195:31:195:33 | *str | semmle.label | *str |
|
||||
@@ -97,7 +93,6 @@ nodes
|
||||
| test.cpp:245:25:245:36 | *call to get_string | semmle.label | *call to get_string |
|
||||
| test.cpp:247:12:247:16 | *hello | semmle.label | *hello |
|
||||
subpaths
|
||||
| test.cpp:195:31:195:33 | *str | test.cpp:179:6:179:21 | [summary param] *2 in StringCchPrintfW | test.cpp:179:6:179:21 | [summary param] *0 in StringCchPrintfW [Return] | test.cpp:195:20:195:23 | StringCchPrintfW output argument |
|
||||
#select
|
||||
| NonConstantFormat.c:30:10:30:16 | *access to array | NonConstantFormat.c:28:27:28:30 | **argv | NonConstantFormat.c:30:10:30:16 | *access to array | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | NonConstantFormat.c:30:3:30:8 | call to printf | printf |
|
||||
| NonConstantFormat.c:41:9:41:45 | *call to any_random_function | NonConstantFormat.c:41:9:41:45 | *call to any_random_function | NonConstantFormat.c:41:9:41:45 | *call to any_random_function | The format string argument to $@ has a source which cannot be verified to originate from a string literal. | NonConstantFormat.c:41:2:41:7 | call to printf | printf |
|
||||
|
||||
@@ -33,7 +33,6 @@ edges
|
||||
| tests2.cpp:111:14:111:15 | *c1 [*ptr] | tests2.cpp:111:14:111:19 | *ptr | provenance | |
|
||||
| tests2.cpp:111:14:111:15 | *c1 [*ptr] | tests2.cpp:111:17:111:19 | *ptr | provenance | |
|
||||
| tests2.cpp:111:17:111:19 | *ptr | tests2.cpp:111:14:111:19 | *ptr | provenance | |
|
||||
| tests2.cpp:120:5:120:21 | [summary param] *1 in zmq_msg_init_data | tests2.cpp:120:5:120:21 | [summary param] *0 in zmq_msg_init_data [Return] | provenance | MaD:4 |
|
||||
| tests2.cpp:134:2:134:30 | *... = ... | tests2.cpp:138:23:138:34 | *message_data | provenance | Sink:MaD:2 |
|
||||
| tests2.cpp:134:2:134:30 | *... = ... | tests2.cpp:143:34:143:45 | *message_data | provenance | |
|
||||
| tests2.cpp:134:17:134:22 | *call to getenv | tests2.cpp:134:2:134:30 | *... = ... | provenance | |
|
||||
@@ -41,7 +40,6 @@ edges
|
||||
| tests2.cpp:143:24:143:31 | zmq_msg_init_data output argument | tests2.cpp:147:20:147:27 | *& ... | provenance | Sink:MaD:1 |
|
||||
| tests2.cpp:143:24:143:31 | zmq_msg_init_data output argument | tests2.cpp:155:32:155:39 | *& ... | provenance | Sink:MaD:3 |
|
||||
| tests2.cpp:143:24:143:31 | zmq_msg_init_data output argument | tests2.cpp:158:20:158:27 | *& ... | provenance | Sink:MaD:1 |
|
||||
| tests2.cpp:143:34:143:45 | *message_data | tests2.cpp:120:5:120:21 | [summary param] *1 in zmq_msg_init_data | provenance | |
|
||||
| tests2.cpp:143:34:143:45 | *message_data | tests2.cpp:143:24:143:31 | zmq_msg_init_data output argument | provenance | MaD:4 |
|
||||
| tests_sockets.cpp:26:15:26:20 | *call to getenv | tests_sockets.cpp:26:15:26:20 | *call to getenv | provenance | |
|
||||
| tests_sockets.cpp:26:15:26:20 | *call to getenv | tests_sockets.cpp:39:19:39:22 | *path | provenance | |
|
||||
@@ -78,8 +76,6 @@ nodes
|
||||
| tests2.cpp:111:14:111:15 | *c1 [*ptr] | semmle.label | *c1 [*ptr] |
|
||||
| tests2.cpp:111:14:111:19 | *ptr | semmle.label | *ptr |
|
||||
| tests2.cpp:111:17:111:19 | *ptr | semmle.label | *ptr |
|
||||
| tests2.cpp:120:5:120:21 | [summary param] *0 in zmq_msg_init_data [Return] | semmle.label | [summary param] *0 in zmq_msg_init_data [Return] |
|
||||
| tests2.cpp:120:5:120:21 | [summary param] *1 in zmq_msg_init_data | semmle.label | [summary param] *1 in zmq_msg_init_data |
|
||||
| tests2.cpp:134:2:134:30 | *... = ... | semmle.label | *... = ... |
|
||||
| tests2.cpp:134:17:134:22 | *call to getenv | semmle.label | *call to getenv |
|
||||
| tests2.cpp:138:23:138:34 | *message_data | semmle.label | *message_data |
|
||||
@@ -100,4 +96,3 @@ nodes
|
||||
| tests_sysconf.cpp:36:21:36:27 | confstr output argument | semmle.label | confstr output argument |
|
||||
| tests_sysconf.cpp:39:19:39:25 | *pathbuf | semmle.label | *pathbuf |
|
||||
subpaths
|
||||
| tests2.cpp:143:34:143:45 | *message_data | tests2.cpp:120:5:120:21 | [summary param] *1 in zmq_msg_init_data | tests2.cpp:120:5:120:21 | [summary param] *0 in zmq_msg_init_data [Return] | tests2.cpp:143:24:143:31 | zmq_msg_init_data output argument |
|
||||
|
||||
@@ -88,12 +88,12 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
private IEnumerable<string> GetFeedsFromNugetConfig(string nugetConfigPath) =>
|
||||
GetFeeds(() => dotnet.GetNugetFeeds(nugetConfigPath));
|
||||
|
||||
private string FeedsToRestoreArgument(IEnumerable<string> feeds)
|
||||
public string FeedsToRestoreArgument(IEnumerable<string> feeds, string sourceArgumentPrefix)
|
||||
{
|
||||
// If there are no feeds, we want to override any default feeds that `dotnet restore` would use by passing a dummy source argument.
|
||||
// If there are no feeds, we want to override any default feeds that `restore` would use by passing a dummy source argument.
|
||||
if (!feeds.Any())
|
||||
{
|
||||
return $" -s \"{emptyPackageDirectory.DirInfo.FullName}\"";
|
||||
return $" {sourceArgumentPrefix} \"{emptyPackageDirectory.DirInfo.FullName}\"";
|
||||
}
|
||||
|
||||
// Add package sources. If any are present, they override all sources specified in
|
||||
@@ -101,7 +101,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
var feedArgs = new StringBuilder();
|
||||
foreach (var feed in feeds)
|
||||
{
|
||||
feedArgs.Append($" -s \"{feed}\"");
|
||||
feedArgs.Append($" {sourceArgumentPrefix} \"{feed}\"");
|
||||
}
|
||||
|
||||
return feedArgs.ToString();
|
||||
@@ -112,17 +112,11 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
/// (1) Use the feeds we get from `dotnet nuget list source`
|
||||
/// (2) Use private registries, if they are configured
|
||||
/// </summary>
|
||||
/// <param name="path">Path to project/solution</param>
|
||||
/// <param name="path">Path to project/solution/packages.config</param>
|
||||
/// <param name="reachableFeeds">The set of reachable NuGet feeds.</param>
|
||||
/// <returns>A string representing the NuGet sources argument for the restore command.</returns>
|
||||
public string? MakeRestoreSourcesArgument(string path, HashSet<string> reachableFeeds)
|
||||
/// <returns>The list of NuGet feeds to use for this restore.</returns>
|
||||
public IEnumerable<string> FeedsToUse(string path, HashSet<string> reachableFeeds)
|
||||
{
|
||||
// Do not construct a set of explicit NuGet sources to use for restore.
|
||||
if (!CheckNugetFeedResponsiveness && !HasPrivateRegistryFeeds)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
// Find the path specific feeds.
|
||||
var folder = GetDirectoryName(path);
|
||||
var feedsToConsider = folder is not null ? GetFeedsFromFolder(folder).ToHashSet() : new HashSet<string>();
|
||||
@@ -136,7 +130,28 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
? feedsToConsider.Where(reachableFeeds.Contains)
|
||||
: feedsToConsider;
|
||||
|
||||
return FeedsToRestoreArgument(feedsToUse);
|
||||
return feedsToUse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructs the list of NuGet sources to use for dotnet restore.
|
||||
/// (1) Use the feeds we get from `dotnet nuget list source`
|
||||
/// (2) Use private registries, if they are configured
|
||||
/// </summary>
|
||||
/// <param name="path">Path to project/solution</param>
|
||||
/// <param name="reachableFeeds">The set of reachable NuGet feeds.</param>
|
||||
/// <returns>A string representing the NuGet sources argument for the restore command.</returns>
|
||||
public string? MakeDotnetRestoreSourcesArgument(string path, HashSet<string> reachableFeeds)
|
||||
{
|
||||
// Do not construct a set of explicit NuGet sources to use for restore.
|
||||
if (!CheckNugetFeedResponsiveness && !HasPrivateRegistryFeeds)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var feedsToUse = FeedsToUse(path, reachableFeeds);
|
||||
|
||||
return FeedsToRestoreArgument(feedsToUse, "-s");
|
||||
}
|
||||
|
||||
private (int initialTimeout, int tryCount) GetFeedRequestSettings(bool isFallback)
|
||||
|
||||
@@ -110,58 +110,55 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
logger.LogInfo($"Checking NuGet feed responsiveness: {feedManager.CheckNugetFeedResponsiveness}");
|
||||
compilationInfoContainer.CompilationInfos.Add(("NuGet feed responsiveness checked", feedManager.CheckNugetFeedResponsiveness ? "1" : "0"));
|
||||
|
||||
HashSet<string> explicitFeeds = [];
|
||||
HashSet<string> reachableFeeds = [];
|
||||
|
||||
EmitNugetConfigDiagnostics();
|
||||
|
||||
// Find feeds that are configured in NuGet.config files and divide them into ones that
|
||||
// are explicitly configured for the project or by a private registry, and "all feeds"
|
||||
// (including inherited ones) from other locations on the host outside of the working directory.
|
||||
(var explicitFeeds, var allFeeds) = feedManager.GetAllFeeds();
|
||||
|
||||
if (feedManager.CheckNugetFeedResponsiveness)
|
||||
{
|
||||
var inheritedFeeds = allFeeds.Except(explicitFeeds).ToHashSet();
|
||||
|
||||
if (inheritedFeeds.Count > 0)
|
||||
{
|
||||
compilationInfoContainer.CompilationInfos.Add(("Inherited NuGet feed count", inheritedFeeds.Count.ToString()));
|
||||
}
|
||||
|
||||
var timeout = feedManager.CheckSpecifiedFeeds(explicitFeeds, out var reachableExplicitFeeds);
|
||||
reachableFeeds.UnionWith(reachableExplicitFeeds);
|
||||
|
||||
var allExplicitReachable = explicitFeeds.Count == reachableExplicitFeeds.Count;
|
||||
EmitUnreachableFeedsDiagnostics(allExplicitReachable);
|
||||
|
||||
if (timeout)
|
||||
{
|
||||
// If we experience a timeout, we use this fallback.
|
||||
// todo: we could also check the reachability of the inherited nuget feeds, but to use those in the fallback we would need to handle authentication too.
|
||||
var unresponsiveMissingPackageLocation = DownloadMissingPackagesFromSpecificFeeds([], explicitFeeds);
|
||||
return unresponsiveMissingPackageLocation is null
|
||||
? []
|
||||
: [unresponsiveMissingPackageLocation];
|
||||
}
|
||||
|
||||
// Inherited feeds should only be used, if they are indeed reachable (as they may be environment specific).
|
||||
feedManager.CheckSpecifiedFeeds(inheritedFeeds, out var reachableInheritedFeeds);
|
||||
reachableFeeds.UnionWith(reachableInheritedFeeds);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
EmitNugetConfigDiagnostics();
|
||||
|
||||
// Find feeds that are configured in NuGet.config files and divide them into ones that
|
||||
// are explicitly configured for the project or by a private registry, and "all feeds"
|
||||
// (including inherited ones) from other locations on the host outside of the working directory.
|
||||
(explicitFeeds, var allFeeds) = feedManager.GetAllFeeds();
|
||||
|
||||
if (feedManager.CheckNugetFeedResponsiveness)
|
||||
var packagesConfigRestore = PackagesConfigRestoreFactory.Create(fileProvider, legacyPackageDirectory, logger, feedManager, reachableFeeds);
|
||||
var count = packagesConfigRestore.InstallPackages();
|
||||
if (packagesConfigRestore.PackageCount > 0)
|
||||
{
|
||||
var inheritedFeeds = allFeeds.Except(explicitFeeds).ToHashSet();
|
||||
|
||||
if (inheritedFeeds.Count > 0)
|
||||
{
|
||||
compilationInfoContainer.CompilationInfos.Add(("Inherited NuGet feed count", inheritedFeeds.Count.ToString()));
|
||||
}
|
||||
|
||||
var timeout = feedManager.CheckSpecifiedFeeds(explicitFeeds, out var reachableExplicitFeeds);
|
||||
reachableFeeds.UnionWith(reachableExplicitFeeds);
|
||||
|
||||
var allExplicitReachable = explicitFeeds.Count == reachableExplicitFeeds.Count;
|
||||
EmitUnreachableFeedsDiagnostics(allExplicitReachable);
|
||||
|
||||
if (timeout)
|
||||
{
|
||||
// If we experience a timeout, we use this fallback.
|
||||
// todo: we could also check the reachability of the inherited nuget feeds, but to use those in the fallback we would need to handle authentication too.
|
||||
var unresponsiveMissingPackageLocation = DownloadMissingPackagesFromSpecificFeeds([], explicitFeeds);
|
||||
return unresponsiveMissingPackageLocation is null
|
||||
? []
|
||||
: [unresponsiveMissingPackageLocation];
|
||||
}
|
||||
|
||||
// Inherited feeds should only be used, if they are indeed reachable (as they may be environment specific).
|
||||
feedManager.CheckSpecifiedFeeds(inheritedFeeds, out var reachableInheritedFeeds);
|
||||
reachableFeeds.UnionWith(reachableInheritedFeeds);
|
||||
compilationInfoContainer.CompilationInfos.Add(("packages.config files", packagesConfigRestore.PackageCount.ToString()));
|
||||
compilationInfoContainer.CompilationInfos.Add(("Successfully restored packages.config files", count.ToString()));
|
||||
}
|
||||
|
||||
using (var packagesConfigRestore = PackagesConfigRestoreFactory.Create(fileProvider, legacyPackageDirectory, logger, feedManager.IsDefaultFeedReachable))
|
||||
{
|
||||
var count = packagesConfigRestore.InstallPackages();
|
||||
|
||||
if (packagesConfigRestore.PackageCount > 0)
|
||||
{
|
||||
compilationInfoContainer.CompilationInfos.Add(("packages.config files", packagesConfigRestore.PackageCount.ToString()));
|
||||
compilationInfoContainer.CompilationInfos.Add(("Successfully restored packages.config files", count.ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
var nugetPackageDlls = legacyPackageDirectory.DirInfo.GetFiles("*.dll", new EnumerationOptions { RecurseSubdirectories = true });
|
||||
var nugetPackageDllPaths = nugetPackageDlls.Select(f => f.FullName).ToHashSet();
|
||||
@@ -239,7 +236,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
var projects = fileProvider.Solutions.SelectMany(solution =>
|
||||
{
|
||||
logger.LogInfo($"Restoring solution {solution}...");
|
||||
var nugetSources = feedManager.MakeRestoreSourcesArgument(solution, reachableFeeds);
|
||||
var nugetSources = feedManager.MakeDotnetRestoreSourcesArgument(solution, reachableFeeds);
|
||||
var res = dotnet.Restore(new(solution, PackageDirectory.DirInfo.FullName, ForceDotnetRefAssemblyFetching: true, NugetSources: nugetSources, TargetWindows: isWindows));
|
||||
if (res.Success)
|
||||
{
|
||||
@@ -288,7 +285,7 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
foreach (var project in projectGroup)
|
||||
{
|
||||
logger.LogInfo($"Restoring project {project}...");
|
||||
var nugetSources = feedManager.MakeRestoreSourcesArgument(project, reachableFeeds);
|
||||
var nugetSources = feedManager.MakeDotnetRestoreSourcesArgument(project, reachableFeeds);
|
||||
var res = dotnet.Restore(new(project, PackageDirectory.DirInfo.FullName, ForceDotnetRefAssemblyFetching: true, NugetSources: nugetSources, TargetWindows: isWindows));
|
||||
assets.AddDependenciesRange(res.AssetsFilePaths);
|
||||
lock (sync)
|
||||
|
||||
@@ -7,7 +7,7 @@ using Semmle.Util;
|
||||
|
||||
namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
{
|
||||
internal interface IPackagesConfigRestore : IDisposable
|
||||
internal interface IPackagesConfigRestore
|
||||
{
|
||||
/// <summary>
|
||||
/// The number of packages.config files found in the source tree.
|
||||
@@ -33,11 +33,11 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
/// </summary>
|
||||
internal class PackagesConfigRestoreFactory
|
||||
{
|
||||
public static IPackagesConfigRestore Create(FileProvider fileProvider, DependencyDirectory packageDirectory, Semmle.Util.Logging.ILogger logger, Func<bool> useDefaultFeed)
|
||||
public static IPackagesConfigRestore Create(FileProvider fileProvider, DependencyDirectory packageDirectory, Semmle.Util.Logging.ILogger logger, FeedManager feedManager, HashSet<string> reachableFeeds)
|
||||
{
|
||||
if (SystemBuildActions.Instance.IsWindows() || SystemBuildActions.Instance.IsMonoInstalled())
|
||||
{
|
||||
return new NugetExeWrapper(fileProvider, packageDirectory, logger, useDefaultFeed);
|
||||
return new NugetExeWrapper(fileProvider, packageDirectory, logger, feedManager, reachableFeeds);
|
||||
}
|
||||
|
||||
return new NoOpPackagesConfig(fileProvider.PackagesConfigs, logger);
|
||||
@@ -55,8 +55,6 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
|
||||
public int PackageCount => fileProvider.PackagesConfigs.Count;
|
||||
|
||||
private readonly string? backupNugetConfig;
|
||||
private readonly string? nugetConfigPath;
|
||||
private readonly FileProvider fileProvider;
|
||||
|
||||
/// <summary>
|
||||
@@ -65,57 +63,30 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
/// so as to not trample the source tree.
|
||||
/// </summary>
|
||||
private readonly DependencyDirectory packageDirectory;
|
||||
private readonly FeedManager feedManager;
|
||||
private readonly HashSet<string> reachableFeeds;
|
||||
|
||||
private bool IsWindows => SystemBuildActions.Instance.IsWindows();
|
||||
|
||||
private bool? isDefaultFeedReachable;
|
||||
private bool IsDefaultFeedReachable =>
|
||||
isDefaultFeedReachable ??= feedManager.IsDefaultFeedReachable();
|
||||
|
||||
/// <summary>
|
||||
/// Create the package manager for a specified source tree.
|
||||
/// </summary>
|
||||
public NugetExeWrapper(FileProvider fileProvider, DependencyDirectory packageDirectory, Semmle.Util.Logging.ILogger logger, Func<bool> useDefaultFeed)
|
||||
public NugetExeWrapper(FileProvider fileProvider, DependencyDirectory packageDirectory, Semmle.Util.Logging.ILogger logger, FeedManager feedManager, HashSet<string> reachableFeeds)
|
||||
{
|
||||
this.fileProvider = fileProvider;
|
||||
this.packageDirectory = packageDirectory;
|
||||
this.logger = logger;
|
||||
this.feedManager = feedManager;
|
||||
this.reachableFeeds = reachableFeeds;
|
||||
|
||||
if (fileProvider.PackagesConfigs.Count > 0)
|
||||
{
|
||||
logger.LogInfo($"Found packages.config files, trying to use nuget.exe for package restore");
|
||||
nugetExe = ResolveNugetExe();
|
||||
if (!HasPackageSource() && useDefaultFeed())
|
||||
{
|
||||
// We only modify or add a top level nuget.config file
|
||||
nugetConfigPath = Path.Join(fileProvider.SourceDir.FullName, "nuget.config");
|
||||
try
|
||||
{
|
||||
if (File.Exists(nugetConfigPath))
|
||||
{
|
||||
var tempFolderPath = FileUtils.GetTemporaryWorkingDirectory(out _);
|
||||
|
||||
do
|
||||
{
|
||||
backupNugetConfig = Path.Join(tempFolderPath, Path.GetRandomFileName());
|
||||
}
|
||||
while (File.Exists(backupNugetConfig));
|
||||
File.Copy(nugetConfigPath, backupNugetConfig, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
File.WriteAllText(nugetConfigPath,
|
||||
"""
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageSources>
|
||||
</packageSources>
|
||||
</configuration>
|
||||
""");
|
||||
}
|
||||
AddDefaultPackageSource(nugetConfigPath);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.LogError($"Failed to add default package source to {nugetConfigPath}: {e}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,6 +169,21 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
{
|
||||
logger.LogInfo($"Restoring file \"{packagesConfig}\"...");
|
||||
|
||||
var sourcesArgument = "";
|
||||
var feedsToUse = feedManager.FeedsToUse(packagesConfig, reachableFeeds).ToList();
|
||||
var useDefaultFeed = feedsToUse.Count == 0 && IsDefaultFeedReachable;
|
||||
|
||||
// Explicitly construct the sources to be used for the restore command when checking feed
|
||||
// responsiveness, using private registries, or falling back to nuget.org.
|
||||
if (feedManager.CheckNugetFeedResponsiveness || feedManager.HasPrivateRegistryFeeds || useDefaultFeed)
|
||||
{
|
||||
if (useDefaultFeed)
|
||||
{
|
||||
feedsToUse.Add(FeedManager.PublicNugetOrgFeed);
|
||||
}
|
||||
sourcesArgument = feedManager.FeedsToRestoreArgument(feedsToUse, "-Source");
|
||||
}
|
||||
|
||||
/* Use nuget.exe to install a package.
|
||||
* Note that there is a clutch of NuGet assemblies which could be used to
|
||||
* invoke this directly, which would arguably be nicer. However they are
|
||||
@@ -208,12 +194,12 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
if (RunWithMono)
|
||||
{
|
||||
exe = "mono";
|
||||
args = $"\"{nugetExe}\" install -OutputDirectory \"{packageDirectory}\" \"{packagesConfig}\"";
|
||||
args = $"\"{nugetExe}\" install -OutputDirectory \"{packageDirectory}\" {sourcesArgument} \"{packagesConfig}\"";
|
||||
}
|
||||
else
|
||||
{
|
||||
exe = nugetExe!;
|
||||
args = $"install -OutputDirectory \"{packageDirectory}\" \"{packagesConfig}\"";
|
||||
args = $"install -OutputDirectory \"{packageDirectory}\" {sourcesArgument} \"{packagesConfig}\"";
|
||||
}
|
||||
|
||||
var pi = new ProcessStartInfo(exe, args)
|
||||
@@ -246,98 +232,6 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
{
|
||||
return fileProvider.PackagesConfigs.Count(TryRestoreNugetPackage);
|
||||
}
|
||||
|
||||
private bool HasPackageSource()
|
||||
{
|
||||
if (IsWindows)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
logger.LogInfo("Checking if default package source is available...");
|
||||
RunMonoNugetCommand("sources list -ForceEnglishOutput", out var stdout);
|
||||
if (stdout.All(line => line != "No sources found."))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.LogWarning($"Failed to check if default package source is added: {e}");
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
private void RunMonoNugetCommand(string command, out IList<string> stdout)
|
||||
{
|
||||
string exe, args;
|
||||
if (RunWithMono)
|
||||
{
|
||||
exe = "mono";
|
||||
args = $"\"{nugetExe}\" {command}";
|
||||
}
|
||||
else
|
||||
{
|
||||
exe = nugetExe!;
|
||||
args = command;
|
||||
}
|
||||
|
||||
var pi = new ProcessStartInfo(exe, args)
|
||||
{
|
||||
RedirectStandardOutput = true,
|
||||
RedirectStandardError = true,
|
||||
UseShellExecute = false
|
||||
};
|
||||
|
||||
var threadId = Environment.CurrentManagedThreadId;
|
||||
void onOut(string s) => logger.LogDebug(s, threadId);
|
||||
void onError(string s) => logger.LogError(s, threadId);
|
||||
pi.ReadOutput(out stdout, onOut, onError);
|
||||
}
|
||||
|
||||
private void AddDefaultPackageSource(string nugetConfig)
|
||||
{
|
||||
logger.LogInfo("Adding default package source...");
|
||||
RunMonoNugetCommand($"sources add -Name DefaultNugetOrg -Source {FeedManager.PublicNugetOrgFeed} -ConfigFile \"{nugetConfig}\"", out _);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
if (nugetConfigPath is null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
if (backupNugetConfig is null)
|
||||
{
|
||||
logger.LogInfo("Removing nuget.config file");
|
||||
File.Delete(nugetConfigPath);
|
||||
return;
|
||||
}
|
||||
|
||||
logger.LogInfo("Reverting nuget.config file content");
|
||||
// The content of the original nuget.config file is reverted without changing the file's attributes or casing:
|
||||
using (var backup = File.OpenRead(backupNugetConfig))
|
||||
using (var current = File.OpenWrite(nugetConfigPath))
|
||||
{
|
||||
current.SetLength(0); // Truncate file
|
||||
backup.CopyTo(current); // Restore original content
|
||||
}
|
||||
|
||||
logger.LogInfo("Deleting backup nuget.config file");
|
||||
File.Delete(backupNugetConfig);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
logger.LogError($"Failed to restore original nuget.config file: {exc}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class NoOpPackagesConfig : IPackagesConfigRestore
|
||||
@@ -361,8 +255,6 @@ namespace Semmle.Extraction.CSharp.DependencyFetching
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void Dispose() { }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: majorAnalysis
|
||||
---
|
||||
* Simplified and streamlined the use of NuGet sources when downloading dependencies via `[mono] nuget.exe` in `build-mode: none`: NuGet sources are now supplied via the `-Source` flag instead of moving or creating `nuget.config` files in the checked-out repository, private registries are used if configured, and only reachable feeds are used when NuGet feed checking is enabled (the default).
|
||||
@@ -123,7 +123,7 @@ k8s.io/api/core,,,10,,,,,,,,,,,,,,,,,,,,,,,10,
|
||||
k8s.io/apimachinery/pkg/runtime,,,47,,,,,,,,,,,,,,,,,,,,,,,47,
|
||||
k8s.io/klog,90,,,,,,90,,,,,,,,,,,,,,,,,,,,
|
||||
launchpad.net/xmlpath,2,,,,,,,,,,,,,,,,,,2,,,,,,,,
|
||||
log,40,,3,,,,40,,,,,,,,,,,,,,,,,,,3,
|
||||
log,43,,16,,,,43,,,,,,,,,,,,,,,,,,,16,
|
||||
math/big,,,1,,,,,,,,,,,,,,,,,,,,,,,1,
|
||||
mime,,,14,,,,,,,,,,,,,,,,,,,,,,,14,
|
||||
net,2,16,100,,,,,,1,,,,,,,,1,,,,,,,16,,100,
|
||||
|
||||
|
@@ -32,7 +32,7 @@ Go framework & library support
|
||||
`Revel <http://revel.github.io/>`_,"``github.com/revel/revel*``, ``github.com/robfig/revel*``",46,20,4
|
||||
`SendGrid <https://github.com/sendgrid/sendgrid-go>`_,``github.com/sendgrid/sendgrid-go*``,,1,
|
||||
`Squirrel <https://github.com/Masterminds/squirrel>`_,"``github.com/Masterminds/squirrel*``, ``github.com/lann/squirrel*``, ``gopkg.in/Masterminds/squirrel``",81,,96
|
||||
`Standard library <https://pkg.go.dev/std>`_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``, ``weak``",52,612,124
|
||||
`Standard library <https://pkg.go.dev/std>`_,"````, ``archive/*``, ``bufio``, ``bytes``, ``cmp``, ``compress/*``, ``container/*``, ``context``, ``crypto``, ``crypto/*``, ``database/*``, ``debug/*``, ``embed``, ``encoding``, ``encoding/*``, ``errors``, ``expvar``, ``flag``, ``fmt``, ``go/*``, ``hash``, ``hash/*``, ``html``, ``html/*``, ``image``, ``image/*``, ``index/*``, ``io``, ``io/*``, ``log``, ``log/*``, ``maps``, ``math``, ``math/*``, ``mime``, ``mime/*``, ``net``, ``net/*``, ``os``, ``os/*``, ``path``, ``path/*``, ``plugin``, ``reflect``, ``reflect/*``, ``regexp``, ``regexp/*``, ``slices``, ``sort``, ``strconv``, ``strings``, ``sync``, ``sync/*``, ``syscall``, ``syscall/*``, ``testing``, ``testing/*``, ``text/*``, ``time``, ``time/*``, ``unicode``, ``unicode/*``, ``unsafe``, ``weak``",52,625,127
|
||||
`XORM <https://xorm.io>`_,"``github.com/go-xorm/xorm*``, ``xorm.io/xorm*``",,,68
|
||||
`XPath <https://github.com/antchfx/xpath>`_,``github.com/antchfx/xpath*``,,,4
|
||||
`appleboy/gin-jwt <https://github.com/appleboy/gin-jwt>`_,``github.com/appleboy/gin-jwt*``,,,1
|
||||
@@ -74,5 +74,5 @@ Go framework & library support
|
||||
`xpathparser <https://github.com/santhosh-tekuri/xpathparser>`_,``github.com/santhosh-tekuri/xpathparser*``,,,2
|
||||
`yaml <https://gopkg.in/yaml.v3>`_,``gopkg.in/yaml*``,,9,
|
||||
`zap <https://go.uber.org/zap>`_,``go.uber.org/zap*``,,11,33
|
||||
Totals,,688,1072,1577
|
||||
Totals,,688,1085,1580
|
||||
|
||||
|
||||
4
go/ql/lib/change-notes/2026-06-30-model-log-slog.md
Normal file
4
go/ql/lib/change-notes/2026-06-30-model-log-slog.md
Normal file
@@ -0,0 +1,4 @@
|
||||
---
|
||||
category: minorAnalysis
|
||||
---
|
||||
* Improved models for the `log/slog` package (Go 1.21+), including `*slog.Logger` methods, `With`/`WithGroup`, and `Attr`/`Value` helpers, improving coverage for the `go/log-injection` and `go/clear-text-logging` queries.
|
||||
@@ -27,3 +27,27 @@ extensions:
|
||||
- ["log/slog", "Logger", True, "ErrorContext", "", "", "Argument[1..2]", "log-injection", "manual"]
|
||||
- ["log/slog", "Logger", True, "Log", "", "", "Argument[2..3]", "log-injection", "manual"]
|
||||
- ["log/slog", "Logger", True, "LogAttrs", "", "", "Argument[2..3]", "log-injection", "manual"]
|
||||
# With/WithGroup add attributes that are included in every subsequent log call.
|
||||
- ["log/slog", "", False, "With", "", "", "Argument[0]", "log-injection", "manual"]
|
||||
- ["log/slog", "Logger", True, "With", "", "", "Argument[0]", "log-injection", "manual"]
|
||||
- ["log/slog", "Logger", True, "WithGroup", "", "", "Argument[0]", "log-injection", "manual"]
|
||||
- addsTo:
|
||||
pack: codeql/go-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
# Constructors for Attr that can carry a tainted string into the result.
|
||||
- ["log/slog", "", False, "Any", "", "", "Argument[0..1]", "ReturnValue", "taint", "manual"]
|
||||
- ["log/slog", "", False, "Group", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
|
||||
- ["log/slog", "", False, "Group", "", "", "Argument[1].ArrayElement", "ReturnValue", "taint", "manual"]
|
||||
- ["log/slog", "", False, "GroupAttrs", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
|
||||
- ["log/slog", "", False, "GroupAttrs", "", "", "Argument[1].ArrayElement", "ReturnValue", "taint", "manual"]
|
||||
- ["log/slog", "", False, "String", "", "", "Argument[0..1]", "ReturnValue", "taint", "manual"]
|
||||
# Constructors for Value that can carry a tainted string into the result.
|
||||
- ["log/slog", "", False, "AnyValue", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
|
||||
- ["log/slog", "", False, "GroupValue", "", "", "Argument[0].ArrayElement", "ReturnValue", "taint", "manual"]
|
||||
- ["log/slog", "", False, "StringValue", "", "", "Argument[0]", "ReturnValue", "taint", "manual"]
|
||||
# Methods that read a string back out of an Attr or Value.
|
||||
- ["log/slog", "Attr", True, "String", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"]
|
||||
- ["log/slog", "Value", True, "Any", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"]
|
||||
- ["log/slog", "Value", True, "Group", "", "", "Argument[receiver]", "ReturnValue.ArrayElement", "taint", "manual"]
|
||||
- ["log/slog", "Value", True, "String", "", "", "Argument[receiver]", "ReturnValue", "taint", "manual"]
|
||||
|
||||
@@ -37,4 +37,9 @@ func slogTest() {
|
||||
slog.InfoContext(ctx, text, key, v) // $ logger=text logger=key logger=v
|
||||
slog.Log(ctx, slog.LevelInfo, text, key, v) // $ logger=text logger=key logger=v
|
||||
slog.LogAttrs(ctx, slog.LevelInfo, text, attr) // $ logger=text logger=attr
|
||||
|
||||
// With/WithGroup add attributes that are included in every subsequent log call.
|
||||
logger.With(key, v) // $ logger=key logger=v
|
||||
logger.WithGroup(text) // $ logger=text
|
||||
slog.With(key, v) // $ logger=key logger=v
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
reverseRead
|
||||
| test.go:114:21:114:33 | call to Group | Origin of readStep is missing a PostUpdateNode. |
|
||||
@@ -0,0 +1,2 @@
|
||||
invalidModelRow
|
||||
testFailures
|
||||
@@ -0,0 +1,14 @@
|
||||
import go
|
||||
import semmle.go.dataflow.ExternalFlow
|
||||
import ModelValidation
|
||||
import utils.test.InlineFlowTest
|
||||
|
||||
module Config implements DataFlow::ConfigSig {
|
||||
predicate isSource(DataFlow::Node source) {
|
||||
source.(DataFlow::CallNode).getTarget().getName() = ["getUntrustedData", "getUntrustedString"]
|
||||
}
|
||||
|
||||
predicate isSink(DataFlow::Node sink) { sink = any(LoggerCall log).getAMessageComponent() }
|
||||
}
|
||||
|
||||
import FlowTest<Config, Config>
|
||||
@@ -0,0 +1,3 @@
|
||||
module codeql-go-tests/frameworks/slog
|
||||
|
||||
go 1.26
|
||||
115
go/ql/test/library-tests/semmle/go/frameworks/Slog/test.go
Normal file
115
go/ql/test/library-tests/semmle/go/frameworks/Slog/test.go
Normal file
@@ -0,0 +1,115 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log/slog"
|
||||
)
|
||||
|
||||
func main() {}
|
||||
|
||||
func getUntrustedData() interface{} { return nil }
|
||||
|
||||
func getUntrustedString() string {
|
||||
return "tainted string"
|
||||
}
|
||||
|
||||
// Package-level convenience functions.
|
||||
|
||||
func testSlogDebug() {
|
||||
slog.Debug(getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
slog.Debug("msg", "key", getUntrustedData()) // $ hasValueFlow="call to getUntrustedData"
|
||||
slog.Debug("msg", slog.String("key", getUntrustedString())) // $ hasTaintFlow="call to String"
|
||||
}
|
||||
|
||||
func testSlogInfo() {
|
||||
slog.Info(getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
slog.Info("msg", slog.Any("key", getUntrustedData())) // $ hasTaintFlow="call to Any"
|
||||
slog.Info("msg", slog.String("key", getUntrustedString())) // $ hasTaintFlow="call to String"
|
||||
}
|
||||
|
||||
func testSlogWarn() {
|
||||
slog.Warn(getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
slog.Warn("msg", slog.String("key", getUntrustedString())) // $ hasTaintFlow="call to String"
|
||||
}
|
||||
|
||||
func testSlogError() {
|
||||
slog.Error(getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
slog.Error("msg", slog.String("key", getUntrustedString())) // $ hasTaintFlow="call to String"
|
||||
}
|
||||
|
||||
func testSlogContextVariants(ctx context.Context) {
|
||||
slog.DebugContext(ctx, getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
slog.InfoContext(ctx, getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
slog.WarnContext(ctx, getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
slog.ErrorContext(ctx, getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
slog.InfoContext(ctx, "msg", slog.String("key", getUntrustedString())) // $ hasTaintFlow="call to String"
|
||||
}
|
||||
|
||||
func testSlogLog(ctx context.Context) {
|
||||
slog.Log(ctx, slog.LevelInfo, getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
slog.Log(ctx, slog.LevelInfo, "msg", slog.String("key", getUntrustedString())) // $ hasTaintFlow="call to String"
|
||||
slog.LogAttrs(ctx, slog.LevelInfo, getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
slog.LogAttrs(ctx, slog.LevelInfo, "msg", slog.String("key", getUntrustedString())) // $ hasTaintFlow="call to String"
|
||||
}
|
||||
|
||||
// Methods on *slog.Logger.
|
||||
|
||||
func testLoggerMethods(logger *slog.Logger, ctx context.Context) {
|
||||
logger.Debug(getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
logger.Info(getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
logger.Warn(getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
logger.Error(getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
logger.Info("msg", slog.Any("key", getUntrustedData())) // $ hasTaintFlow="call to Any"
|
||||
logger.InfoContext(ctx, getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
logger.Log(ctx, slog.LevelInfo, getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
logger.LogAttrs(ctx, slog.LevelInfo, "msg", slog.String("key", getUntrustedString())) // $ hasTaintFlow="call to String"
|
||||
}
|
||||
|
||||
// With, Logger.With and Logger.WithGroup. Note that for ease of modeling we make these functions
|
||||
// sinks, although strictly speaking we should consider logging functions called on the returned
|
||||
// loggers as the sinks.
|
||||
|
||||
func testWith(logger *slog.Logger) {
|
||||
logger1 := logger.With(slog.String("key", getUntrustedString())) // $ hasTaintFlow="call to String"
|
||||
logger1.Info("hello world")
|
||||
logger2 := logger.With(slog.Any(getUntrustedString(), nil)) // $ hasTaintFlow="call to Any"
|
||||
logger2.Info("hello world")
|
||||
logger.With("key", getUntrustedData()).Info("hello world") // $ hasValueFlow="call to getUntrustedData"
|
||||
}
|
||||
|
||||
func testPackageWith() {
|
||||
logger := slog.With(slog.String("key", getUntrustedString())) // $ hasTaintFlow="call to String"
|
||||
logger.Info("hello world")
|
||||
slog.With("key", getUntrustedData()).Info("hello world") // $ hasValueFlow="call to getUntrustedData"
|
||||
}
|
||||
|
||||
func testWithGroup(logger *slog.Logger) {
|
||||
grouped := logger.WithGroup(getUntrustedString()) // $ hasValueFlow="call to getUntrustedString"
|
||||
grouped.Info("hello world")
|
||||
}
|
||||
|
||||
// Summary models: functions relating to Attr/Value that propagate strings.
|
||||
|
||||
func testAttrConstructors(logger *slog.Logger) {
|
||||
logger.Info("msg", slog.Group("group", slog.String("key", getUntrustedString()))) // $ hasTaintFlow="call to Group"
|
||||
logger.Info("msg", slog.GroupAttrs("group", slog.String("key", getUntrustedString()))) // $ hasTaintFlow="call to GroupAttrs"
|
||||
}
|
||||
|
||||
func testValueConstructors(logger *slog.Logger) {
|
||||
logger.Info("msg", "key", slog.AnyValue(getUntrustedString())) // $ hasTaintFlow="call to AnyValue"
|
||||
logger.Info("msg", "key", slog.StringValue(getUntrustedString())) // $ hasTaintFlow="call to StringValue"
|
||||
attr := slog.String("key", getUntrustedString())
|
||||
logger.Info("msg", "key", slog.GroupValue(attr)) // $ hasTaintFlow="call to GroupValue"
|
||||
}
|
||||
|
||||
func testAttrAndValueAccessors(logger *slog.Logger) {
|
||||
attr := slog.String("key", getUntrustedString())
|
||||
logger.Info("msg", "key", attr.String()) // $ hasTaintFlow="call to String"
|
||||
|
||||
v := slog.AnyValue(getUntrustedString())
|
||||
logger.Info("msg", "key", v.Any()) // $ hasTaintFlow="call to Any"
|
||||
logger.Info("msg", "key", v.String()) // $ hasTaintFlow="call to String"
|
||||
|
||||
group := slog.GroupValue(slog.String("key", getUntrustedString()))
|
||||
logger.Info("msg", group.Group()[0]) // $ hasTaintFlow="index expression"
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
|
||||
# Generated from https://github.com/apache/avro#0f18ca801f25fa9435d727abba9fb979f9bde662 by codeql-mads-via-llm
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["org.apache.avro.data", "Json$ObjectReader", True, "read", "(Object,Decoder)", "", "Argument[1]", "ReturnValue", "taint", "ai-generated"]
|
||||
- ["org.apache.avro.data", "Json$ObjectReader", True, "setSchema", "(Schema)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.data", "TimeConversions$TimeMicrosConversion", True, "adjustAndSetValue", "(String,String)", "", "Argument[0]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.data", "TimeConversions$TimeMicrosConversion", True, "adjustAndSetValue", "(String,String)", "", "Argument[1]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.data", "TimeConversions$TimeMillisConversion", True, "adjustAndSetValue", "(String,String)", "", "Argument[0]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.data", "TimeConversions$TimeMillisConversion", True, "adjustAndSetValue", "(String,String)", "", "Argument[1]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.data", "TimeConversions$TimestampMicrosConversion", True, "adjustAndSetValue", "(String,String)", "", "Argument[0]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.data", "TimeConversions$TimestampMicrosConversion", True, "adjustAndSetValue", "(String,String)", "", "Argument[1]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.data", "TimeConversions$TimestampMillisConversion", True, "adjustAndSetValue", "(String,String)", "", "Argument[0]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.data", "TimeConversions$TimestampMillisConversion", True, "adjustAndSetValue", "(String,String)", "", "Argument[1]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.data", "TimeConversions$TimestampNanosConversion", True, "adjustAndSetValue", "(String,String)", "", "Argument[0]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.data", "TimeConversions$TimestampNanosConversion", True, "adjustAndSetValue", "(String,String)", "", "Argument[1]", "ReturnValue", "taint", "dfc-generated"]
|
||||
@@ -1,11 +1,10 @@
|
||||
# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
|
||||
# Generated from https://github.com/apache/avro#0f18ca801f25fa9435d727abba9fb979f9bde662 by codeql-mads-via-llm
|
||||
# Generated from https://github.com/apache/avro.git#68da8fb99da5c482f17853e01e79f714e3717b42 by codeql-mads-via-llm
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: sinkModel
|
||||
data:
|
||||
- ["org.apache.avro.file", "DataFileReader", True, "DataFileReader", "(File,DatumReader)", "", "Argument[0]", "path-injection", "ai-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader", True, "openReader", "(File,DatumReader)", "", "Argument[0]", "path-injection", "ai-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "appendTo", "(File)", "", "Argument[0]", "path-injection", "ai-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,File)", "", "Argument[1]", "path-injection", "ai-generated"]
|
||||
@@ -18,75 +17,13 @@ extensions:
|
||||
pack: codeql/java-all
|
||||
extensible: sourceModel
|
||||
data:
|
||||
- ["org.apache.avro.file", "DataFileReader", True, "DataFileReader", "(File,DatumReader)", "", "Argument[this]", "file", "ai-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader", True, "openReader", "(File,DatumReader)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro.file", "SeekableFileInput", True, "SeekableFileInput", "(File)", "", "Argument[this]", "file", "ai-generated"]
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["org.apache.avro.file", "Codec", True, "compress", "(ByteBuffer)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "Codec", True, "decompress", "(ByteBuffer)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader", True, "DataFileReader", "(File,DatumReader)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader", True, "DataFileReader", "(SeekableInput,DatumReader)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader", True, "DataFileReader", "(SeekableInput,DatumReader)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader", True, "openReader", "(File,DatumReader)", "", "Argument[0]", "ReturnValue", "taint", "ai-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader", True, "openReader", "(File,DatumReader)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader", True, "openReader", "(SeekableInput,DatumReader)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader", True, "openReader", "(SeekableInput,DatumReader)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader", True, "openReader", "(SeekableInput,DatumReader,DataFileStream$Header,boolean)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader", True, "openReader", "(SeekableInput,DatumReader,DataFileStream$Header,boolean)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader", True, "openReader", "(SeekableInput,DatumReader,DataFileStream$Header,boolean)", "", "Argument[2]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader12", True, "DataFileReader12", "(SeekableInput,DatumReader)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader12", True, "DataFileReader12", "(SeekableInput,DatumReader)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader12", True, "DataFileReader12", "(SeekableInput,DatumReader)", "", "Argument[this]", "Argument[1]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader12", True, "getMeta", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader12", True, "getMetaString", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader12", True, "getSchema", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader12", True, "next", "(Object)", "", "Argument[0]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader12", True, "next", "(Object)", "", "Argument[this]", "Argument[0]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader12", True, "next", "(Object)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "DataFileStream", "(InputStream,DatumReader)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "DataFileStream", "(InputStream,DatumReader)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "getHeader", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "getMeta", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "getMetaKeys", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "getMetaString", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "getSchema", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "next", "(Object)", "", "Argument[0]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "next", "(Object)", "", "Argument[this]", "Argument[0]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "next", "(Object)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "nextBlock", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "DataFileWriter", "(DatumWriter)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "append", "(Object)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "appendAllFrom", "(DataFileStream,boolean)", "", "Argument[0].Element", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "appendEncoded", "(ByteBuffer)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "appendTo", "(File)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "appendTo", "(SeekableInput,OutputStream)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,File)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,File)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,File)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,File)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,File)", "", "Argument[this]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,OutputStream)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,OutputStream)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,OutputStream)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,OutputStream)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,OutputStream)", "", "Argument[this]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,OutputStream,byte[])", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,OutputStream,byte[])", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,OutputStream,byte[])", "", "Argument[2]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "create", "(Schema,OutputStream,byte[])", "", "Argument[this]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "setCodec", "(CodecFactory)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "setEncoder", "(Function)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "setMeta", "(String,String)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "setMeta", "(String,byte[])", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "setMeta", "(String,long)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter", True, "setSyncInterval", "(int)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "DataFileWriter$AppendWriteException", True, "AppendWriteException", "(Exception)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "SeekableByteArrayInput", True, "SeekableByteArrayInput", "(byte[])", "", "Argument[0]", "Argument[this]", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "SyncableFileOutputStream", True, "SyncableFileOutputStream", "(File)", "", "Argument[0]", "Argument[this]", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "SyncableFileOutputStream", True, "SyncableFileOutputStream", "(File,boolean)", "", "Argument[0]", "Argument[this]", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "SyncableFileOutputStream", True, "SyncableFileOutputStream", "(FileDescriptor)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.file", "SyncableFileOutputStream", True, "SyncableFileOutputStream", "(String)", "", "Argument[0]", "Argument[this]", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "SyncableFileOutputStream", True, "SyncableFileOutputStream", "(String,boolean)", "", "Argument[0]", "Argument[this]", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader12", True, "getMeta", "(String)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader12", True, "getMetaString", "(String)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader12", True, "next", "()", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro.file", "DataFileReader12", True, "next", "(Object)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "getMeta", "(String)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "getMetaString", "(String)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "next", "()", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "next", "(Object)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro.file", "DataFileStream", True, "nextBlock", "()", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro.file", "FileReader", True, "next", "(Object)", "", "ReturnValue", "file", "ai-generated"]
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
|
||||
# Generated from https://github.com/apache/avro#0f18ca801f25fa9435d727abba9fb979f9bde662 by codeql-mads-via-llm
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["org.apache.avro.generic", "GenericData", True, "GenericData", "(ClassLoader)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData.classLoader]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "addLogicalTypeConversion", "(Conversion)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "createDatumReader", "(Schema)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "createDatumReader", "(Schema)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "createDatumReader", "(Schema,Schema)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "createDatumReader", "(Schema,Schema)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "createDatumReader", "(Schema,Schema)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "createDatumWriter", "(Schema)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "createDatumWriter", "(Schema)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "createEnum", "(String,Schema)", "", "Argument[1]", "ReturnValue.SyntheticField[org.apache.avro.generic.GenericData$EnumSymbol.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "createFixed", "(Object,Schema)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "createFixed", "(Object,Schema)", "", "Argument[1]", "ReturnValue.SyntheticField[org.apache.avro.generic.GenericData$Fixed.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "createFixed", "(Object,byte[],Schema)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "createString", "(Object)", "", "Argument[0]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "deepCopy", "(Schema,Object)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "deepCopy", "(Schema,Object)", "", "Argument[1]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "getClassLoader", "()", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData.classLoader]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "getConversionByClass", "(Class)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "getConversionByClass", "(Class,LogicalType)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "getConversionFor", "(LogicalType)", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "getConversions", "()", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "ReturnValue.Element", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "getDefaultValue", "(Schema$Field)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "getFastReaderBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "getField", "(Object,String,int)", "", "Argument[0].SyntheticField[org.apache.avro.generic.GenericData$Record.values].ArrayElement", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "induce", "(Object)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "induce", "(Object)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "newArray", "(Object,int,Schema)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "newMap", "(Object,int)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "newRecord", "(Object,Schema)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "newRecord", "(Object,Schema)", "", "Argument[1]", "ReturnValue.SyntheticField[org.apache.avro.generic.GenericData$Record.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "setFastReaderEnabled", "(boolean)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "setField", "(Object,String,int,Object)", "", "Argument[3]", "Argument[0]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData", True, "toString", "(Object)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$AbstractArray", True, "AbstractArray", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$AbstractArray.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$AbstractArray", True, "getSchema", "()", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$AbstractArray.schema]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Array", True, "Array", "(Schema,Collection)", "", "Argument[1].Element", "Argument[this].Element", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Array", True, "Array", "(int,Schema)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Array", True, "peek", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$EnumSymbol", True, "EnumSymbol", "(Schema,Object)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$EnumSymbol.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$EnumSymbol", True, "EnumSymbol", "(Schema,String)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$EnumSymbol.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$EnumSymbol", True, "getSchema", "()", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$EnumSymbol.schema]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Fixed", True, "Fixed", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Fixed.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Fixed", True, "Fixed", "(Schema,byte[])", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Fixed.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Fixed", True, "Fixed", "(Schema,byte[])", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Fixed.bytes]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Fixed", True, "bytes", "()", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Fixed.bytes]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Fixed", True, "bytes", "(byte[])", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Fixed.bytes]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Fixed", True, "getSchema", "()", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Fixed.schema]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$InstanceSupplier", True, "newInstance", "(Object,Schema)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Record", True, "Record", "(GenericData$Record,boolean)", "", "Argument[0].SyntheticField[org.apache.avro.generic.GenericData$Record.schema]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Record.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Record", True, "Record", "(GenericData$Record,boolean)", "", "Argument[0].SyntheticField[org.apache.avro.generic.GenericData$Record.values]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Record.values]", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Record", True, "Record", "(GenericData$Record,boolean)", "", "Argument[0].SyntheticField[org.apache.avro.generic.GenericData$Record.values].ArrayElement", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Record.values].ArrayElement", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Record", True, "Record", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Record.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Record", True, "get", "(String)", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Record.values].ArrayElement", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Record", True, "get", "(int)", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Record.values].ArrayElement", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Record", True, "getSchema", "()", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Record.schema]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Record", True, "put", "(String,Object)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Record.values].ArrayElement", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericData$Record", True, "put", "(int,Object)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericData$Record.values].ArrayElement", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "GenericDatumReader", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.actual]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "GenericDatumReader", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.expected]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "GenericDatumReader", "(Schema,Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.actual]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "GenericDatumReader", "(Schema,Schema)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.expected]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "GenericDatumReader", "(Schema,Schema,GenericData)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.actual]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "GenericDatumReader", "(Schema,Schema,GenericData)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.expected]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "GenericDatumReader", "(Schema,Schema,GenericData)", "", "Argument[2]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.data]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "getData", "()", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.data]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "getExpected", "()", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.expected]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "getSchema", "()", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.actual]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "read", "(Object,Decoder)", "", "Argument[0]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "read", "(Object,Decoder)", "", "Argument[1]", "Argument[0]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "read", "(Object,Decoder)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "read", "(Object,Decoder)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "setExpected", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.expected]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "setSchema", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.actual]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumReader", True, "setSchema", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.expected]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumWriter", True, "GenericDatumWriter", "(Schema)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumWriter", True, "GenericDatumWriter", "(Schema,GenericData)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumWriter.data]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumWriter", True, "getData", "()", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumWriter.data]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumWriter", True, "setSchema", "(Schema)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericDatumWriter", True, "write", "(Object,Encoder)", "", "Argument[0]", "Argument[1]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericRecordBuilder", True, "GenericRecordBuilder", "(GenericData$Record)", "", "Argument[0].SyntheticField[org.apache.avro.generic.GenericData$Record.schema]", "Argument[this].SyntheticField[org.apache.avro.data.RecordBuilderBase.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericRecordBuilder", True, "GenericRecordBuilder", "(GenericRecordBuilder)", "", "Argument[0].SyntheticField[org.apache.avro.data.RecordBuilderBase.schema]", "Argument[this].SyntheticField[org.apache.avro.data.RecordBuilderBase.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericRecordBuilder", True, "GenericRecordBuilder", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.data.RecordBuilderBase.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericRecordBuilder", True, "build", "()", "", "Argument[this].SyntheticField[org.apache.avro.data.RecordBuilderBase.schema]", "ReturnValue.SyntheticField[org.apache.avro.generic.GenericData$Record.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericRecordBuilder", True, "clear", "(Schema$Field)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericRecordBuilder", True, "clear", "(String)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericRecordBuilder", True, "get", "(Schema$Field)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericRecordBuilder", True, "get", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.generic", "GenericRecordBuilder", True, "set", "(Schema$Field,Object)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "GenericRecordBuilder", True, "set", "(String,Object)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.generic", "PrimitivesArrays", True, "createOptimizedArray", "(int,Schema,Schema$Type)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
@@ -1,64 +0,0 @@
|
||||
# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
|
||||
# Generated from https://github.com/apache/avro#0f18ca801f25fa9435d727abba9fb979f9bde662 by codeql-mads-via-llm
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["org.apache.avro.io", "BinaryDecoder", True, "inputStream", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "BlockingDirectBinaryEncoder", True, "BlockingDirectBinaryEncoder", "(OutputStream)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "Decoder", True, "readBytes", "(ByteBuffer)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "Decoder", True, "readFixed", "(byte[])", "", "Argument[this]", "Argument[0]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "Decoder", True, "readFixed", "(byte[],int,int)", "", "Argument[this]", "Argument[0]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "Decoder", True, "readString", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "Decoder", True, "readString", "(Utf8)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "DecoderFactory", True, "binaryDecoder", "(InputStream,BinaryDecoder)", "", "Argument[1]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "DecoderFactory", True, "binaryDecoder", "(byte[],BinaryDecoder)", "", "Argument[1]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "DecoderFactory", True, "binaryDecoder", "(byte[],int,int,BinaryDecoder)", "", "Argument[3]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "DecoderFactory", True, "configureDecoderBufferSize", "(int)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "DecoderFactory", True, "createBinaryDecoder", "(InputStream,BinaryDecoder)", "", "Argument[1]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "DecoderFactory", True, "createBinaryDecoder", "(byte[],BinaryDecoder)", "", "Argument[1]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "DecoderFactory", True, "createBinaryDecoder", "(byte[],int,int,BinaryDecoder)", "", "Argument[3]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "DecoderFactory", True, "directBinaryDecoder", "(InputStream,BinaryDecoder)", "", "Argument[1]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "DecoderFactory", True, "jsonDecoder", "(Schema,InputStream)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "DecoderFactory", True, "jsonDecoder", "(Schema,String)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "DecoderFactory", True, "resolvingDecoder", "(Schema,Schema,Decoder)", "", "Argument[2]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "DecoderFactory", True, "validatingDecoder", "(Schema,Decoder)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "Encoder", True, "writeBytes", "(ByteBuffer)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "Encoder", True, "writeBytes", "(byte[])", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "Encoder", True, "writeBytes", "(byte[],int,int)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "Encoder", True, "writeFixed", "(ByteBuffer)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "Encoder", True, "writeFixed", "(byte[])", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "Encoder", True, "writeFixed", "(byte[],int,int)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "Encoder", True, "writeString", "(CharSequence)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "Encoder", True, "writeString", "(String)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "Encoder", True, "writeString", "(Utf8)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "EncoderFactory", True, "binaryEncoder", "(OutputStream,BinaryEncoder)", "", "Argument[1]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "EncoderFactory", True, "blockingBinaryEncoder", "(OutputStream,BinaryEncoder)", "", "Argument[1]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "EncoderFactory", True, "blockingDirectBinaryEncoder", "(OutputStream,BinaryEncoder)", "", "Argument[1]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "EncoderFactory", True, "configureBlockSize", "(int)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "EncoderFactory", True, "configureBufferSize", "(int)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "EncoderFactory", True, "directBinaryEncoder", "(OutputStream,BinaryEncoder)", "", "Argument[1]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "EncoderFactory", True, "validatingEncoder", "(Schema,Encoder)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "FastReaderBuilder", True, "FastReaderBuilder", "(GenericData)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "FastReaderBuilder", True, "createDatumReader", "(Schema)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "FastReaderBuilder", True, "createDatumReader", "(Schema,Schema)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "FastReaderBuilder", True, "reusingReader", "(FastReaderBuilder$ReusingFieldReader)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "FastReaderBuilder", True, "withClassPropEnabled", "(boolean)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "FastReaderBuilder", True, "withKeyClassEnabled", "(boolean)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "FastReaderBuilder$ExecutionStep", True, "execute", "(Object,Decoder)", "", "Argument[1]", "Argument[0]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "FastReaderBuilder$FieldReader", True, "read", "(Object,Decoder)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "FastReaderBuilder$MapReader", True, "MapReader", "(FastReaderBuilder$FieldReader,FastReaderBuilder$FieldReader)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "FastReaderBuilder$MapReader", True, "MapReader", "(FastReaderBuilder$FieldReader,FastReaderBuilder$FieldReader)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "FastReaderBuilder$RecordReader", True, "finishInitialization", "(FastReaderBuilder$ExecutionStep[],Schema,GenericData$InstanceSupplier)", "", "Argument[0].ArrayElement", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "FastReaderBuilder$RecordReader", True, "finishInitialization", "(FastReaderBuilder$ExecutionStep[],Schema,GenericData$InstanceSupplier)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "FastReaderBuilder$RecordReader", True, "finishInitialization", "(FastReaderBuilder$ExecutionStep[],Schema,GenericData$InstanceSupplier)", "", "Argument[2]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io", "JsonDecoder", True, "configure", "(InputStream)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "JsonDecoder", True, "configure", "(String)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "JsonEncoder", True, "configure", "(OutputStream)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "JsonEncoder", True, "configure", "(OutputStream,boolean)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "ResolvingDecoder", True, "doAction", "(Symbol,Symbol)", "", "Argument[1].Field[org.apache.avro.io.parsing.Symbol$DefaultStartAction.contents]", "Argument[this].SyntheticField[org.apache.avro.io.ValidatingDecoder.in].SyntheticField[org.apache.avro.io.BinaryDecoder.buf]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "ResolvingDecoder", True, "doAction", "(Symbol,Symbol)", "", "Argument[1].Field[org.apache.avro.io.parsing.Symbol$ResolvingAction.writer]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "ResolvingDecoder", True, "readString", "()", "", "Argument[this].SyntheticField[org.apache.avro.io.ValidatingDecoder.in].SyntheticField[org.apache.avro.io.BinaryDecoder.buf]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "ValidatingDecoder", True, "configure", "(Decoder)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io", "ValidatingEncoder", True, "configure", "(Encoder)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
@@ -1,53 +0,0 @@
|
||||
# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
|
||||
# Generated from https://github.com/apache/avro#0f18ca801f25fa9435d727abba9fb979f9bde662 by codeql-mads-via-llm
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["org.apache.avro.io.parsing", "JsonGrammarGenerator", True, "generate", "(Schema,Map)", "", "Argument[0]", "Argument[1].MapKey.Field[org.apache.avro.io.parsing.ValidatingGrammarGenerator$LitS.actual]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Parser", True, "Parser", "(Symbol,Parser$ActionHandler)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.io.parsing.Parser.stack].ArrayElement", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Parser", True, "advance", "(Symbol)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Parser", True, "advance", "(Symbol)", "", "Argument[this].SyntheticField[org.apache.avro.io.parsing.Parser.stack].ArrayElement", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Parser", True, "popSymbol", "()", "", "Argument[this].SyntheticField[org.apache.avro.io.parsing.Parser.stack].ArrayElement", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Parser", True, "pushProduction", "(Symbol)", "", "Argument[0].Field[org.apache.avro.io.parsing.Symbol.production]", "Argument[this].SyntheticField[org.apache.avro.io.parsing.Parser.stack]", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Parser", True, "pushSymbol", "(Symbol)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.io.parsing.Parser.stack].ArrayElement", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Parser", True, "topSymbol", "()", "", "Argument[this].SyntheticField[org.apache.avro.io.parsing.Parser.stack].ArrayElement", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Parser$ActionHandler", True, "doAction", "(Symbol,Symbol)", "", "Argument[1]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "SkipParser", True, "SkipParser", "(Symbol,Parser$ActionHandler,SkipParser$SkipHandler)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io.parsing", "SkipParser", True, "SkipParser", "(Symbol,Parser$ActionHandler,SkipParser$SkipHandler)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io.parsing", "SkipParser", True, "SkipParser", "(Symbol,Parser$ActionHandler,SkipParser$SkipHandler)", "", "Argument[2]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io.parsing", "SkipParser", True, "skipSymbol", "(Symbol)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol", True, "defaultStartAction", "(byte[])", "", "Argument[0]", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol$DefaultStartAction.contents]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol", True, "enumAdjustAction", "(int,Object[])", "", "Argument[1]", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol$EnumAdjustAction.adjustments]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol", True, "enumLabelsAction", "(List)", "", "Argument[0]", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol$EnumLabelsAction.symbols]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol", True, "fieldAdjustAction", "(int,String,Set)", "", "Argument[1]", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol$FieldAdjustAction.fname]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol", True, "fieldAdjustAction", "(int,String,Set)", "", "Argument[2]", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol$FieldAdjustAction.aliases]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol", True, "fieldOrderAction", "(Schema$Field[])", "", "Argument[0]", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol$FieldOrderAction.fields]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol", True, "flatten", "(Map,Map)", "", "Argument[0].MapValue", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol", True, "flatten", "(Map,Map)", "", "Argument[this]", "Argument[0].MapKey", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol", True, "flatten", "(Map,Map)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol", True, "skipAction", "(Symbol)", "", "Argument[0]", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol$SkipAction.symToSkip]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol", True, "unionAdjustAction", "(int,Symbol)", "", "Argument[1]", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol$UnionAdjustAction.symToParse]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$Alternative", True, "flatten", "(Map,Map)", "", "Argument[0].MapValue", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol$Alternative.symbols].ArrayElement", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$Alternative", True, "flatten", "(Map,Map)", "", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$Alternative.labels]", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol$Alternative.labels]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$Alternative", True, "flatten", "(Map,Map)", "", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$Alternative.symbols].ArrayElement", "Argument[0].MapKey", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$Alternative", True, "flatten", "(Map,Map)", "", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$Alternative.symbols].ArrayElement", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol$Alternative.symbols].ArrayElement", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$Alternative", True, "getLabel", "(int)", "", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$Alternative.labels].ArrayElement", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$Alternative", True, "getSymbol", "(int)", "", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$Alternative.symbols].ArrayElement", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$DefaultStartAction", True, "DefaultStartAction", "(byte[])", "", "Argument[0]", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$DefaultStartAction.contents]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$EnumAdjustAction", True, "EnumAdjustAction", "(int,Object[])", "", "Argument[1]", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$EnumAdjustAction.adjustments]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$EnumLabelsAction", True, "EnumLabelsAction", "(List)", "", "Argument[0]", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$EnumLabelsAction.symbols]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$EnumLabelsAction", True, "getLabel", "(int)", "", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$EnumLabelsAction.symbols].Element", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$FieldAdjustAction", True, "FieldAdjustAction", "(int,String,Set)", "", "Argument[1]", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$FieldAdjustAction.fname]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$FieldAdjustAction", True, "FieldAdjustAction", "(int,String,Set)", "", "Argument[2]", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$FieldAdjustAction.aliases]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$FieldOrderAction", False, "FieldOrderAction", "(Schema$Field[])", "", "Argument[0]", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$FieldOrderAction.fields]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$Repeater", True, "flatten", "(Map,Map)", "", "Argument[0].MapValue", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol.production].ArrayElement", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$Repeater", True, "flatten", "(Map,Map)", "", "Argument[0].MapValue.Field[org.apache.avro.io.parsing.Symbol.production]", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol.production]", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$Repeater", True, "flatten", "(Map,Map)", "", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$Repeater.end]", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol$Repeater.end]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$Repeater", True, "flatten", "(Map,Map)", "", "Argument[this].Field[org.apache.avro.io.parsing.Symbol.production].ArrayElement", "Argument[0].MapKey", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$Repeater", True, "flatten", "(Map,Map)", "", "Argument[this].Field[org.apache.avro.io.parsing.Symbol.production].ArrayElement", "ReturnValue.Field[org.apache.avro.io.parsing.Symbol.production].ArrayElement", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$SkipAction", True, "SkipAction", "(Symbol)", "", "Argument[0]", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$SkipAction.symToSkip]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "Symbol$UnionAdjustAction", True, "UnionAdjustAction", "(int,Symbol)", "", "Argument[1]", "Argument[this].Field[org.apache.avro.io.parsing.Symbol$UnionAdjustAction.symToParse]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "ValidatingGrammarGenerator", True, "generate", "(Schema,Map)", "", "Argument[0]", "Argument[1].MapKey.Field[org.apache.avro.io.parsing.ValidatingGrammarGenerator$LitS.actual]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.io.parsing", "ValidatingGrammarGenerator", True, "generate", "(Schema,Map)", "", "Argument[1].MapValue", "ReturnValue", "value", "dfc-generated"]
|
||||
@@ -1,38 +0,0 @@
|
||||
# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
|
||||
# Generated from https://github.com/apache/avro#0f18ca801f25fa9435d727abba9fb979f9bde662 by codeql-mads-via-llm
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["org.apache.avro.message", "BadHeaderException", True, "BadHeaderException", "(String)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "BinaryMessageDecoder", True, "BinaryMessageDecoder", "(GenericData,Schema)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "BinaryMessageDecoder", True, "BinaryMessageDecoder", "(GenericData,Schema)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "BinaryMessageDecoder", True, "BinaryMessageDecoder", "(GenericData,Schema,SchemaStore)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "BinaryMessageDecoder", True, "BinaryMessageDecoder", "(GenericData,Schema,SchemaStore)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "BinaryMessageDecoder", True, "BinaryMessageDecoder", "(GenericData,Schema,SchemaStore)", "", "Argument[2]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "BinaryMessageDecoder", True, "decode", "(InputStream,Object)", "", "Argument[1]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro.message", "BinaryMessageEncoder", True, "encode", "(Object)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "BinaryMessageEncoder", True, "encode", "(Object,OutputStream)", "", "Argument[this]", "Argument[1]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "MessageDecoder$BaseDecoder", True, "decode", "(ByteBuffer)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "MessageDecoder$BaseDecoder", True, "decode", "(ByteBuffer,Object)", "", "Argument[1]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro.message", "MessageDecoder$BaseDecoder", True, "decode", "(ByteBuffer,Object)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "MessageDecoder$BaseDecoder", True, "decode", "(InputStream)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "MessageDecoder$BaseDecoder", True, "decode", "(byte[])", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "MessageDecoder$BaseDecoder", True, "decode", "(byte[],Object)", "", "Argument[1]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro.message", "MessageDecoder$BaseDecoder", True, "decode", "(byte[],Object)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "MissingSchemaException", True, "MissingSchemaException", "(String)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "RawMessageDecoder", True, "RawMessageDecoder", "(GenericData,Schema)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "RawMessageDecoder", True, "RawMessageDecoder", "(GenericData,Schema)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "RawMessageDecoder", True, "RawMessageDecoder", "(GenericData,Schema,Schema)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "RawMessageDecoder", True, "RawMessageDecoder", "(GenericData,Schema,Schema)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "RawMessageDecoder", True, "RawMessageDecoder", "(GenericData,Schema,Schema)", "", "Argument[2]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "RawMessageDecoder", True, "decode", "(InputStream,Object)", "", "Argument[1]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro.message", "RawMessageDecoder", True, "decode", "(InputStream,Object)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "RawMessageEncoder", True, "RawMessageEncoder", "(GenericData,Schema)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "RawMessageEncoder", True, "RawMessageEncoder", "(GenericData,Schema)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "RawMessageEncoder", True, "RawMessageEncoder", "(GenericData,Schema,boolean)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "RawMessageEncoder", True, "RawMessageEncoder", "(GenericData,Schema,boolean)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "RawMessageEncoder", True, "encode", "(Object)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.message", "SchemaStore$Cache", True, "addSchema", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.message.SchemaStore$Cache.schemas].MapValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.message", "SchemaStore$Cache", True, "findByFingerprint", "(long)", "", "Argument[this].SyntheticField[org.apache.avro.message.SchemaStore$Cache.schemas].MapValue", "ReturnValue", "value", "dfc-generated"]
|
||||
@@ -1,5 +1,5 @@
|
||||
# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
|
||||
# Generated from https://github.com/apache/avro#0f18ca801f25fa9435d727abba9fb979f9bde662 by codeql-mads-via-llm
|
||||
# Generated from https://github.com/apache/avro.git#68da8fb99da5c482f17853e01e79f714e3717b42 by codeql-mads-via-llm
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
@@ -12,419 +12,18 @@ extensions:
|
||||
- ["org.apache.avro", "SchemaParser", True, "parse", "(File,Charset)", "", "Argument[0]", "path-injection", "ai-generated"]
|
||||
- ["org.apache.avro", "SchemaParser", True, "parse", "(Path)", "", "Argument[0]", "path-injection", "ai-generated"]
|
||||
- ["org.apache.avro", "SchemaParser", True, "parse", "(Path,Charset)", "", "Argument[0]", "path-injection", "ai-generated"]
|
||||
- ["org.apache.avro", "SchemaParser", True, "parse", "(URI,Charset)", "", "Argument[0]", "path-injection", "ai-generated"]
|
||||
- ["org.apache.avro", "SchemaParser", True, "parse", "(URI,Charset)", "", "Argument[0]", "request-forgery", "ai-generated"]
|
||||
- ["org.apache.avro", "SchemaParser", True, "parseSingle", "(Path)", "", "Argument[0]", "path-injection", "ai-generated"]
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: sourceModel
|
||||
data:
|
||||
- ["org.apache.avro", "Protocol", True, "main", "(String[])", "", "Parameter[0]", "commandargs", "ai-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "parse", "(File)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "parse", "(File)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro", "Schema$Parser", True, "parse", "(File)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro", "SchemaParser", True, "parse", "(File)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro", "SchemaParser", True, "parse", "(File,Charset)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro", "SchemaParser", True, "parse", "(Path)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro", "SchemaParser", True, "parse", "(Path,Charset)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- ["org.apache.avro", "SchemaParser", True, "parse", "(URI,Charset)", "", "ReturnValue", "remote", "ai-generated"]
|
||||
- ["org.apache.avro", "SchemaParser", True, "parseSingle", "(Path)", "", "ReturnValue", "file", "ai-generated"]
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["org.apache.avro", "AvroMissingFieldException", True, "AvroMissingFieldException", "(String,Schema$Field)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "AvroMissingFieldException", True, "AvroMissingFieldException", "(String,Schema$Field)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "AvroMissingFieldException", True, "addParentField", "(Schema$Field)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "AvroRemoteException", True, "AvroRemoteException", "(Object)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.AvroRemoteException.value]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "AvroRemoteException", True, "AvroRemoteException", "(Object,Throwable)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.AvroRemoteException.value]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "AvroRemoteException", True, "AvroRemoteException", "(Throwable)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "AvroRemoteException", True, "getValue", "()", "", "Argument[this].SyntheticField[org.apache.avro.AvroRemoteException.value]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "AvroRuntimeException", True, "AvroRuntimeException", "(String)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "AvroRuntimeException", True, "AvroRuntimeException", "(String,Throwable)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "AvroRuntimeException", True, "AvroRuntimeException", "(String,Throwable)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "AvroRuntimeException", True, "AvroRuntimeException", "(Throwable)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "AvroTypeException", True, "AvroTypeException", "(String)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "AvroTypeException", True, "AvroTypeException", "(String,Throwable)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "AvroTypeException", True, "AvroTypeException", "(String,Throwable)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Conversion", True, "adjustAndSetValue", "(String,String)", "", "Argument[0]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro", "Conversion", True, "adjustAndSetValue", "(String,String)", "", "Argument[1]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro", "Conversions", True, "convertToLogicalType", "(Object,Schema,LogicalType,Conversion)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Conversions", True, "convertToRawType", "(Object,Schema,LogicalType,Conversion)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Conversions$DecimalConversion", True, "toFixed", "(BigDecimal,Schema,LogicalType)", "", "Argument[1]", "ReturnValue.SyntheticField[org.apache.avro.generic.GenericData$Fixed.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Conversions$DurationConversion", True, "toFixed", "(TimePeriod,Schema,LogicalType)", "", "Argument[1]", "ReturnValue.SyntheticField[org.apache.avro.generic.GenericData$Fixed.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Conversions$UUIDConversion", True, "toFixed", "(UUID,Schema,LogicalType)", "", "Argument[1]", "ReturnValue.SyntheticField[org.apache.avro.generic.GenericData$Fixed.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "FormattedSchemaParser", True, "parse", "(ParseContext,URI,CharSequence)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "InvalidAvroMagicException", True, "InvalidAvroMagicException", "(String)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "InvalidNumberEncodingException", True, "InvalidNumberEncodingException", "(String)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "JsonProperties", True, "addAllProps", "(JsonProperties)", "", "Argument[0].SyntheticField[org.apache.avro.JsonProperties.props].MapKey", "Argument[this].SyntheticField[org.apache.avro.JsonProperties.props].MapKey", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "JsonProperties", True, "addAllProps", "(JsonProperties)", "", "Argument[0].SyntheticField[org.apache.avro.JsonProperties.props].MapValue", "Argument[this].SyntheticField[org.apache.avro.JsonProperties.props].MapValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "JsonProperties", True, "addProp", "(String,Object)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.JsonProperties.props].MapKey", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "JsonProperties", True, "addProp", "(String,Object)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.JsonProperties.props].MapValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "JsonProperties", True, "addProp", "(String,String)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.JsonProperties.props].MapKey", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "JsonProperties", True, "getObjectProp", "(String,Object)", "", "Argument[1]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "JsonProperties", True, "getObjectProps", "()", "", "Argument[this].SyntheticField[org.apache.avro.JsonProperties.props].MapKey", "ReturnValue.MapKey", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "JsonProperties", True, "putAll", "(JsonProperties)", "", "Argument[0].SyntheticField[org.apache.avro.JsonProperties.props].MapKey", "Argument[this].SyntheticField[org.apache.avro.JsonProperties.props].MapKey", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "JsonProperties", True, "putAll", "(JsonProperties)", "", "Argument[0].SyntheticField[org.apache.avro.JsonProperties.props].MapValue", "Argument[this].SyntheticField[org.apache.avro.JsonProperties.props].MapValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "LogicalType", True, "LogicalType", "(String)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.LogicalType.name]", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro", "LogicalType", True, "addToSchema", "(Schema)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "LogicalType", True, "addToSchema", "(Schema)", "", "Argument[this]", "Argument[0].SyntheticField[org.apache.avro.Schema.logicalType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "LogicalType", True, "addToSchema", "(Schema)", "", "Argument[this]", "ReturnValue.SyntheticField[org.apache.avro.Schema.logicalType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "LogicalType", True, "getName", "()", "", "Argument[this].SyntheticField[org.apache.avro.LogicalType.name]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "LogicalTypes$Decimal", True, "addToSchema", "(Schema)", "", "Argument[this]", "Argument[0].SyntheticField[org.apache.avro.Schema.logicalType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "LogicalTypes$Decimal", True, "addToSchema", "(Schema)", "", "Argument[this]", "ReturnValue.SyntheticField[org.apache.avro.Schema.logicalType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "NameValidator", True, "validate", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "NameValidator$Result", True, "Result", "(String)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.NameValidator$Result.errors]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "NameValidator$Result", True, "getErrors", "()", "", "Argument[this].SyntheticField[org.apache.avro.NameValidator$Result.errors]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "ParseContext", True, "ParseContext", "(NameValidator)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "ParseContext", True, "commit", "()", "", "Argument[this].SyntheticField[org.apache.avro.ParseContext.newSchemas].MapKey", "Argument[this].SyntheticField[org.apache.avro.ParseContext.oldSchemas].MapKey", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "ParseContext", True, "commit", "()", "", "Argument[this].SyntheticField[org.apache.avro.ParseContext.newSchemas].MapValue", "Argument[this].SyntheticField[org.apache.avro.ParseContext.oldSchemas].MapValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "ParseContext", True, "find", "(String,String)", "", "Argument[this].SyntheticField[org.apache.avro.ParseContext.newSchemas].MapValue", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "ParseContext", True, "find", "(String,String)", "", "Argument[this].SyntheticField[org.apache.avro.ParseContext.oldSchemas].MapValue", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "ParseContext", True, "getNamedSchema", "(String)", "", "Argument[this].SyntheticField[org.apache.avro.ParseContext.newSchemas].MapValue", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "ParseContext", True, "getNamedSchema", "(String)", "", "Argument[this].SyntheticField[org.apache.avro.ParseContext.oldSchemas].MapValue", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "ParseContext", True, "put", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.ParseContext.newSchemas].MapValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "ParseContext", True, "resolve", "(Schema)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "ParseContext", True, "resolve", "(Schema)", "", "Argument[this].SyntheticField[org.apache.avro.ParseContext.oldSchemas].MapValue", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "ParseContext", True, "resolveAllSchemas", "()", "", "Argument[this].SyntheticField[org.apache.avro.ParseContext.oldSchemas].MapValue", "ReturnValue.Element", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "ParseContext", True, "typesByName", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "Protocol", "(Protocol)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "Protocol", "(String,String)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.Protocol.name]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "Protocol", "(String,String)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.Protocol.namespace]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "Protocol", "(String,String,String)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.Protocol.name]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "Protocol", "(String,String,String)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.Protocol.doc]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "Protocol", "(String,String,String)", "", "Argument[2]", "Argument[this].SyntheticField[org.apache.avro.Protocol.namespace]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(Protocol$Message,Schema)", "", "Argument[1]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$Message.request]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(Protocol$Message,Schema,Schema,Schema)", "", "Argument[2]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$TwoWayMessage.response]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(Protocol$Message,Schema,Schema,Schema)", "", "Argument[3]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$TwoWayMessage.errors]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,JsonProperties,Schema)", "", "Argument[0]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$Message.name]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,JsonProperties,Schema)", "", "Argument[1]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$Message.doc]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,JsonProperties,Schema)", "", "Argument[3]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$Message.request]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,JsonProperties,Schema,Schema,Schema)", "", "Argument[4]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$TwoWayMessage.response]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,JsonProperties,Schema,Schema,Schema)", "", "Argument[5]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$TwoWayMessage.errors]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,Map,Schema)", "", "Argument[0]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$Message.name]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,Map,Schema)", "", "Argument[1]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$Message.doc]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,Map,Schema)", "", "Argument[3]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$Message.request]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,Map,Schema,Schema,Schema)", "", "Argument[4]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$TwoWayMessage.response]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,Map,Schema,Schema,Schema)", "", "Argument[5]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$TwoWayMessage.errors]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,Schema)", "", "Argument[0]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$Message.name]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,Schema)", "", "Argument[1]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$Message.doc]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,Schema)", "", "Argument[2]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$Message.request]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,Schema,Schema,Schema)", "", "Argument[3]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$TwoWayMessage.response]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "createMessage", "(String,String,Schema,Schema,Schema)", "", "Argument[4]", "ReturnValue.SyntheticField[org.apache.avro.Protocol$TwoWayMessage.errors]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "getDoc", "()", "", "Argument[this].SyntheticField[org.apache.avro.Protocol.doc]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "getMD5", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "getMessages", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "getName", "()", "", "Argument[this].SyntheticField[org.apache.avro.Protocol.name]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "getNamespace", "()", "", "Argument[this].SyntheticField[org.apache.avro.Protocol.namespace]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "getType", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "getTypes", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Protocol", True, "getUnresolvedTypes", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Protocol$Message", True, "getDoc", "()", "", "Argument[this].SyntheticField[org.apache.avro.Protocol$Message.doc]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol$Message", True, "getErrors", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Protocol$Message", True, "getName", "()", "", "Argument[this].SyntheticField[org.apache.avro.Protocol$Message.name]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol$Message", True, "getRequest", "()", "", "Argument[this].SyntheticField[org.apache.avro.Protocol$Message.request]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Protocol$Message", True, "getResponse", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Resolver", True, "resolve", "(Schema,Schema)", "", "Argument[1]", "ReturnValue.Field[org.apache.avro.Resolver$Action.reader]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver", True, "resolve", "(Schema,Schema)", "", "Argument[1].SyntheticField[org.apache.avro.Schema.logicalType]", "ReturnValue.Field[org.apache.avro.Resolver$Action.logicalType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver", True, "resolve", "(Schema,Schema,GenericData)", "", "Argument[1]", "ReturnValue.Field[org.apache.avro.Resolver$Action.reader]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver", True, "resolve", "(Schema,Schema,GenericData)", "", "Argument[1].SyntheticField[org.apache.avro.Schema.logicalType]", "ReturnValue.Field[org.apache.avro.Resolver$Action.logicalType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver", True, "resolve", "(Schema,Schema,GenericData)", "", "Argument[2].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "ReturnValue.Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver", True, "resolve", "(Schema,Schema,GenericData)", "", "Argument[2].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "ReturnValue.Field[org.apache.avro.Resolver$Container.elementAction].Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver", True, "resolve", "(Schema,Schema,GenericData)", "", "Argument[2].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "ReturnValue.Field[org.apache.avro.Resolver$ReaderUnion.actualAction].Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$Container", True, "Container", "(Schema,Schema,GenericData,Resolver$Action)", "", "Argument[0]", "Argument[this].Field[org.apache.avro.Resolver$Action.writer]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$Container", True, "Container", "(Schema,Schema,GenericData,Resolver$Action)", "", "Argument[1]", "Argument[this].Field[org.apache.avro.Resolver$Action.reader]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$Container", True, "Container", "(Schema,Schema,GenericData,Resolver$Action)", "", "Argument[1].SyntheticField[org.apache.avro.Schema.logicalType]", "Argument[this].Field[org.apache.avro.Resolver$Action.logicalType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$Container", True, "Container", "(Schema,Schema,GenericData,Resolver$Action)", "", "Argument[2].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "Argument[this].Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$Container", True, "Container", "(Schema,Schema,GenericData,Resolver$Action)", "", "Argument[3]", "Argument[this].Field[org.apache.avro.Resolver$Container.elementAction]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$DoNothing", True, "DoNothing", "(Schema,Schema,GenericData)", "", "Argument[0]", "Argument[this].Field[org.apache.avro.Resolver$Action.writer]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$DoNothing", True, "DoNothing", "(Schema,Schema,GenericData)", "", "Argument[1]", "Argument[this].Field[org.apache.avro.Resolver$Action.reader]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$DoNothing", True, "DoNothing", "(Schema,Schema,GenericData)", "", "Argument[1].SyntheticField[org.apache.avro.Schema.logicalType]", "Argument[this].Field[org.apache.avro.Resolver$Action.logicalType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$DoNothing", True, "DoNothing", "(Schema,Schema,GenericData)", "", "Argument[2].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "Argument[this].Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$EnumAdjust", True, "resolve", "(Schema,Schema,GenericData)", "", "Argument[0]", "ReturnValue.Field[org.apache.avro.Resolver$Action.writer]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$EnumAdjust", True, "resolve", "(Schema,Schema,GenericData)", "", "Argument[1]", "ReturnValue.Field[org.apache.avro.Resolver$Action.reader]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$EnumAdjust", True, "resolve", "(Schema,Schema,GenericData)", "", "Argument[1].SyntheticField[org.apache.avro.Schema.logicalType]", "ReturnValue.Field[org.apache.avro.Resolver$Action.logicalType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$EnumAdjust", True, "resolve", "(Schema,Schema,GenericData)", "", "Argument[2].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "ReturnValue.Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ErrorAction", True, "ErrorAction", "(Schema,Schema,GenericData,Resolver$ErrorAction$ErrorType)", "", "Argument[0]", "Argument[this].Field[org.apache.avro.Resolver$Action.writer]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ErrorAction", True, "ErrorAction", "(Schema,Schema,GenericData,Resolver$ErrorAction$ErrorType)", "", "Argument[1]", "Argument[this].Field[org.apache.avro.Resolver$Action.reader]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ErrorAction", True, "ErrorAction", "(Schema,Schema,GenericData,Resolver$ErrorAction$ErrorType)", "", "Argument[1].SyntheticField[org.apache.avro.Schema.logicalType]", "Argument[this].Field[org.apache.avro.Resolver$Action.logicalType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ErrorAction", True, "ErrorAction", "(Schema,Schema,GenericData,Resolver$ErrorAction$ErrorType)", "", "Argument[2].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "Argument[this].Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$Promote", True, "resolve", "(Schema,Schema,GenericData)", "", "Argument[0]", "ReturnValue.Field[org.apache.avro.Resolver$Action.writer]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$Promote", True, "resolve", "(Schema,Schema,GenericData)", "", "Argument[1]", "ReturnValue.Field[org.apache.avro.Resolver$Action.reader]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$Promote", True, "resolve", "(Schema,Schema,GenericData)", "", "Argument[1].SyntheticField[org.apache.avro.Schema.logicalType]", "ReturnValue.Field[org.apache.avro.Resolver$Action.logicalType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$Promote", True, "resolve", "(Schema,Schema,GenericData)", "", "Argument[2].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "ReturnValue.Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ReaderUnion", True, "ReaderUnion", "(Schema,Schema,GenericData,int,Resolver$Action)", "", "Argument[0]", "Argument[this].Field[org.apache.avro.Resolver$Action.writer]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ReaderUnion", True, "ReaderUnion", "(Schema,Schema,GenericData,int,Resolver$Action)", "", "Argument[1]", "Argument[this].Field[org.apache.avro.Resolver$Action.reader]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ReaderUnion", True, "ReaderUnion", "(Schema,Schema,GenericData,int,Resolver$Action)", "", "Argument[1].SyntheticField[org.apache.avro.Schema.logicalType]", "Argument[this].Field[org.apache.avro.Resolver$Action.logicalType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ReaderUnion", True, "ReaderUnion", "(Schema,Schema,GenericData,int,Resolver$Action)", "", "Argument[2].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "Argument[this].Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ReaderUnion", True, "ReaderUnion", "(Schema,Schema,GenericData,int,Resolver$Action)", "", "Argument[4]", "Argument[this].Field[org.apache.avro.Resolver$ReaderUnion.actualAction]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ReaderUnion", True, "resolve", "(Schema,Schema,GenericData,Map)", "", "Argument[1]", "ReturnValue.Field[org.apache.avro.Resolver$Action.reader]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ReaderUnion", True, "resolve", "(Schema,Schema,GenericData,Map)", "", "Argument[1].SyntheticField[org.apache.avro.Schema.logicalType]", "ReturnValue.Field[org.apache.avro.Resolver$Action.logicalType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ReaderUnion", True, "resolve", "(Schema,Schema,GenericData,Map)", "", "Argument[2].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "Argument[3].MapValue.Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ReaderUnion", True, "resolve", "(Schema,Schema,GenericData,Map)", "", "Argument[2].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "ReturnValue.Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ReaderUnion", True, "resolve", "(Schema,Schema,GenericData,Map)", "", "Argument[2].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "ReturnValue.Field[org.apache.avro.Resolver$ReaderUnion.actualAction].Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ReaderUnion", True, "resolve", "(Schema,Schema,GenericData,Map)", "", "Argument[3].MapValue", "ReturnValue.Field[org.apache.avro.Resolver$ReaderUnion.actualAction]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ReaderUnion", True, "resolve", "(Schema,Schema,GenericData,Map)", "", "Argument[3].MapValue", "ReturnValue.Field[org.apache.avro.Resolver$ReaderUnion.actualAction].Field[org.apache.avro.Resolver$Container.elementAction]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$ReaderUnion", True, "resolve", "(Schema,Schema,GenericData,Map)", "", "Argument[3].MapValue", "ReturnValue.Field[org.apache.avro.Resolver$ReaderUnion.actualAction].Field[org.apache.avro.Resolver$ReaderUnion.actualAction]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$Skip", True, "Skip", "(Schema,GenericData)", "", "Argument[0]", "Argument[this].Field[org.apache.avro.Resolver$Action.writer]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$Skip", True, "Skip", "(Schema,GenericData)", "", "Argument[1].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "Argument[this].Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$WriterUnion", True, "resolve", "(Schema,Schema,GenericData,Map)", "", "Argument[0]", "ReturnValue.Field[org.apache.avro.Resolver$Action.writer]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$WriterUnion", True, "resolve", "(Schema,Schema,GenericData,Map)", "", "Argument[2].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "Argument[3].MapValue.Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$WriterUnion", True, "resolve", "(Schema,Schema,GenericData,Map)", "", "Argument[2].SyntheticField[org.apache.avro.generic.GenericData.conversions].MapValue", "ReturnValue.Field[org.apache.avro.Resolver$Action.conversion]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Resolver$WriterUnion", True, "resolve", "(Schema,Schema,GenericData,Map)", "", "Argument[3].MapValue", "ReturnValue.Field[org.apache.avro.Resolver$WriterUnion.actions].ArrayElement", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "addProp", "(String,Object)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.JsonProperties.props].MapKey", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "addProp", "(String,Object)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.JsonProperties.props].MapValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "addProp", "(String,String)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.JsonProperties.props].MapKey", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "applyAliases", "(Schema,Schema)", "", "Argument[0]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "applyAliases", "(Schema,Schema)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createArray", "(Schema)", "", "Argument[0]", "ReturnValue.SyntheticField[org.apache.avro.Schema$ArraySchema.elementType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createEnum", "(String,String,String,List)", "", "Argument[3].Element", "ReturnValue.SyntheticField[org.apache.avro.Schema$EnumSchema.symbols].Element", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createEnum", "(String,String,String,List,String)", "", "Argument[3].Element", "ReturnValue.SyntheticField[org.apache.avro.Schema$EnumSchema.symbols].Element", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createEnum", "(String,String,String,List,String)", "", "Argument[4]", "ReturnValue.SyntheticField[org.apache.avro.Schema$EnumSchema.enumDefault]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createFixed", "(String,String,String,int)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createFixed", "(String,String,String,int)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createFixed", "(String,String,String,int)", "", "Argument[2]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createMap", "(Schema)", "", "Argument[0]", "ReturnValue.SyntheticField[org.apache.avro.Schema$MapSchema.valueType]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createRecord", "(List)", "", "Argument[0].Element", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createRecord", "(String,String,String,boolean)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createRecord", "(String,String,String,boolean)", "", "Argument[1]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createRecord", "(String,String,String,boolean)", "", "Argument[2]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createRecord", "(String,String,String,boolean,List)", "", "Argument[4].Element", "ReturnValue.SyntheticField[org.apache.avro.Schema$RecordSchema.fieldMap].MapValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createRecord", "(String,String,String,boolean,List)", "", "Argument[4].Element", "ReturnValue.SyntheticField[org.apache.avro.Schema$RecordSchema.fields].Element", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "createUnion", "(List)", "", "Argument[0].Element", "ReturnValue.SyntheticField[org.apache.avro.Schema$UnionSchema.types].Element", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "getAliases", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "getDoc", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "getElementType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "getEnumDefault", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "getEnumSymbols", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "getField", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "getFields", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "getFullName", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "getLogicalType", "()", "", "Argument[this].SyntheticField[org.apache.avro.Schema.logicalType]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "getName", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "getNamespace", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "getTypes", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "getValueType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema", True, "setFields", "(List)", "", "Argument[0].Element", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "Field", "(Schema$Field,Schema)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "Field", "(String,Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.name]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "Field", "(String,Schema)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "Field", "(String,Schema,String)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.name]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "Field", "(String,Schema,String)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "Field", "(String,Schema,String)", "", "Argument[2]", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.doc]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "Field", "(String,Schema,String,Object)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.name]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "Field", "(String,Schema,String,Object)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "Field", "(String,Schema,String,Object)", "", "Argument[2]", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.doc]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "Field", "(String,Schema,String,Object,Schema$Field$Order)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.name]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "Field", "(String,Schema,String,Object,Schema$Field$Order)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "Field", "(String,Schema,String,Object,Schema$Field$Order)", "", "Argument[2]", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.doc]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "addAlias", "(String)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.aliases].Element", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "aliases", "()", "", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.aliases].Element", "ReturnValue.Element", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "doc", "()", "", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.doc]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "name", "()", "", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.name]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Field", True, "schema", "()", "", "Argument[this].SyntheticField[org.apache.avro.Schema$Field.schema]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Parser", True, "Parser", "(NameValidator)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema$Parser", True, "Parser", "(ParseContext)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema$Parser", True, "addTypes", "(Iterable)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Parser", True, "addTypes", "(Map)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$Parser", True, "getTypes", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema$Parser", True, "parse", "(File)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema$Parser", True, "parse", "(InputStream)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema$Parser", True, "parse", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema$Parser", True, "parse", "(String,String[])", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema$Parser", True, "parseInternal", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema$Parser", True, "setValidateDefaults", "(boolean)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "Schema$SeenPair", True, "SeenPair", "(Object,Object)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "Schema$SeenPair", True, "SeenPair", "(Object,Object)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder", True, "builder", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder", True, "enumeration", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder", True, "fixed", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder", True, "record", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$ArrayBuilder", False, "ArrayBuilder", "(SchemaBuilder$Completion,SchemaBuilder$NameContext)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$ArrayBuilder", False, "ArrayBuilder", "(SchemaBuilder$Completion,SchemaBuilder$NameContext)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$ArrayBuilder", False, "items", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$ArrayBuilder", False, "items", "(Schema)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$ArrayBuilder", False, "items", "(Schema)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$ArrayDefault", True, "arrayDefault", "(List)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "array", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "booleanBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "booleanType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "bytesBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "bytesType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "doubleBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "doubleType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "enumeration", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "enumeration", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "fixed", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "fixed", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "floatBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "floatType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "intBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "intType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "longBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "longType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "map", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "nullBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "nullType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "record", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "record", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "stringBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseFieldTypeBuilder", True, "stringType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "array", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "booleanBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "booleanType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "bytesBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "bytesType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "doubleBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "doubleType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "enumeration", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "enumeration", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "fixed", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "fixed", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "floatBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "floatType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "intBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "intType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "longBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "longType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "map", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "nullBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "nullType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "record", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "record", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "stringBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "stringType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "type", "(Schema)", "", "Argument[0]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "type", "(Schema)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "type", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BaseTypeBuilder", True, "type", "(String,String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BooleanBuilder", False, "endBoolean", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BooleanDefault", True, "booleanDefault", "(boolean)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BytesBuilder", False, "endBytes", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BytesDefault", True, "bytesDefault", "(ByteBuffer)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BytesDefault", True, "bytesDefault", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$BytesDefault", True, "bytesDefault", "(byte[])", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$DoubleBuilder", False, "endDouble", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$DoubleDefault", True, "doubleDefault", "(double)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$EnumBuilder", False, "defaultSymbol", "(String)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$EnumBuilder", False, "symbols", "(String[])", "", "Argument[0].ArrayElement", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$EnumBuilder", False, "symbols", "(String[])", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$EnumDefault", True, "enumDefault", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldAssembler", False, "endRecord", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldAssembler", False, "name", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldAssembler", False, "name", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldBuilder", False, "notValidatingDefaults", "()", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldBuilder", False, "orderAscending", "()", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldBuilder", False, "orderDescending", "()", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldBuilder", False, "orderIgnore", "()", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldBuilder", False, "type", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldBuilder", False, "type", "(Schema)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldBuilder", False, "type", "(Schema)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldBuilder", False, "type", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldBuilder", False, "type", "(String,String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldBuilder", False, "validatingDefaults", "()", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldDefault", True, "noDefault", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldTypeBuilder", False, "nullable", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldTypeBuilder", False, "optional", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FieldTypeBuilder", False, "unionOf", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FixedBuilder", False, "size", "(int)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FixedDefault", True, "fixedDefault", "(ByteBuffer)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FixedDefault", True, "fixedDefault", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FixedDefault", True, "fixedDefault", "(byte[])", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FloatBuilder", False, "endFloat", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$FloatDefault", True, "floatDefault", "(float)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$GenericDefault", False, "noDefault", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$GenericDefault", False, "withDefault", "(Object)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$IntBuilder", False, "endInt", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$IntDefault", True, "intDefault", "(int)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$LongBuilder", False, "endLong", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$LongDefault", True, "longDefault", "(long)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$MapBuilder", False, "values", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$MapBuilder", False, "values", "(Schema)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$MapBuilder", False, "values", "(Schema)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$MapDefault", True, "mapDefault", "(Map)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$NamedBuilder", True, "aliases", "(String[])", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$NamedBuilder", True, "doc", "(String)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$NamespacedBuilder", True, "namespace", "(String)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$NullBuilder", False, "endNull", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$NullDefault", True, "nullDefault", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$PropBuilder", True, "prop", "(String,Object)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$PropBuilder", True, "prop", "(String,String)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$RecordBuilder", False, "fields", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$RecordDefault", True, "recordDefault", "(GenericRecord)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$StringBldr", False, "endString", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$StringDefault", True, "stringDefault", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$TypeBuilder", False, "nullable", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$TypeBuilder", False, "unionOf", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionAccumulator", False, "and", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionAccumulator", False, "endUnion", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "array", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "booleanBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "booleanType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "bytesBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "bytesType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "doubleBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "doubleType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "enumeration", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "enumeration", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "fixed", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "fixed", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "floatBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "floatType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "intBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "intType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "longBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "longType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "map", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "nullBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "nullType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "record", "(String)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "record", "(String)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "stringBuilder", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilder$UnionFieldTypeBuilder", False, "stringType", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilderException", True, "SchemaBuilderException", "(String)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaBuilderException", True, "SchemaBuilderException", "(Throwable)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility", True, "checkReaderWriterCompatibility", "(Schema,Schema)", "", "Argument[0]", "ReturnValue.SyntheticField[org.apache.avro.SchemaCompatibility$SchemaPairCompatibility.mReader]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility", True, "checkReaderWriterCompatibility", "(Schema,Schema)", "", "Argument[1]", "ReturnValue.SyntheticField[org.apache.avro.SchemaCompatibility$SchemaPairCompatibility.mWriter]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$Incompatibility", False, "getLocation", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$Incompatibility", False, "getMessage", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$Incompatibility", False, "getReaderFragment", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$Incompatibility", False, "getWriterFragment", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$SchemaCompatibilityResult", False, "getIncompatibilities", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$SchemaCompatibilityResult", False, "mergedWith", "(SchemaCompatibility$SchemaCompatibilityResult)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$SchemaCompatibilityResult", False, "mergedWith", "(SchemaCompatibility$SchemaCompatibilityResult)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$SchemaPairCompatibility", False, "SchemaPairCompatibility", "(SchemaCompatibility$SchemaCompatibilityResult,Schema,Schema,String)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.SchemaCompatibility$SchemaPairCompatibility.mResult]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$SchemaPairCompatibility", False, "SchemaPairCompatibility", "(SchemaCompatibility$SchemaCompatibilityResult,Schema,Schema,String)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.SchemaCompatibility$SchemaPairCompatibility.mReader]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$SchemaPairCompatibility", False, "SchemaPairCompatibility", "(SchemaCompatibility$SchemaCompatibilityResult,Schema,Schema,String)", "", "Argument[2]", "Argument[this].SyntheticField[org.apache.avro.SchemaCompatibility$SchemaPairCompatibility.mWriter]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$SchemaPairCompatibility", False, "SchemaPairCompatibility", "(SchemaCompatibility$SchemaCompatibilityResult,Schema,Schema,String)", "", "Argument[3]", "Argument[this].SyntheticField[org.apache.avro.SchemaCompatibility$SchemaPairCompatibility.mDescription]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$SchemaPairCompatibility", False, "getDescription", "()", "", "Argument[this].SyntheticField[org.apache.avro.SchemaCompatibility$SchemaPairCompatibility.mDescription]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$SchemaPairCompatibility", False, "getReader", "()", "", "Argument[this].SyntheticField[org.apache.avro.SchemaCompatibility$SchemaPairCompatibility.mReader]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$SchemaPairCompatibility", False, "getResult", "()", "", "Argument[this].SyntheticField[org.apache.avro.SchemaCompatibility$SchemaPairCompatibility.mResult]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaCompatibility$SchemaPairCompatibility", False, "getWriter", "()", "", "Argument[this].SyntheticField[org.apache.avro.SchemaCompatibility$SchemaPairCompatibility.mWriter]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaParseException", True, "SchemaParseException", "(String)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaParseException", True, "SchemaParseException", "(Throwable)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaParser", True, "SchemaParser", "(NameValidator)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaParser", True, "getParsedNamedSchemas", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaParser$ParseResult", True, "mainSchema", "()", "", "Argument[this]", "ReturnValue", "taint", "ai-generated"]
|
||||
- ["org.apache.avro", "SchemaParser$ParseResult", True, "parsedNamedSchemas", "()", "", "Argument[this]", "ReturnValue", "taint", "ai-generated"]
|
||||
- ["org.apache.avro", "SchemaValidationException", True, "SchemaValidationException", "(Schema,Schema,Throwable)", "", "Argument[2]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaValidatorBuilder", False, "canBeReadStrategy", "()", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaValidatorBuilder", False, "canReadStrategy", "()", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaValidatorBuilder", False, "mutualReadStrategy", "()", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaValidatorBuilder", False, "strategy", "(SchemaValidationStrategy)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "SchemaValidatorBuilder", False, "validateAll", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SchemaValidatorBuilder", False, "validateLatest", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "SystemLimitException", True, "SystemLimitException", "(String)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "UnknownAvroCodecException", True, "UnknownAvroCodecException", "(String)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "UnresolvedUnionException", True, "UnresolvedUnionException", "(Schema,Object)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.UnresolvedUnionException.unionSchema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "UnresolvedUnionException", True, "UnresolvedUnionException", "(Schema,Object)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.UnresolvedUnionException.unresolvedDatum]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "UnresolvedUnionException", True, "UnresolvedUnionException", "(Schema,Schema$Field,Object)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.UnresolvedUnionException.unionSchema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "UnresolvedUnionException", True, "UnresolvedUnionException", "(Schema,Schema$Field,Object)", "", "Argument[2]", "Argument[this].SyntheticField[org.apache.avro.UnresolvedUnionException.unresolvedDatum]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "UnresolvedUnionException", True, "getUnionSchema", "()", "", "Argument[this].SyntheticField[org.apache.avro.UnresolvedUnionException.unionSchema]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "UnresolvedUnionException", True, "getUnresolvedDatum", "()", "", "Argument[this].SyntheticField[org.apache.avro.UnresolvedUnionException.unresolvedDatum]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro", "ValidateAll", False, "ValidateAll", "(SchemaValidationStrategy)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro", "ValidateLatest", False, "ValidateLatest", "(SchemaValidationStrategy)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: neutralModel
|
||||
data:
|
||||
- ["org.apache.avro", "SchemaFormatterFactory", "getDefaultFormatter", "()", "summary", "ai-generated"]
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
|
||||
# Generated from https://github.com/apache/avro#0f18ca801f25fa9435d727abba9fb979f9bde662 by codeql-mads-via-llm
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["org.apache.avro.path", "LocationStep", True, "LocationStep", "(String,String)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.path", "LocationStep", True, "LocationStep", "(String,String)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.path", "MapKeyPredicate", True, "MapKeyPredicate", "(String)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.path.MapKeyPredicate.key]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.path", "MapKeyPredicate", True, "getKey", "()", "", "Argument[this].SyntheticField[org.apache.avro.path.MapKeyPredicate.key]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.path", "TracingAvroTypeException", True, "TracingAvroTypeException", "(AvroTypeException)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.path", "TracingAvroTypeException", True, "summarize", "(Schema)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.path", "TracingAvroTypeException", True, "tracePath", "(PathElement)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.path", "TracingClassCastException", True, "TracingClassCastException", "(ClassCastException,Object,Schema,boolean)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.path.TracingClassCastException.datum]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.path", "TracingClassCastException", True, "summarize", "(Schema)", "", "Argument[this].SyntheticField[org.apache.avro.path.TracingClassCastException.datum]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.path", "TracingClassCastException", True, "tracePath", "(PathElement)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.path", "TracingNullPointException", True, "TracingNullPointException", "(NullPointerException,Schema,boolean)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.path", "TracingNullPointException", True, "TracingNullPointException", "(NullPointerException,Schema,boolean)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.path", "TracingNullPointException", True, "summarize", "(Schema)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.path", "TracingNullPointException", True, "tracePath", "(PathElement)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.path", "UnionTypePredicate", True, "UnionTypePredicate", "(String)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
@@ -1,30 +0,0 @@
|
||||
# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
|
||||
# Generated from https://github.com/apache/avro#0f18ca801f25fa9435d727abba9fb979f9bde662 by codeql-mads-via-llm
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["org.apache.avro.reflect", "MapEntry", True, "MapEntry", "(Object,Object)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "MapEntry", True, "MapEntry", "(Object,Object)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectData", True, "ReflectData", "(ClassLoader)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectData", True, "addStringable", "(Class)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectData", True, "createFixed", "(Object,Schema)", "", "Argument[1]", "ReturnValue.SyntheticField[org.apache.avro.generic.GenericData$Fixed.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectData", True, "getCustomEncoding", "(Schema)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectData", True, "getField", "(Object,String,int)", "", "Argument[0].SyntheticField[org.apache.avro.generic.GenericData$Record.values].ArrayElement", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectData", True, "makeNullable", "(Schema)", "", "Argument[0]", "ReturnValue", "value", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectData", True, "newRecord", "(Object,Schema)", "", "Argument[1]", "ReturnValue.SyntheticField[org.apache.avro.generic.GenericData$Record.schema]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectData", True, "setDefaultGeneratedValue", "(Type,Object)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectData", True, "setDefaultsGenerated", "(boolean)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectData", True, "setField", "(Object,String,int,Object)", "", "Argument[3]", "Argument[0].SyntheticField[org.apache.avro.generic.GenericData$Record.values].ArrayElement", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectDatumReader", True, "ReflectDatumReader", "(ReflectData)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectDatumReader", True, "ReflectDatumReader", "(Schema)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectDatumReader", True, "ReflectDatumReader", "(Schema,Schema)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectDatumReader", True, "ReflectDatumReader", "(Schema,Schema)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectDatumReader", True, "ReflectDatumReader", "(Schema,Schema,ReflectData)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectDatumReader", True, "ReflectDatumReader", "(Schema,Schema,ReflectData)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectDatumReader", True, "ReflectDatumReader", "(Schema,Schema,ReflectData)", "", "Argument[2]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectDatumWriter", True, "ReflectDatumWriter", "(Class,ReflectData)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectDatumWriter", True, "ReflectDatumWriter", "(Schema)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectDatumWriter", True, "ReflectDatumWriter", "(Schema,ReflectData)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.reflect", "ReflectDatumWriter", True, "ReflectDatumWriter", "(Schema,ReflectData)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
@@ -1,47 +0,0 @@
|
||||
# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
|
||||
# Generated from https://github.com/apache/avro#0f18ca801f25fa9435d727abba9fb979f9bde662 by codeql-mads-via-llm
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["org.apache.avro.specific", "SpecificData", True, "SpecificData", "(ClassLoader)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificData", True, "getClassName", "(Schema)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificData", True, "getDecoder", "(ObjectInput)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificData", True, "getEncoder", "(ObjectOutput)", "", "Argument[0]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificData", True, "getSchema", "(Type)", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificData", True, "mangle", "(String)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificData", True, "mangle", "(String,Set)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificData", True, "mangle", "(String,Set,boolean)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificData", True, "mangle", "(String,boolean)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificData", True, "mangleFullyQualified", "(String)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificData", True, "mangleMethod", "(String,boolean)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificData", True, "mangleTypeIdentifier", "(String)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificData", True, "mangleTypeIdentifier", "(String,boolean)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificDatumReader", True, "SpecificDatumReader", "(Schema)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificDatumReader", True, "SpecificDatumReader", "(Schema,Schema)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificDatumReader", True, "SpecificDatumReader", "(Schema,Schema)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificDatumReader", True, "SpecificDatumReader", "(Schema,Schema,SpecificData)", "", "Argument[2]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.data]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificDatumReader", True, "SpecificDatumReader", "(SpecificData)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.data]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificDatumReader", True, "getSpecificData", "()", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumReader.data]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificDatumReader", True, "setSchema", "(Schema)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificDatumWriter", True, "SpecificDatumWriter", "(Schema)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificDatumWriter", True, "SpecificDatumWriter", "(Schema,SpecificData)", "", "Argument[1]", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumWriter.data]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificDatumWriter", True, "getSpecificData", "()", "", "Argument[this].SyntheticField[org.apache.avro.generic.GenericDatumWriter.data]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificErrorBuilderBase", True, "clearCause", "()", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificErrorBuilderBase", True, "clearValue", "()", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificErrorBuilderBase", True, "getCause", "()", "", "Argument[this].SyntheticField[org.apache.avro.specific.SpecificErrorBuilderBase.cause]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificErrorBuilderBase", True, "getValue", "()", "", "Argument[this].SyntheticField[org.apache.avro.specific.SpecificErrorBuilderBase.value]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificErrorBuilderBase", True, "setCause", "(Throwable)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.specific.SpecificErrorBuilderBase.cause]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificErrorBuilderBase", True, "setCause", "(Throwable)", "", "Argument[0]", "ReturnValue.SyntheticField[org.apache.avro.specific.SpecificErrorBuilderBase.cause]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificErrorBuilderBase", True, "setCause", "(Throwable)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificErrorBuilderBase", True, "setValue", "(Object)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.specific.SpecificErrorBuilderBase.value]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificErrorBuilderBase", True, "setValue", "(Object)", "", "Argument[0]", "ReturnValue.SyntheticField[org.apache.avro.specific.SpecificErrorBuilderBase.value]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificErrorBuilderBase", True, "setValue", "(Object)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificExceptionBase", True, "SpecificExceptionBase", "(Object)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificExceptionBase", True, "SpecificExceptionBase", "(Object,Throwable)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificExceptionBase", True, "SpecificExceptionBase", "(Object,Throwable)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificExceptionBase", True, "SpecificExceptionBase", "(Throwable)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificFixed", True, "SpecificFixed", "(byte[])", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.specific.SpecificFixed.bytes]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificFixed", True, "bytes", "()", "", "Argument[this].SyntheticField[org.apache.avro.specific.SpecificFixed.bytes]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.specific", "SpecificFixed", True, "bytes", "(byte[])", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.specific.SpecificFixed.bytes]", "value", "dfc-generated"]
|
||||
@@ -1,63 +1,8 @@
|
||||
# THIS FILE IS AN AUTO-GENERATED MODELS AS DATA FILE. DO NOT EDIT.
|
||||
# Generated from https://github.com/apache/avro#0f18ca801f25fa9435d727abba9fb979f9bde662 by codeql-mads-via-llm
|
||||
# Generated from https://github.com/apache/avro.git#68da8fb99da5c482f17853e01e79f714e3717b42 by codeql-mads-via-llm
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: sourceModel
|
||||
data:
|
||||
- ["org.apache.avro.util", "RandomData", True, "main", "(String[])", "", "Parameter[0]", "commandargs", "ai-generated"]
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["org.apache.avro.util", "ByteBufferInputStream", True, "ByteBufferInputStream", "(List)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.util.ByteBufferInputStream.buffers]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "ByteBufferInputStream", True, "readBuffer", "(int)", "", "Argument[this].SyntheticField[org.apache.avro.util.ByteBufferInputStream.buffers].Element", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "ByteBufferOutputStream", True, "append", "(List)", "", "Argument[0].Element", "Argument[this].SyntheticField[org.apache.avro.util.ByteBufferOutputStream.buffers].Element", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "ByteBufferOutputStream", True, "getBufferList", "()", "", "Argument[this].SyntheticField[org.apache.avro.util.ByteBufferOutputStream.buffers]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "ByteBufferOutputStream", True, "write", "(ByteBuffer)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.util.ByteBufferOutputStream.buffers].Element", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "ByteBufferOutputStream", True, "writeBuffer", "(ByteBuffer)", "", "Argument[0]", "Argument[this]", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "ByteBufferOutputStream", True, "writeBuffer", "(ByteBuffer)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.util.ByteBufferOutputStream.buffers].Element", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "ClassSecurityValidator$Builder", True, "add", "(Class)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "ClassSecurityValidator$Builder", True, "add", "(String)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "MapEntry", True, "MapEntry", "(Object,Object)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "MapEntry", True, "MapEntry", "(Object,Object)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "MapUtil", True, "computeIfAbsent", "(ConcurrentMap,Object,Function)", "", "Argument[0].MapValue", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "NonCopyingByteArrayOutputStream", True, "asByteBuffer", "()", "", "Argument[this]", "ReturnValue", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "NonCopyingByteArrayOutputStream", True, "writeBytes", "(byte[])", "", "Argument[0]", "Argument[this]", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "RandomData", True, "RandomData", "(GenericData,Schema,int)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "RandomData", True, "RandomData", "(GenericData,Schema,int)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "RandomData", True, "RandomData", "(GenericData,Schema,int,boolean)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "RandomData", True, "RandomData", "(GenericData,Schema,int,boolean)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "RandomData", True, "RandomData", "(GenericData,Schema,int,long)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "RandomData", True, "RandomData", "(GenericData,Schema,int,long)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "RandomData", True, "RandomData", "(GenericData,Schema,int,long,boolean)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "RandomData", True, "RandomData", "(GenericData,Schema,int,long,boolean)", "", "Argument[1]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "RandomData", True, "RandomData", "(Schema,int)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "RandomData", True, "RandomData", "(Schema,int,boolean)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "RandomData", True, "RandomData", "(Schema,int,long)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "RandomData", True, "RandomData", "(Schema,int,long,boolean)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "ReusableByteArrayInputStream", True, "setByteArray", "(byte[],int,int)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "ReusableByteBufferInputStream", True, "setByteBuffer", "(ByteBuffer)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "SchemaResolver$ResolvingVisitor", False, "ResolvingVisitor", "(Function)", "", "Argument[0]", "Argument[this]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "SchemaResolver$ResolvingVisitor", False, "afterVisitNonTerminal", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.util.SchemaResolver$ResolvingVisitor.replace].MapKey", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "SchemaResolver$ResolvingVisitor", False, "copyProperties", "(Schema,Schema)", "", "Argument[0]", "Argument[1]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "SchemaResolver$ResolvingVisitor", False, "getResolved", "(Schema)", "", "Argument[this].SyntheticField[org.apache.avro.util.SchemaResolver$ResolvingVisitor.replace].MapValue", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "SchemaResolver$ResolvingVisitor", False, "visitNonTerminal", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.util.SchemaResolver$ResolvingVisitor.replace].MapKey", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "SchemaResolver$ResolvingVisitor", False, "visitTerminal", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.util.SchemaResolver$ResolvingVisitor.replace].MapKey", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "SchemaResolver$ResolvingVisitor", False, "visitTerminal", "(Schema)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.util.SchemaResolver$ResolvingVisitor.replace].MapValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "SchemaUtil", True, "describe", "(Object)", "", "Argument[0]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "Schemas", False, "visit", "(Schema,SchemaVisitor)", "", "Argument[0]", "Argument[1]", "taint", "df-generated"]
|
||||
- ["org.apache.avro.util", "TimePeriod", False, "from", "(TemporalAmount)", "", "Argument[0]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "Utf8", True, "Utf8", "(String)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.util.Utf8.bytes]", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "Utf8", True, "Utf8", "(Utf8)", "", "Argument[0].SyntheticField[org.apache.avro.util.Utf8.bytes].ArrayElement", "Argument[this].SyntheticField[org.apache.avro.util.Utf8.bytes].ArrayElement", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "Utf8", True, "Utf8", "(byte[])", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.util.Utf8.bytes]", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "Utf8", True, "getBytes", "()", "", "Argument[this].SyntheticField[org.apache.avro.util.Utf8.bytes]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "Utf8", True, "getBytesFor", "(String)", "", "Argument[0]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "Utf8", True, "readExternal", "(ObjectInput)", "", "Argument[0]", "Argument[this].SyntheticField[org.apache.avro.util.Utf8.bytes]", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "Utf8", True, "set", "(String)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "Utf8", True, "set", "(Utf8)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "Utf8", True, "setByteLength", "(int)", "", "Argument[this]", "ReturnValue", "value", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "Utf8", True, "writeExternal", "(ObjectOutput)", "", "Argument[this].SyntheticField[org.apache.avro.util.Utf8.bytes]", "Argument[0]", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "UtfTextUtils", True, "asString", "(byte[],Charset)", "", "Argument[0]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "UtfTextUtils", True, "readAllBytes", "(InputStream,Charset)", "", "Argument[0]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "UtfTextUtils", True, "readAllChars", "(Reader)", "", "Argument[0]", "ReturnValue", "taint", "dfc-generated"]
|
||||
- ["org.apache.avro.util", "RandomData", True, "main", "(String[])", "", "Argument[0]", "commandargs", "ai-generated"]
|
||||
|
||||
@@ -29,8 +29,3 @@ nodes
|
||||
| BadMacUse.java:146:48:146:57 | ciphertext : byte[] | semmle.label | ciphertext : byte[] |
|
||||
| BadMacUse.java:152:42:152:51 | ciphertext | semmle.label | ciphertext |
|
||||
subpaths
|
||||
testFailures
|
||||
| BadMacUse.java:50:56:50:66 | // $ Source | Missing result: Source |
|
||||
| BadMacUse.java:63:118:63:128 | // $ Source | Missing result: Source |
|
||||
| BadMacUse.java:92:31:92:35 | bytes : byte[] | Unexpected result: Source |
|
||||
| BadMacUse.java:146:95:146:105 | // $ Source | Missing result: Source |
|
||||
|
||||
@@ -30,8 +30,3 @@ nodes
|
||||
| BadMacUse.java:118:83:118:84 | iv : byte[] | semmle.label | iv : byte[] |
|
||||
| BadMacUse.java:124:42:124:51 | ciphertext | semmle.label | ciphertext |
|
||||
subpaths
|
||||
testFailures
|
||||
| BadMacUse.java:63:118:63:128 | // $ Source | Missing result: Source |
|
||||
| BadMacUse.java:92:16:92:36 | doFinal(...) : byte[] | Unexpected result: Source |
|
||||
| BadMacUse.java:124:42:124:51 | ciphertext | Unexpected result: Alert |
|
||||
| BadMacUse.java:146:95:146:105 | // $ Source | Missing result: Source |
|
||||
|
||||
@@ -44,8 +44,3 @@ nodes
|
||||
| BadMacUse.java:146:48:146:57 | ciphertext : byte[] [[]] : Object | semmle.label | ciphertext : byte[] [[]] : Object |
|
||||
| BadMacUse.java:152:42:152:51 | ciphertext | semmle.label | ciphertext |
|
||||
subpaths
|
||||
testFailures
|
||||
| BadMacUse.java:50:56:50:66 | // $ Source | Missing result: Source |
|
||||
| BadMacUse.java:139:79:139:90 | input : byte[] | Unexpected result: Source |
|
||||
| BadMacUse.java:146:95:146:105 | // $ Source | Missing result: Source |
|
||||
| BadMacUse.java:152:42:152:51 | ciphertext | Unexpected result: Alert |
|
||||
|
||||
@@ -47,7 +47,7 @@ class BadMacUse {
|
||||
SecretKey encryptionKey = new SecretKeySpec(encryptionKeyBytes, "AES");
|
||||
Cipher cipher = Cipher.getInstance("AES/GCM/NoPadding");
|
||||
cipher.init(Cipher.DECRYPT_MODE, encryptionKey, new SecureRandom());
|
||||
byte[] plaintext = cipher.doFinal(ciphertext); // $ Source
|
||||
byte[] plaintext = cipher.doFinal(ciphertext); // $ Source[java/quantum/examples/bad-mac-order-decrypt-to-mac]
|
||||
|
||||
// Now verify MAC (too late)
|
||||
SecretKey macKey = new SecretKeySpec(macKeyBytes, "HmacSHA256");
|
||||
@@ -60,7 +60,7 @@ class BadMacUse {
|
||||
}
|
||||
}
|
||||
|
||||
public void BadMacOnPlaintext(byte[] encryptionKeyBytes, byte[] macKeyBytes, byte[] plaintext) throws Exception {// $ Source
|
||||
public void BadMacOnPlaintext(byte[] encryptionKeyBytes, byte[] macKeyBytes, byte[] plaintext) throws Exception {// $ Source[java/quantum/examples/bad-mac-order-encrypt-plaintext-also-in-mac]
|
||||
// Create keys directly from provided byte arrays
|
||||
SecretKey encryptionKey = new SecretKeySpec(encryptionKeyBytes, "AES");
|
||||
SecretKey macKey = new SecretKeySpec(macKeyBytes, "HmacSHA256");
|
||||
@@ -89,7 +89,7 @@ class BadMacUse {
|
||||
|
||||
IvParameterSpec ivParameterSpec = new IvParameterSpec(iv);
|
||||
cipher.init(mode, secretKeySpec, ivParameterSpec);
|
||||
return cipher.doFinal(bytes);
|
||||
return cipher.doFinal(bytes); // $ Source[java/quantum/examples/bad-mac-order-decrypt-then-mac] Source[java/quantum/examples/bad-mac-order-decrypt-to-mac]
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -121,7 +121,7 @@ class BadMacUse {
|
||||
SecretKey macKey = new SecretKeySpec(macKeyBytes, "HmacSHA256");
|
||||
Mac mac = Mac.getInstance("HmacSHA256");
|
||||
mac.init(macKey);
|
||||
byte[] computedMac = mac.doFinal(ciphertext); // False Positive
|
||||
byte[] computedMac = mac.doFinal(ciphertext); // $ SPURIOUS: Alert[java/quantum/examples/bad-mac-order-decrypt-to-mac]
|
||||
|
||||
// Concatenate ciphertext and MAC
|
||||
byte[] output = new byte[ciphertext.length + computedMac.length];
|
||||
@@ -136,20 +136,20 @@ class BadMacUse {
|
||||
* The function decrypts THEN computes the MAC on the plaintext.
|
||||
* It should have the MAC computed on the ciphertext first.
|
||||
*/
|
||||
public void decryptThenMac(byte[] encryptionKeyBytes, byte[] macKeyBytes, byte[] input) throws Exception {
|
||||
public void decryptThenMac(byte[] encryptionKeyBytes, byte[] macKeyBytes, byte[] input) throws Exception { // $ SPURIOUS: Source[java/quantum/examples/bad-mac-order-encrypt-plaintext-also-in-mac]
|
||||
// Split input into ciphertext and MAC
|
||||
int macLength = 32; // HMAC-SHA256 output length
|
||||
byte[] ciphertext = Arrays.copyOfRange(input, 0, input.length - macLength);
|
||||
byte[] receivedMac = Arrays.copyOfRange(input, input.length - macLength, input.length);
|
||||
|
||||
// Decrypt first (unsafe)
|
||||
byte[] plaintext = decryptUsingWrapper(ciphertext, encryptionKeyBytes, new byte[16]); // $ Source
|
||||
byte[] plaintext = decryptUsingWrapper(ciphertext, encryptionKeyBytes, new byte[16]);
|
||||
|
||||
// Now verify MAC (too late)
|
||||
SecretKey macKey = new SecretKeySpec(macKeyBytes, "HmacSHA256");
|
||||
Mac mac = Mac.getInstance("HmacSHA256");
|
||||
mac.init(macKey);
|
||||
byte[] computedMac = mac.doFinal(ciphertext); // $ Alert[java/quantum/examples/bad-mac-order-decrypt-then-mac], False positive for Plaintext reuse
|
||||
byte[] computedMac = mac.doFinal(ciphertext); // $ Alert[java/quantum/examples/bad-mac-order-decrypt-then-mac] SPURIOUS: Alert[java/quantum/examples/bad-mac-order-encrypt-plaintext-also-in-mac]
|
||||
|
||||
if (!MessageDigest.isEqual(receivedMac, computedMac)) {
|
||||
throw new SecurityException("MAC verification failed");
|
||||
|
||||
@@ -126,5 +126,3 @@ nodes
|
||||
| InsecureIVorNonceSource.java:202:54:202:55 | iv : byte[] | semmle.label | iv : byte[] |
|
||||
| InsecureIVorNonceSource.java:206:51:206:56 | ivSpec | semmle.label | ivSpec |
|
||||
subpaths
|
||||
testFailures
|
||||
| InsecureIVorNonceSource.java:42:21:42:21 | 1 : Number | Unexpected result: Source |
|
||||
|
||||
@@ -39,7 +39,7 @@ public class InsecureIVorNonceSource {
|
||||
public byte[] encryptWithStaticIvByteArray(byte[] key, byte[] plaintext) throws Exception {
|
||||
byte[] iv = new byte[16];
|
||||
for (byte i = 0; i < iv.length; i++) {
|
||||
iv[i] = 1;
|
||||
iv[i] = 1; // $ Source[java/quantum/examples/insecure-iv-or-nonce]
|
||||
}
|
||||
|
||||
IvParameterSpec ivSpec = new IvParameterSpec(iv);
|
||||
|
||||
@@ -40,11 +40,11 @@ public class Test {
|
||||
* SAST/CBOM: - Parent: PBKDF2. - Iteration count is only 10, which is far
|
||||
* below acceptable security standards. - Flagged as insecure.
|
||||
*/
|
||||
public void pbkdf2LowIteration(String password, int iterationCount) throws Exception { // $ Source
|
||||
public void pbkdf2LowIteration(String password, int iterationCount) throws Exception { // $ Source[java/quantum/examples/unknown-kdf-iteration-count]
|
||||
byte[] salt = generateSalt(16);
|
||||
PBEKeySpec spec = new PBEKeySpec(password.toCharArray(), salt, iterationCount, 256); // $ Alert[java/quantum/examples/unknown-kdf-iteration-count]
|
||||
PBEKeySpec spec = new PBEKeySpec(password.toCharArray(), salt, iterationCount, 256);
|
||||
SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA256");
|
||||
byte[] key = factory.generateSecret(spec).getEncoded();
|
||||
byte[] key = factory.generateSecret(spec).getEncoded(); // $ Alert[java/quantum/examples/unknown-kdf-iteration-count]
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1 @@
|
||||
#select
|
||||
| Test.java:47:22:47:49 | KeyDerivation | Key derivation operation with unknown iteration: $@ | Test.java:43:53:43:70 | iterationCount | iterationCount |
|
||||
testFailures
|
||||
| Test.java:45:94:45:154 | // $ Alert[java/quantum/examples/unknown-kdf-iteration-count] | Missing result: Alert[java/quantum/examples/unknown-kdf-iteration-count] |
|
||||
| Test.java:47:22:47:49 | Key derivation operation with unknown iteration: $@ | Unexpected result: Alert |
|
||||
|
||||
@@ -12,5 +12,3 @@ nodes
|
||||
| Test.java:58:30:58:38 | 1_000_000 : Number | semmle.label | 1_000_000 : Number |
|
||||
| Test.java:59:72:59:85 | iterationCount | semmle.label | iterationCount |
|
||||
subpaths
|
||||
testFailures
|
||||
| Test.java:43:92:43:102 | // $ Source | Missing result: Source |
|
||||
|
||||
BIN
ql/Cargo.lock
generated
BIN
ql/Cargo.lock
generated
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -4,11 +4,35 @@ private import codeql.util.test.InlineExpectationsTest
|
||||
module Impl implements InlineExpectationsTestSig {
|
||||
private import codeql.ruby.ast.internal.TreeSitter
|
||||
|
||||
private newtype TAnyComment =
|
||||
RubyComment(Ruby::Comment comment) or
|
||||
ErbComment(R::ErbComment comment)
|
||||
|
||||
/**
|
||||
* A class representing line comments in Ruby.
|
||||
* A class representing comments that may contain inline expectations (Ruby line comments and ERB comments).
|
||||
*/
|
||||
class ExpectationComment extends Ruby::Comment {
|
||||
string getContents() { result = this.getValue().suffix(1) }
|
||||
class ExpectationComment extends TAnyComment {
|
||||
Ruby::Comment asRubyComment() { this = RubyComment(result) }
|
||||
|
||||
R::ErbComment asErbComment() { this = ErbComment(result) }
|
||||
|
||||
string toString() {
|
||||
result = this.asRubyComment().toString()
|
||||
or
|
||||
result = this.asErbComment().toString()
|
||||
}
|
||||
|
||||
Location getLocation() {
|
||||
result = this.asRubyComment().getLocation()
|
||||
or
|
||||
result = this.asErbComment().getLocation()
|
||||
}
|
||||
|
||||
string getContents() {
|
||||
result = this.asRubyComment().getValue().suffix(1)
|
||||
or
|
||||
result = this.asErbComment().getValue().suffix(1)
|
||||
}
|
||||
}
|
||||
|
||||
class Location = R::Location;
|
||||
|
||||
@@ -28,8 +28,6 @@ nodes
|
||||
| string_flow.rb:227:10:227:10 | a | semmle.label | a |
|
||||
subpaths
|
||||
testFailures
|
||||
| string_flow.rb:85:10:85:10 | a | Unexpected result: hasValueFlow=a |
|
||||
| string_flow.rb:227:10:227:10 | a | Unexpected result: hasValueFlow=a |
|
||||
#select
|
||||
| string_flow.rb:3:10:3:22 | call to new | string_flow.rb:2:9:2:18 | call to source | string_flow.rb:3:10:3:22 | call to new | $@ | string_flow.rb:2:9:2:18 | call to source | call to source |
|
||||
| string_flow.rb:85:10:85:10 | a | string_flow.rb:83:9:83:18 | call to source | string_flow.rb:85:10:85:10 | a | $@ | string_flow.rb:83:9:83:18 | call to source | call to source |
|
||||
|
||||
@@ -82,7 +82,7 @@ end
|
||||
def m_clear
|
||||
a = source "a"
|
||||
a.clear
|
||||
sink a
|
||||
sink a # $ SPURIOUS: hasValueFlow=a
|
||||
end
|
||||
|
||||
# concat and prepend omitted because they clash with the summaries for
|
||||
@@ -224,7 +224,7 @@ def m_replace
|
||||
b = source "b"
|
||||
sink a.replace(b) # $ hasTaintFlow=b
|
||||
# TODO: currently we get value flow for a, because we don't clear content
|
||||
sink a # $ hasTaintFlow=b
|
||||
sink a # $ hasTaintFlow=b SPURIOUS: hasValueFlow=a
|
||||
end
|
||||
|
||||
def m_reverse
|
||||
@@ -316,4 +316,4 @@ def m_upto(i)
|
||||
a.upto("b", true) { |x| sink x } # $ hasTaintFlow=a
|
||||
"b".upto(a) { |x| sink x } # $ hasTaintFlow=a
|
||||
"b".upto(a, true) { |x| sink x }
|
||||
end
|
||||
end
|
||||
|
||||
@@ -9,7 +9,7 @@ end
|
||||
class OneController < ActionController::Base
|
||||
before_action :a
|
||||
after_action :c
|
||||
|
||||
|
||||
def a
|
||||
@foo = params[:foo]
|
||||
end
|
||||
@@ -18,14 +18,14 @@ class OneController < ActionController::Base
|
||||
end
|
||||
|
||||
def c
|
||||
sink @foo
|
||||
sink @foo # $ hasTaintFlow
|
||||
end
|
||||
end
|
||||
|
||||
class TwoController < ActionController::Base
|
||||
before_action :a
|
||||
after_action :c
|
||||
|
||||
|
||||
def a
|
||||
@foo = params[:foo]
|
||||
end
|
||||
@@ -35,14 +35,14 @@ class TwoController < ActionController::Base
|
||||
end
|
||||
|
||||
def c
|
||||
sink @foo
|
||||
sink @foo # $ SPURIOUS: hasTaintFlow
|
||||
end
|
||||
end
|
||||
|
||||
class ThreeController < ActionController::Base
|
||||
before_action :a
|
||||
after_action :c
|
||||
|
||||
|
||||
def a
|
||||
@foo = params[:foo]
|
||||
@foo = "safe"
|
||||
@@ -52,14 +52,14 @@ class ThreeController < ActionController::Base
|
||||
end
|
||||
|
||||
def c
|
||||
sink @foo
|
||||
sink @foo # $ SPURIOUS: hasTaintFlow
|
||||
end
|
||||
end
|
||||
|
||||
class FourController < ActionController::Base
|
||||
before_action :a
|
||||
after_action :c
|
||||
|
||||
|
||||
def a
|
||||
@foo.bar = params[:foo]
|
||||
end
|
||||
@@ -68,14 +68,14 @@ class FourController < ActionController::Base
|
||||
end
|
||||
|
||||
def c
|
||||
sink(@foo.bar)
|
||||
sink(@foo.bar) # $ hasTaintFlow
|
||||
end
|
||||
end
|
||||
|
||||
class FiveController < ActionController::Base
|
||||
before_action :a
|
||||
after_action :c
|
||||
|
||||
|
||||
def a
|
||||
self.taint_foo
|
||||
end
|
||||
@@ -84,10 +84,10 @@ class FiveController < ActionController::Base
|
||||
end
|
||||
|
||||
def c
|
||||
sink @foo
|
||||
sink @foo # $ hasTaintFlow
|
||||
end
|
||||
|
||||
|
||||
def taint_foo
|
||||
@foo = params[:foo]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -270,11 +270,6 @@ nodes
|
||||
| params_flow.rb:205:10:205:10 | a | semmle.label | a |
|
||||
subpaths
|
||||
testFailures
|
||||
| filter_flow.rb:21:10:21:13 | @foo | Unexpected result: hasTaintFlow |
|
||||
| filter_flow.rb:38:10:38:13 | @foo | Unexpected result: hasTaintFlow |
|
||||
| filter_flow.rb:55:10:55:13 | @foo | Unexpected result: hasTaintFlow |
|
||||
| filter_flow.rb:71:10:71:17 | call to bar | Unexpected result: hasTaintFlow |
|
||||
| filter_flow.rb:87:11:87:14 | @foo | Unexpected result: hasTaintFlow |
|
||||
#select
|
||||
| filter_flow.rb:21:10:21:13 | @foo | filter_flow.rb:14:12:14:17 | call to params | filter_flow.rb:21:10:21:13 | @foo | $@ | filter_flow.rb:14:12:14:17 | call to params | call to params |
|
||||
| filter_flow.rb:38:10:38:13 | @foo | filter_flow.rb:30:12:30:17 | call to params | filter_flow.rb:38:10:38:13 | @foo | $@ | filter_flow.rb:30:12:30:17 | call to params | call to params |
|
||||
|
||||
@@ -23,7 +23,6 @@ nodes
|
||||
| views/index.erb:2:10:2:12 | call to foo | semmle.label | call to foo |
|
||||
subpaths
|
||||
testFailures
|
||||
| views/index.erb:2:10:2:12 | call to foo | Unexpected result: hasTaintFlow |
|
||||
#select
|
||||
| app.rb:95:10:95:14 | @user | app.rb:103:13:103:22 | call to source | app.rb:95:10:95:14 | @user | $@ | app.rb:103:13:103:22 | call to source | call to source |
|
||||
| views/index.erb:2:10:2:12 | call to foo | app.rb:75:12:75:17 | call to params | views/index.erb:2:10:2:12 | call to foo | $@ | app.rb:75:12:75:17 | call to params | call to params |
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<%= @foo %>
|
||||
<%= sink foo %>
|
||||
<%= sink foo %> <%# $ hasTaintFlow %>
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
testFailures
|
||||
| improper_memoization.rb:100:1:104:3 | m14 | Unexpected result: result=BAD |
|
||||
#select
|
||||
| improper_memoization.rb:50:1:55:3 | m7 | improper_memoization.rb:50:8:50:10 | arg | improper_memoization.rb:51:3:53:5 | ... \|\|= ... |
|
||||
| improper_memoization.rb:58:1:63:3 | m8 | improper_memoization.rb:58:8:58:10 | arg | improper_memoization.rb:59:3:61:5 | ... \|\|= ... |
|
||||
|
||||
@@ -101,4 +101,4 @@ def m14(arg)
|
||||
@m14 ||= {}
|
||||
key = "foo/#{arg}"
|
||||
@m14[key] ||= long_running_method(arg)
|
||||
end
|
||||
end # $ SPURIOUS: result=BAD
|
||||
|
||||
@@ -66,7 +66,7 @@ impl<'a> AstNode for Node<'a> {
|
||||
|
||||
impl AstNode for yeast::Node {
|
||||
fn kind(&self) -> &str {
|
||||
yeast::Node::kind(self)
|
||||
yeast::Node::kind_name(self)
|
||||
}
|
||||
fn is_named(&self) -> bool {
|
||||
yeast::Node::is_named(self)
|
||||
@@ -882,7 +882,6 @@ fn emit_extras_in(visitor: &mut Visitor, node: Node<'_>) {
|
||||
}
|
||||
|
||||
fn traverse_yeast(tree: &yeast::Ast, visitor: &mut Visitor) {
|
||||
use yeast::Cursor;
|
||||
let mut cursor = tree.walk();
|
||||
visitor.enter_node(cursor.node());
|
||||
let mut recurse = true;
|
||||
|
||||
@@ -120,14 +120,20 @@ pub fn generate(
|
||||
)));
|
||||
dbscheme::write(&mut dbscheme_writer, &dbscheme_tail)?;
|
||||
|
||||
let mut body = vec![
|
||||
ql::TopLevel::Class(ql_gen::create_ast_node_class(
|
||||
&ast_node_name,
|
||||
&node_location_table_name,
|
||||
&node_parent_table_name,
|
||||
)),
|
||||
ql::TopLevel::Class(ql_gen::create_token_class(&token_name, &tokeninfo_name)),
|
||||
];
|
||||
let mut body = vec![];
|
||||
|
||||
for c in ql_gen::create_ast_node_class(
|
||||
&ast_node_name,
|
||||
&node_location_table_name,
|
||||
&node_parent_table_name,
|
||||
) {
|
||||
body.push(ql::TopLevel::Class(c));
|
||||
}
|
||||
|
||||
for c in ql_gen::create_token_class(&token_name, &tokeninfo_name) {
|
||||
body.push(ql::TopLevel::Class(c));
|
||||
}
|
||||
|
||||
if has_trivia_tokens {
|
||||
body.push(ql::TopLevel::Class(ql_gen::create_trivia_token_class(
|
||||
&trivia_token_name,
|
||||
|
||||
@@ -40,9 +40,12 @@ pub struct Class<'a> {
|
||||
pub qldoc: Option<String>,
|
||||
pub name: &'a str,
|
||||
pub is_abstract: bool,
|
||||
pub is_final: bool,
|
||||
pub is_private: bool,
|
||||
pub supertypes: BTreeSet<Type<'a>>,
|
||||
pub characteristic_predicate: Option<Expression<'a>>,
|
||||
pub predicates: Vec<Predicate<'a>>,
|
||||
pub alias: Option<String>,
|
||||
}
|
||||
|
||||
impl fmt::Display for Class<'_> {
|
||||
@@ -50,6 +53,16 @@ impl fmt::Display for Class<'_> {
|
||||
if let Some(qldoc) = &self.qldoc {
|
||||
write!(f, "/** {qldoc} */")?;
|
||||
}
|
||||
if self.is_final {
|
||||
write!(f, "final ")?;
|
||||
}
|
||||
if self.is_private {
|
||||
write!(f, "private ")?;
|
||||
}
|
||||
if let Some(alias) = &self.alias {
|
||||
write!(f, "class {} = {alias};", &self.name)?;
|
||||
return Ok(());
|
||||
}
|
||||
if self.is_abstract {
|
||||
write!(f, "abstract ")?;
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ pub fn create_ast_node_class<'a>(
|
||||
ast_node: &'a str,
|
||||
node_location_table: &'a str,
|
||||
node_parent_table: &'a str,
|
||||
) -> ql::Class<'a> {
|
||||
) -> [ql::Class<'a>; 2] {
|
||||
// Default implementation of `toString` calls `this.getAPrimaryQlClass()`
|
||||
let to_string = ql::Predicate {
|
||||
qldoc: Some(String::from(
|
||||
@@ -132,25 +132,41 @@ pub fn create_ast_node_class<'a>(
|
||||
),
|
||||
overlay: None,
|
||||
};
|
||||
ql::Class {
|
||||
qldoc: Some(String::from("The base class for all AST nodes")),
|
||||
name: "AstNode",
|
||||
is_abstract: false,
|
||||
supertypes: vec![ql::Type::At(ast_node)].into_iter().collect(),
|
||||
characteristic_predicate: None,
|
||||
predicates: vec![
|
||||
to_string,
|
||||
get_location,
|
||||
get_parent,
|
||||
get_parent_index,
|
||||
get_a_field_or_child,
|
||||
get_a_primary_ql_class,
|
||||
get_primary_ql_classes,
|
||||
],
|
||||
}
|
||||
[
|
||||
ql::Class {
|
||||
qldoc: Some(String::from("The base class for all AST nodes")),
|
||||
name: "AstNodeImpl",
|
||||
is_abstract: false,
|
||||
is_final: false,
|
||||
is_private: true,
|
||||
alias: None,
|
||||
supertypes: vec![ql::Type::At(ast_node)].into_iter().collect(),
|
||||
characteristic_predicate: None,
|
||||
predicates: vec![
|
||||
to_string,
|
||||
get_location,
|
||||
get_parent,
|
||||
get_parent_index,
|
||||
get_a_field_or_child,
|
||||
get_a_primary_ql_class,
|
||||
get_primary_ql_classes,
|
||||
],
|
||||
},
|
||||
ql::Class {
|
||||
qldoc: None,
|
||||
name: "AstNode",
|
||||
is_abstract: false,
|
||||
is_final: true,
|
||||
is_private: false,
|
||||
alias: Some("AstNodeImpl".to_string()),
|
||||
supertypes: vec![].into_iter().collect(),
|
||||
characteristic_predicate: None,
|
||||
predicates: vec![],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
pub fn create_token_class<'a>(token_type: &'a str, tokeninfo: &'a str) -> ql::Class<'a> {
|
||||
pub fn create_token_class<'a>(token_type: &'a str, tokeninfo: &'a str) -> [ql::Class<'a>; 2] {
|
||||
let tokeninfo_arity = 3; // id, kind, value
|
||||
let get_value = ql::Predicate {
|
||||
qldoc: Some(String::from("Gets the value of this token.")),
|
||||
@@ -183,20 +199,36 @@ pub fn create_token_class<'a>(token_type: &'a str, tokeninfo: &'a str) -> ql::Cl
|
||||
),
|
||||
overlay: None,
|
||||
};
|
||||
ql::Class {
|
||||
qldoc: Some(String::from("A token.")),
|
||||
name: "Token",
|
||||
is_abstract: false,
|
||||
supertypes: vec![ql::Type::At(token_type), ql::Type::Normal("AstNode")]
|
||||
.into_iter()
|
||||
.collect(),
|
||||
characteristic_predicate: None,
|
||||
predicates: vec![
|
||||
get_value,
|
||||
to_string,
|
||||
create_get_a_primary_ql_class("Token", false),
|
||||
],
|
||||
}
|
||||
[
|
||||
ql::Class {
|
||||
qldoc: Some(String::from("A token.")),
|
||||
name: "TokenImpl",
|
||||
is_abstract: false,
|
||||
is_final: false,
|
||||
is_private: true,
|
||||
alias: None,
|
||||
supertypes: vec![ql::Type::At(token_type), ql::Type::Normal("AstNodeImpl")]
|
||||
.into_iter()
|
||||
.collect(),
|
||||
characteristic_predicate: None,
|
||||
predicates: vec![
|
||||
get_value,
|
||||
to_string,
|
||||
create_get_a_primary_ql_class("Token", false),
|
||||
],
|
||||
},
|
||||
ql::Class {
|
||||
qldoc: None,
|
||||
name: "Token",
|
||||
is_abstract: false,
|
||||
is_final: true,
|
||||
is_private: false,
|
||||
alias: Some("TokenImpl".to_string()),
|
||||
supertypes: vec![].into_iter().collect(),
|
||||
characteristic_predicate: None,
|
||||
predicates: vec![],
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
/// Creates the `TriviaToken` class. Trivia tokens (e.g. comments) are
|
||||
@@ -251,9 +283,15 @@ pub fn create_trivia_token_class<'a>(
|
||||
)),
|
||||
name: "TriviaToken",
|
||||
is_abstract: false,
|
||||
supertypes: vec![ql::Type::At(trivia_token_type), ql::Type::Normal("AstNode")]
|
||||
.into_iter()
|
||||
.collect(),
|
||||
is_final: true,
|
||||
is_private: false,
|
||||
alias: None,
|
||||
supertypes: vec![
|
||||
ql::Type::At(trivia_token_type),
|
||||
ql::Type::Normal("AstNodeImpl"),
|
||||
]
|
||||
.into_iter()
|
||||
.collect(),
|
||||
characteristic_predicate: None,
|
||||
predicates: vec![
|
||||
get_value,
|
||||
@@ -271,7 +309,10 @@ pub fn create_reserved_word_class(db_name: &str) -> ql::Class<'_> {
|
||||
qldoc: Some(String::from("A reserved word.")),
|
||||
name: class_name,
|
||||
is_abstract: false,
|
||||
supertypes: vec![ql::Type::At(db_name), ql::Type::Normal("Token")]
|
||||
is_final: true,
|
||||
is_private: false,
|
||||
alias: None,
|
||||
supertypes: vec![ql::Type::At(db_name), ql::Type::Normal("TokenImpl")]
|
||||
.into_iter()
|
||||
.collect(),
|
||||
characteristic_predicate: None,
|
||||
@@ -775,11 +816,14 @@ pub fn convert_nodes(nodes: &node_types::NodeTypeMap) -> Vec<ql::TopLevel<'_>> {
|
||||
create_get_a_primary_ql_class(&node.ql_class_name, true);
|
||||
let mut supertypes: BTreeSet<ql::Type> = BTreeSet::new();
|
||||
supertypes.insert(ql::Type::At(&node.dbscheme_name));
|
||||
supertypes.insert(ql::Type::Normal("Token"));
|
||||
supertypes.insert(ql::Type::Normal("TokenImpl"));
|
||||
classes.push(ql::TopLevel::Class(ql::Class {
|
||||
qldoc: Some(format!("A class representing `{}` tokens.", type_name.kind)),
|
||||
name: &node.ql_class_name,
|
||||
is_abstract: false,
|
||||
is_final: true,
|
||||
is_private: false,
|
||||
alias: None,
|
||||
supertypes,
|
||||
characteristic_predicate: None,
|
||||
predicates: vec![get_a_primary_ql_class],
|
||||
@@ -793,9 +837,12 @@ pub fn convert_nodes(nodes: &node_types::NodeTypeMap) -> Vec<ql::TopLevel<'_>> {
|
||||
qldoc: None,
|
||||
name: &node.ql_class_name,
|
||||
is_abstract: false,
|
||||
is_final: true,
|
||||
is_private: false,
|
||||
alias: None,
|
||||
supertypes: vec![
|
||||
ql::Type::At(&node.dbscheme_name),
|
||||
ql::Type::Normal("AstNode"),
|
||||
ql::Type::Normal("AstNodeImpl"),
|
||||
]
|
||||
.into_iter()
|
||||
.collect(),
|
||||
@@ -824,9 +871,12 @@ pub fn convert_nodes(nodes: &node_types::NodeTypeMap) -> Vec<ql::TopLevel<'_>> {
|
||||
qldoc: Some(format!("A class representing `{}` nodes.", type_name.kind)),
|
||||
name: main_class_name,
|
||||
is_abstract: false,
|
||||
is_final: true,
|
||||
is_private: false,
|
||||
alias: None,
|
||||
supertypes: vec![
|
||||
ql::Type::At(&node.dbscheme_name),
|
||||
ql::Type::Normal("AstNode"),
|
||||
ql::Type::Normal("AstNodeImpl"),
|
||||
]
|
||||
.into_iter()
|
||||
.collect(),
|
||||
|
||||
@@ -41,22 +41,14 @@ pub fn query(input: TokenStream) -> TokenStream {
|
||||
/// (kind "literal") - leaf with static content
|
||||
/// (kind #{expr}) - leaf with computed content (expr.to_string())
|
||||
/// (kind $fresh) - leaf with auto-generated unique name
|
||||
/// {expr} - embed a Rust expression returning Id
|
||||
/// {..expr} - splice an iterable of Id (in child/field position)
|
||||
/// field: {..expr} - splice into a named field
|
||||
/// {expr}.map(p -> tpl) - apply tpl to each element; splice result
|
||||
/// {expr}.reduce_left(f -> init, acc, e -> fold)
|
||||
/// - fold with per-element init; splice 0 or 1 result
|
||||
/// {expr} - embed a Rust expression, dispatched via
|
||||
/// the `IntoFieldIds` trait: `Id` pushes a
|
||||
/// single id; iterables (`Vec<Id>`,
|
||||
/// `Option<Id>`, iterator chains) splice
|
||||
/// their elements
|
||||
/// field: {expr} - extend a named field with `{expr}`'s ids
|
||||
/// ```
|
||||
///
|
||||
/// Chain syntax after `{expr}` or `{..expr}`:
|
||||
/// - `.map(param -> template)` — one output node per input element.
|
||||
/// - `.reduce_left(first -> init, acc, elem -> fold)` — fold left; the first
|
||||
/// element is converted by `init`, subsequent elements are folded by `fold`
|
||||
/// with the accumulator bound to `acc`. An empty iterable yields nothing.
|
||||
/// - Chains always splice (the result is iterable).
|
||||
/// - Multiple chains can be chained, e.g. `.map(...).reduce_left(...)`.
|
||||
///
|
||||
/// Can be called with an explicit context or using the implicit context
|
||||
/// from an enclosing `rule!`:
|
||||
///
|
||||
@@ -100,7 +92,7 @@ pub fn trees(input: TokenStream) -> TokenStream {
|
||||
/// rule!(
|
||||
/// (query_pattern field: (_) @name (kind)* @repeated (_)? @optional)
|
||||
/// =>
|
||||
/// (output_template field: {name} {..repeated})
|
||||
/// (output_template field: {name} {repeated})
|
||||
/// )
|
||||
///
|
||||
/// // Shorthand: captures become fields on the output node
|
||||
@@ -121,37 +113,3 @@ pub fn rule(input: TokenStream) -> TokenStream {
|
||||
Err(err) => err.to_compile_error().into(),
|
||||
}
|
||||
}
|
||||
|
||||
/// Define a desugaring rule whose transform is a hand-written Rust block.
|
||||
///
|
||||
/// Use `manual_rule!` when the transform needs control over capture
|
||||
/// translation timing — for example, when an outer rule needs to set
|
||||
/// state in `ctx` (the `BuildCtx`'s user context) before recursive
|
||||
/// translation reaches inner rules that read that state.
|
||||
///
|
||||
/// ```text
|
||||
/// manual_rule!(
|
||||
/// (query_pattern field: (_) @name)
|
||||
/// {
|
||||
/// // `ctx` is a `&mut BuildCtx<'_, C>`; capture variables
|
||||
/// // (`name: NodeRef`, etc.) are bound from the query.
|
||||
/// let translated = ctx.translate(name)?;
|
||||
/// Ok(translated)
|
||||
/// }
|
||||
/// )
|
||||
/// ```
|
||||
///
|
||||
/// Differences from [`rule!`]:
|
||||
/// - Captures are **not** auto-translated before the body runs; they
|
||||
/// refer to raw input-schema nodes. Use [`BuildCtx::translate`] (or
|
||||
/// [`BuildCtx::translate_opt`]) to translate them when you choose.
|
||||
/// - The body is plain Rust returning `Result<Vec<Id>, String>` — no
|
||||
/// tree template, no `Ok(...)` wrap.
|
||||
#[proc_macro]
|
||||
pub fn manual_rule(input: TokenStream) -> TokenStream {
|
||||
let input2: TokenStream2 = input.into();
|
||||
match parse::parse_manual_rule_top(input2) {
|
||||
Ok(output) => output.into(),
|
||||
Err(err) => err.to_compile_error().into(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,10 +22,9 @@ pub fn parse_query_top(input: TokenStream) -> Result<TokenStream> {
|
||||
/// Parse a single query node (possibly with a trailing `@capture`).
|
||||
fn parse_query_node(tokens: &mut Tokens) -> Result<TokenStream> {
|
||||
let base = parse_query_atom(tokens)?;
|
||||
// Check for trailing @capture
|
||||
// Check for trailing @capture or @@capture
|
||||
if peek_is_at(tokens) {
|
||||
tokens.next(); // consume @
|
||||
let capture_name = expect_ident(tokens, "expected capture name after @")?;
|
||||
let capture_name = consume_capture_marker(tokens)?;
|
||||
let name_str = capture_name.to_string();
|
||||
Ok(quote! {
|
||||
yeast::query::QueryNode::Capture {
|
||||
@@ -159,8 +158,7 @@ fn parse_query_fields(tokens: &mut Tokens) -> Result<Vec<TokenStream>> {
|
||||
push_field_elem(&mut field_order, &mut field_elems, field_str, elem);
|
||||
} else {
|
||||
let child = if peek_is_at(tokens) {
|
||||
tokens.next();
|
||||
let capture_name = expect_ident(tokens, "expected capture name after @")?;
|
||||
let capture_name = consume_capture_marker(tokens)?;
|
||||
let name_str = capture_name.to_string();
|
||||
quote! {
|
||||
yeast::query::QueryNode::Capture {
|
||||
@@ -306,7 +304,8 @@ fn parse_ctx_or_implicit(tokens: &mut Tokens) -> Ident {
|
||||
&& matches!(lookahead.next(), Some(TokenTree::Punct(p)) if p.as_char() == ',');
|
||||
|
||||
if is_explicit {
|
||||
let ctx = expect_ident(tokens, "").unwrap();
|
||||
let ctx = expect_ident(tokens, "unreachable: ident was just peeked")
|
||||
.expect("unreachable: ident was just peeked");
|
||||
let _ = tokens.next(); // consume comma
|
||||
ctx
|
||||
} else {
|
||||
@@ -344,7 +343,7 @@ pub fn parse_trees_top(input: TokenStream) -> Result<TokenStream> {
|
||||
}
|
||||
Ok(quote! {
|
||||
{
|
||||
let mut __nodes: Vec<usize> = Vec::new();
|
||||
let mut __nodes: Vec<yeast::Id> = Vec::new();
|
||||
#(#items)*
|
||||
__nodes
|
||||
}
|
||||
@@ -358,7 +357,7 @@ fn parse_direct_node(tokens: &mut Tokens, ctx: &Ident) -> Result<TokenStream> {
|
||||
Some(TokenTree::Group(g)) if g.delimiter() == Delimiter::Brace => {
|
||||
let group = expect_group(tokens, Delimiter::Brace)?;
|
||||
let expr = group.stream();
|
||||
Ok(quote! { ::std::convert::Into::<usize>::into({ #expr }) })
|
||||
Ok(quote! { ::std::convert::Into::<yeast::Id>::into({ #expr }) })
|
||||
}
|
||||
Some(TokenTree::Group(g)) if g.delimiter() == Delimiter::Parenthesis => {
|
||||
let group = expect_group(tokens, Delimiter::Parenthesis)?;
|
||||
@@ -431,49 +430,24 @@ fn parse_direct_node_inner(tokens: &mut Tokens, ctx: &Ident) -> Result<TokenStre
|
||||
);
|
||||
field_counter += 1;
|
||||
|
||||
// Check for field: {..expr}.chain or field: {expr}.chain — splice a Vec<Id> into the field
|
||||
// Plain `field: {expr}` — trait-dispatched extend.
|
||||
if peek_is_group(tokens, Delimiter::Brace) {
|
||||
let group_clone = tokens.clone().next().unwrap();
|
||||
if let TokenTree::Group(g) = &group_clone {
|
||||
let mut inner_check = g.stream().into_iter();
|
||||
let is_splice = matches!(inner_check.next(), Some(TokenTree::Punct(p)) if p.as_char() == '.')
|
||||
&& matches!(inner_check.next(), Some(TokenTree::Punct(p)) if p.as_char() == '.');
|
||||
// Determine if a chain (.map(..)) follows the `{}` group.
|
||||
let mut after = tokens.clone();
|
||||
after.next(); // skip the brace group
|
||||
let has_chain =
|
||||
matches!(after.peek(), Some(TokenTree::Punct(p)) if p.as_char() == '.');
|
||||
|
||||
if is_splice || has_chain {
|
||||
let group = expect_group(tokens, Delimiter::Brace)?;
|
||||
let base: TokenStream = if is_splice {
|
||||
let mut inner = group.stream().into_iter().peekable();
|
||||
inner.next(); // consume first .
|
||||
inner.next(); // consume second .
|
||||
let expr: TokenStream = inner.collect();
|
||||
quote! {
|
||||
{ #expr }.into_iter().map(::std::convert::Into::<usize>::into)
|
||||
}
|
||||
} else {
|
||||
let expr = group.stream();
|
||||
quote! { { #expr }.into_iter() }
|
||||
};
|
||||
let chained = parse_chain_suffix(tokens, ctx, base)?;
|
||||
stmts.push(quote! {
|
||||
let #temp: Vec<usize> = #chained.collect();
|
||||
});
|
||||
// An empty splice means the field is absent — skip it
|
||||
// entirely rather than emitting an empty named field.
|
||||
field_args.push(quote! {
|
||||
if !#temp.is_empty() { __fields.push((#field_str, #temp)); }
|
||||
});
|
||||
continue;
|
||||
}
|
||||
}
|
||||
let group = expect_group(tokens, Delimiter::Brace)?;
|
||||
let expr = group.stream();
|
||||
stmts.push(quote! {
|
||||
let mut #temp: Vec<yeast::Id> = Vec::new();
|
||||
yeast::IntoFieldIds::extend_into({ #expr }, &mut #temp);
|
||||
});
|
||||
// An empty `{expr}` means the field is absent — skip it
|
||||
// entirely rather than emitting an empty named field.
|
||||
field_args.push(quote! {
|
||||
if !#temp.is_empty() { __fields.push((#field_str, #temp)); }
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
||||
let value = parse_direct_node(tokens, ctx)?;
|
||||
stmts.push(quote! { let #temp: usize = #value; });
|
||||
stmts.push(quote! { let #temp: yeast::Id = #value; });
|
||||
field_args.push(quote! { __fields.push((#field_str, vec![#temp])); });
|
||||
}
|
||||
|
||||
@@ -490,101 +464,13 @@ fn parse_direct_node_inner(tokens: &mut Tokens, ctx: &Ident) -> Result<TokenStre
|
||||
Ok(quote! {
|
||||
{
|
||||
#(#stmts)*
|
||||
let mut __fields: Vec<(&str, Vec<usize>)> = Vec::new();
|
||||
let mut __fields: Vec<(&str, Vec<yeast::Id>)> = Vec::new();
|
||||
#(#field_args)*
|
||||
#ctx.node(#kind_str, __fields)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/// Parse a chain of `.method(args)` suffixes after a `{expr}` or `{..expr}`
|
||||
/// placeholder in tree templates. Currently supports:
|
||||
///
|
||||
/// ```text
|
||||
/// .map(param -> template) -- iterator map: produces Vec<usize>
|
||||
/// ```
|
||||
///
|
||||
/// The chain may be empty (returns `base` unchanged). Multiple chained calls
|
||||
/// are supported, e.g. `.map(p -> ...).map(q -> ...)`.
|
||||
///
|
||||
/// Each call expects the receiver to be an iterator. The `base` argument
|
||||
/// should therefore already be an iterator (use `.into_iter()` on it before
|
||||
/// calling this function).
|
||||
fn parse_chain_suffix(tokens: &mut Tokens, ctx: &Ident, base: TokenStream) -> Result<TokenStream> {
|
||||
let mut current = base;
|
||||
while matches!(tokens.peek(), Some(TokenTree::Punct(p)) if p.as_char() == '.') {
|
||||
tokens.next(); // consume .
|
||||
let method = expect_ident(tokens, "expected method name after `.`")?;
|
||||
let method_str = method.to_string();
|
||||
let args_group = expect_group(tokens, Delimiter::Parenthesis)?;
|
||||
match method_str.as_str() {
|
||||
"map" => {
|
||||
let mut inner = args_group.stream().into_iter().peekable();
|
||||
let param = expect_ident(&mut inner, "expected lambda parameter name")?;
|
||||
expect_punct(&mut inner, '-', "expected `->` after lambda parameter")?;
|
||||
expect_punct(&mut inner, '>', "expected `->` after lambda parameter")?;
|
||||
let body = parse_direct_node(&mut inner, ctx)?;
|
||||
if let Some(tok) = inner.next() {
|
||||
return Err(syn::Error::new_spanned(
|
||||
tok,
|
||||
"unexpected token after lambda body",
|
||||
));
|
||||
}
|
||||
current = quote! {
|
||||
#current.map(|#param| #body)
|
||||
};
|
||||
}
|
||||
"reduce_left" => {
|
||||
// Syntax: reduce_left(first -> init_tpl, acc, elem -> fold_tpl)
|
||||
// - first -> init_tpl : converts the first element to the initial accumulator
|
||||
// - acc, elem -> fold_tpl : fold step (acc = current accumulator, elem = next element)
|
||||
// Empty iterator produces an empty iterator; non-empty produces a single-element iterator.
|
||||
let mut inner = args_group.stream().into_iter().peekable();
|
||||
let init_param = expect_ident(&mut inner, "expected initial lambda parameter")?;
|
||||
expect_punct(&mut inner, '-', "expected `->` after init parameter")?;
|
||||
expect_punct(&mut inner, '>', "expected `->` after init parameter")?;
|
||||
let init_body = parse_direct_node(&mut inner, ctx)?;
|
||||
expect_punct(&mut inner, ',', "expected `,` after init template")?;
|
||||
let acc_param = expect_ident(&mut inner, "expected accumulator parameter")?;
|
||||
expect_punct(&mut inner, ',', "expected `,` after accumulator parameter")?;
|
||||
let elem_param = expect_ident(&mut inner, "expected element parameter")?;
|
||||
expect_punct(&mut inner, '-', "expected `->` after element parameter")?;
|
||||
expect_punct(&mut inner, '>', "expected `->` after element parameter")?;
|
||||
let fold_body = parse_direct_node(&mut inner, ctx)?;
|
||||
if let Some(tok) = inner.next() {
|
||||
return Err(syn::Error::new_spanned(
|
||||
tok,
|
||||
"unexpected token after fold template",
|
||||
));
|
||||
}
|
||||
current = quote! {
|
||||
{
|
||||
let mut __iter = #current;
|
||||
let __result: Option<usize> = if let Some(#init_param) = __iter.next() {
|
||||
let mut __acc: usize = #init_body;
|
||||
for #elem_param in __iter {
|
||||
let #acc_param: usize = __acc;
|
||||
__acc = #fold_body;
|
||||
}
|
||||
Some(__acc)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
__result.into_iter()
|
||||
}
|
||||
};
|
||||
}
|
||||
_ => {
|
||||
return Err(syn::Error::new_spanned(
|
||||
method,
|
||||
format!("unknown builtin method `.{method_str}()`"),
|
||||
));
|
||||
}
|
||||
}
|
||||
}
|
||||
Ok(current)
|
||||
}
|
||||
|
||||
/// Parse the top-level list of a `trees!` template.
|
||||
/// Each item is a node template or `{expr}` splice.
|
||||
fn parse_direct_list(tokens: &mut Tokens, ctx: &Ident) -> Result<Vec<TokenStream>> {
|
||||
@@ -605,35 +491,14 @@ fn parse_direct_list(tokens: &mut Tokens, ctx: &Ident) -> Result<Vec<TokenStream
|
||||
continue;
|
||||
}
|
||||
|
||||
// {expr} or {..expr} (with optional .chain) — single node or splice
|
||||
// `{expr}` — extend `__nodes` via `IntoFieldIds`, which handles
|
||||
// single ids and iterables uniformly.
|
||||
if peek_is_group(tokens, Delimiter::Brace) {
|
||||
let group = expect_group(tokens, Delimiter::Brace)?;
|
||||
let has_chain =
|
||||
matches!(tokens.peek(), Some(TokenTree::Punct(p)) if p.as_char() == '.');
|
||||
let mut inner = group.stream().into_iter().peekable();
|
||||
let is_splice = peek_is_dotdot(&inner);
|
||||
if is_splice || has_chain {
|
||||
let base: TokenStream = if is_splice {
|
||||
inner.next(); // consume first .
|
||||
inner.next(); // consume second .
|
||||
let expr: TokenStream = inner.collect();
|
||||
quote! {
|
||||
{ #expr }.into_iter().map(::std::convert::Into::<usize>::into)
|
||||
}
|
||||
} else {
|
||||
let expr = group.stream();
|
||||
quote! { { #expr }.into_iter() }
|
||||
};
|
||||
let chained = parse_chain_suffix(tokens, ctx, base)?;
|
||||
items.push(quote! {
|
||||
__nodes.extend(#chained);
|
||||
});
|
||||
} else {
|
||||
let expr = group.stream();
|
||||
items.push(quote! {
|
||||
__nodes.push(::std::convert::Into::<usize>::into({ #expr }));
|
||||
});
|
||||
}
|
||||
let expr = group.stream();
|
||||
items.push(quote! {
|
||||
yeast::IntoFieldIds::extend_into({ #expr }, &mut __nodes);
|
||||
});
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -650,6 +515,9 @@ fn parse_direct_list(tokens: &mut Tokens, ctx: &Ident) -> Result<Vec<TokenStream
|
||||
struct CaptureInfo {
|
||||
name: String,
|
||||
multiplicity: CaptureMultiplicity,
|
||||
/// `true` for `@@name` captures: the auto-translate prefix skips them,
|
||||
/// so the bound `Id` refers to the raw (input-schema) node.
|
||||
raw: bool,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, PartialEq)]
|
||||
@@ -708,6 +576,14 @@ fn extract_captures_inner(
|
||||
extract_captures_inner(&mut inner, captures, child_mult);
|
||||
}
|
||||
TokenTree::Punct(p) if p.as_char() == '@' => {
|
||||
// `@@name` marks the capture as raw (skip auto-translate).
|
||||
let raw = matches!(
|
||||
tokens.peek(),
|
||||
Some(TokenTree::Punct(p)) if p.as_char() == '@'
|
||||
);
|
||||
if raw {
|
||||
tokens.next(); // consume the second `@`
|
||||
}
|
||||
if let Some(TokenTree::Ident(name)) = tokens.next() {
|
||||
let mult = if parent_mult == CaptureMultiplicity::Repeated
|
||||
|| last_mult == CaptureMultiplicity::Repeated
|
||||
@@ -723,6 +599,7 @@ fn extract_captures_inner(
|
||||
captures.push(CaptureInfo {
|
||||
name: name.to_string(),
|
||||
multiplicity: mult,
|
||||
raw,
|
||||
});
|
||||
}
|
||||
last_mult = CaptureMultiplicity::Single;
|
||||
@@ -776,6 +653,14 @@ pub fn parse_rule_top(input: TokenStream) -> Result<TokenStream> {
|
||||
// Parse query
|
||||
let query_code = parse_query_top(query_stream.clone())?;
|
||||
|
||||
// Capture names marked `@@name` (raw) — passed to the auto-translate
|
||||
// prefix as a skip list so those captures keep their input-schema ids.
|
||||
let raw_capture_names: Vec<&str> = captures
|
||||
.iter()
|
||||
.filter(|c| c.raw)
|
||||
.map(|c| c.name.as_str())
|
||||
.collect();
|
||||
|
||||
// Generate capture bindings
|
||||
let ctx_ident = Ident::new(IMPLICIT_CTX, Span::call_site());
|
||||
let bindings: Vec<TokenStream> = captures
|
||||
@@ -786,22 +671,17 @@ pub fn parse_rule_top(input: TokenStream) -> Result<TokenStream> {
|
||||
match cap.multiplicity {
|
||||
CaptureMultiplicity::Repeated => {
|
||||
quote! {
|
||||
let #name: Vec<yeast::NodeRef> = __captures.get_all(#name_str)
|
||||
.into_iter()
|
||||
.map(yeast::NodeRef)
|
||||
.collect();
|
||||
let #name: Vec<yeast::Id> = __captures.get_all(#name_str);
|
||||
}
|
||||
}
|
||||
CaptureMultiplicity::Optional => {
|
||||
quote! {
|
||||
let #name: Option<yeast::NodeRef> =
|
||||
__captures.get_opt(#name_str).map(yeast::NodeRef);
|
||||
let #name: Option<yeast::Id> = __captures.get_opt(#name_str);
|
||||
}
|
||||
}
|
||||
CaptureMultiplicity::Single => {
|
||||
quote! {
|
||||
let #name: yeast::NodeRef =
|
||||
yeast::NodeRef(__captures.get_var(#name_str).unwrap());
|
||||
let #name: yeast::Id = __captures.get_var(#name_str).unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -832,7 +712,7 @@ pub fn parse_rule_top(input: TokenStream) -> Result<TokenStream> {
|
||||
__fields.insert(
|
||||
__field_id,
|
||||
#name.into_iter()
|
||||
.map(::std::convert::Into::<usize>::into)
|
||||
.map(::std::convert::Into::<yeast::Id>::into)
|
||||
.collect(),
|
||||
);
|
||||
},
|
||||
@@ -841,14 +721,14 @@ pub fn parse_rule_top(input: TokenStream) -> Result<TokenStream> {
|
||||
.unwrap_or_else(|| panic!("field '{}' not found", #name_str));
|
||||
if let Some(__id) = #name {
|
||||
__fields.entry(__field_id).or_insert_with(Vec::new)
|
||||
.push(::std::convert::Into::<usize>::into(__id));
|
||||
.push(::std::convert::Into::<yeast::Id>::into(__id));
|
||||
}
|
||||
},
|
||||
CaptureMultiplicity::Single => quote! {
|
||||
let __field_id = #ctx_ident.ast.field_id_for_name(#name_str)
|
||||
.unwrap_or_else(|| panic!("field '{}' not found", #name_str));
|
||||
__fields.entry(__field_id).or_insert_with(Vec::new)
|
||||
.push(::std::convert::Into::<usize>::into(#name));
|
||||
.push(::std::convert::Into::<yeast::Id>::into(#name));
|
||||
},
|
||||
}
|
||||
})
|
||||
@@ -880,7 +760,7 @@ pub fn parse_rule_top(input: TokenStream) -> Result<TokenStream> {
|
||||
}
|
||||
|
||||
quote! {
|
||||
let mut __nodes: Vec<usize> = Vec::new();
|
||||
let mut __nodes: Vec<yeast::Id> = Vec::new();
|
||||
#(#transform_items)*
|
||||
__nodes
|
||||
}
|
||||
@@ -891,120 +771,23 @@ pub fn parse_rule_top(input: TokenStream) -> Result<TokenStream> {
|
||||
let __query = #query_code;
|
||||
yeast::Rule::new(__query, Box::new(|__ast: &mut yeast::Ast, mut __captures: yeast::captures::Captures, __fresh: &yeast::tree_builder::FreshScope, __source_range: Option<tree_sitter::Range>, __user_ctx: &mut _, __translator: yeast::TranslatorHandle<'_, _>| {
|
||||
// Auto-translation prefix: recursively translate every
|
||||
// captured node before invoking the user's transform body.
|
||||
// captured node before invoking the user's transform body,
|
||||
// except for `@@name` captures listed in `__skip` which the
|
||||
// body consumes raw.
|
||||
// For OneShot rules this preserves the legacy behaviour
|
||||
// (input-schema captures translated to output-schema
|
||||
// nodes); for Repeating rules it is a no-op.
|
||||
__translator.auto_translate_captures(&mut __captures, __ast, __user_ctx)?;
|
||||
let __skip: &[&str] = &[#(#raw_capture_names),*];
|
||||
__translator.auto_translate_captures(&mut __captures, __ast, __user_ctx, __skip)?;
|
||||
#(#bindings)*
|
||||
let mut #ctx_ident = yeast::build::BuildCtx::with_translator(__ast, &__captures, __fresh, __source_range, __user_ctx, __translator);
|
||||
let __result: Vec<usize> = { #transform_body };
|
||||
let __result: Vec<yeast::Id> = { #transform_body };
|
||||
Ok(__result)
|
||||
}))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/// Parse `manual_rule!( query { body } )`.
|
||||
///
|
||||
/// Like [`parse_rule_top`] but:
|
||||
/// - Expects a Rust block `{ ... }` after the query (no `=>` arrow).
|
||||
/// - Generates code that does NOT auto-translate captures before
|
||||
/// running the body. Capture variables refer to raw (input-schema)
|
||||
/// nodes; the body is responsible for explicit translation via
|
||||
/// `ctx.translate(...)`.
|
||||
/// - The body is included verbatim and must evaluate to
|
||||
/// `Result<Vec<usize>, String>`.
|
||||
pub fn parse_manual_rule_top(input: TokenStream) -> Result<TokenStream> {
|
||||
let mut tokens = input.into_iter().peekable();
|
||||
|
||||
// Collect query tokens up to the body block `{ ... }`.
|
||||
let mut query_tokens = Vec::new();
|
||||
loop {
|
||||
match tokens.peek() {
|
||||
None => {
|
||||
return Err(syn::Error::new(
|
||||
Span::call_site(),
|
||||
"expected a Rust block `{ ... }` after the query in manual_rule!",
|
||||
))
|
||||
}
|
||||
Some(TokenTree::Group(g)) if g.delimiter() == Delimiter::Brace => break,
|
||||
_ => {
|
||||
query_tokens.push(tokens.next().unwrap());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let query_stream: TokenStream = query_tokens.into_iter().collect();
|
||||
|
||||
// Extract captures from the query (same as in `rule!`).
|
||||
let captures = extract_captures(&query_stream);
|
||||
|
||||
// Parse the query into the QueryNode-building expression.
|
||||
let query_code = parse_query_top(query_stream)?;
|
||||
|
||||
// Generate capture bindings (same as in `rule!`).
|
||||
let ctx_ident = Ident::new(IMPLICIT_CTX, Span::call_site());
|
||||
let bindings: Vec<TokenStream> = captures
|
||||
.iter()
|
||||
.map(|cap| {
|
||||
let name = Ident::new(&cap.name, Span::call_site());
|
||||
let name_str = &cap.name;
|
||||
match cap.multiplicity {
|
||||
CaptureMultiplicity::Repeated => quote! {
|
||||
let #name: Vec<yeast::NodeRef> = __captures.get_all(#name_str)
|
||||
.into_iter()
|
||||
.map(yeast::NodeRef)
|
||||
.collect();
|
||||
},
|
||||
CaptureMultiplicity::Optional => quote! {
|
||||
let #name: Option<yeast::NodeRef> =
|
||||
__captures.get_opt(#name_str).map(yeast::NodeRef);
|
||||
},
|
||||
CaptureMultiplicity::Single => quote! {
|
||||
let #name: yeast::NodeRef =
|
||||
yeast::NodeRef(__captures.get_var(#name_str).unwrap());
|
||||
},
|
||||
}
|
||||
})
|
||||
.collect();
|
||||
|
||||
// Consume the body block.
|
||||
let body_group = match tokens.next() {
|
||||
Some(TokenTree::Group(g)) if g.delimiter() == Delimiter::Brace => g,
|
||||
other => {
|
||||
return Err(syn::Error::new(
|
||||
Span::call_site(),
|
||||
format!(
|
||||
"expected a Rust block `{{ ... }}` after the query in manual_rule!, found: {other:?}"
|
||||
),
|
||||
))
|
||||
}
|
||||
};
|
||||
let body_stream = body_group.stream();
|
||||
|
||||
// No tokens should follow the body.
|
||||
if let Some(tok) = tokens.next() {
|
||||
return Err(syn::Error::new_spanned(
|
||||
tok,
|
||||
"unexpected token after manual_rule! body",
|
||||
));
|
||||
}
|
||||
|
||||
Ok(quote! {
|
||||
{
|
||||
let __query = #query_code;
|
||||
yeast::Rule::new(__query, Box::new(|__ast: &mut yeast::Ast, __captures: yeast::captures::Captures, __fresh: &yeast::tree_builder::FreshScope, __source_range: Option<tree_sitter::Range>, __user_ctx: &mut _, __translator: yeast::TranslatorHandle<'_, _>| {
|
||||
// No auto-translate prefix for manual rules — the body
|
||||
// is responsible for translating captures explicitly.
|
||||
#(#bindings)*
|
||||
let mut #ctx_ident = yeast::build::BuildCtx::with_translator(__ast, &__captures, __fresh, __source_range, __user_ctx, __translator);
|
||||
#body_stream
|
||||
}))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Token utilities
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -1013,6 +796,16 @@ fn peek_is_at(tokens: &mut Tokens) -> bool {
|
||||
matches!(tokens.peek(), Some(TokenTree::Punct(p)) if p.as_char() == '@')
|
||||
}
|
||||
|
||||
/// Consume an `@` or `@@` capture marker and the following name ident.
|
||||
/// Caller has already verified `peek_is_at(tokens)`.
|
||||
fn consume_capture_marker(tokens: &mut Tokens) -> Result<Ident> {
|
||||
tokens.next(); // consume the first `@`
|
||||
if peek_is_at(tokens) {
|
||||
tokens.next(); // consume the second `@` of `@@`
|
||||
}
|
||||
expect_ident(tokens, "expected capture name after `@` or `@@`")
|
||||
}
|
||||
|
||||
fn peek_is_literal(tokens: &mut Tokens) -> bool {
|
||||
matches!(tokens.peek(), Some(TokenTree::Literal(_)))
|
||||
}
|
||||
@@ -1025,13 +818,6 @@ fn peek_is_hash(tokens: &mut Tokens) -> bool {
|
||||
matches!(tokens.peek(), Some(TokenTree::Punct(p)) if p.as_char() == '#')
|
||||
}
|
||||
|
||||
/// Check for `..` (two consecutive dot punctuation tokens).
|
||||
fn peek_is_dotdot(tokens: &Tokens) -> bool {
|
||||
let mut lookahead = tokens.clone();
|
||||
matches!(lookahead.next(), Some(TokenTree::Punct(p)) if p.as_char() == '.')
|
||||
&& matches!(lookahead.next(), Some(TokenTree::Punct(p)) if p.as_char() == '.')
|
||||
}
|
||||
|
||||
fn peek_is_underscore(tokens: &mut Tokens) -> bool {
|
||||
matches!(tokens.peek(), Some(TokenTree::Ident(id)) if *id == "_")
|
||||
}
|
||||
@@ -1113,8 +899,7 @@ fn expect_repetition(tokens: &mut Tokens) -> Result<TokenStream> {
|
||||
|
||||
fn maybe_wrap_capture(tokens: &mut Tokens, base: TokenStream) -> Result<TokenStream> {
|
||||
if peek_is_at(tokens) {
|
||||
tokens.next(); // consume @
|
||||
let name = expect_ident(tokens, "expected capture name after @")?;
|
||||
let name = consume_capture_marker(tokens)?;
|
||||
let name_str = name.to_string();
|
||||
Ok(quote! {
|
||||
yeast::query::QueryNode::Capture {
|
||||
@@ -1141,13 +926,12 @@ fn maybe_wrap_repetition(tokens: &mut Tokens, single: TokenStream) -> Result<Tok
|
||||
}
|
||||
}
|
||||
|
||||
/// If `@name` follows a Repeated list element, wrap each child SingleNode
|
||||
/// inside the repetition with a Capture. This matches tree-sitter semantics
|
||||
/// where `(_)* @name` captures each matched node.
|
||||
/// If `@name` (or `@@name`) follows a Repeated list element, wrap each
|
||||
/// child SingleNode inside the repetition with a Capture. This matches
|
||||
/// tree-sitter semantics where `(_)* @name` captures each matched node.
|
||||
fn maybe_wrap_list_capture(tokens: &mut Tokens, elem: TokenStream) -> Result<TokenStream> {
|
||||
if peek_is_at(tokens) {
|
||||
tokens.next();
|
||||
let name = expect_ident(tokens, "expected capture name after @")?;
|
||||
let name = consume_capture_marker(tokens)?;
|
||||
let name_str = name.to_string();
|
||||
// Re-parse the element isn't practical, so we generate a wrapper
|
||||
// that creates a new Repeated with each child wrapped in a capture.
|
||||
|
||||
@@ -214,7 +214,7 @@ yeast::tree!(ctx,
|
||||
```rust
|
||||
yeast::trees!(ctx,
|
||||
(assignment left: {tmp} right: {right})
|
||||
{..body}
|
||||
{body}
|
||||
)
|
||||
```
|
||||
|
||||
@@ -256,12 +256,26 @@ occurrences of the same `$name` within one `BuildCtx` share the same value:
|
||||
|
||||
### Embedded Rust expressions
|
||||
|
||||
`{expr}` embeds a Rust expression that returns a single node `Id`:
|
||||
`{expr}` embeds a Rust expression whose value is appended to the
|
||||
enclosing field (or to the rule body's id list). Dispatch happens via
|
||||
the [`IntoFieldIds`] trait, which is implemented for:
|
||||
|
||||
- `Id` — pushes the single id.
|
||||
- Any `IntoIterator<Item: Into<Id>>` — extends with all yielded ids
|
||||
(covers `Vec<Id>`, `Option<Id>`, iterator chains, etc.).
|
||||
|
||||
So the same `{expr}` syntax handles single ids, splices, and zero-or-many
|
||||
options uniformly:
|
||||
|
||||
```rust
|
||||
(assignment
|
||||
left: {some_node_id} // insert a pre-built node
|
||||
right: {rhs} // insert a captured value (inside rule!)
|
||||
left: {some_node_id} // a single Id
|
||||
right: {rhs} // a captured value (inside rule!)
|
||||
)
|
||||
|
||||
yeast::trees!(ctx,
|
||||
(assignment left: {tmp} right: {right})
|
||||
{extra_nodes} // splices a Vec<Id>
|
||||
)
|
||||
```
|
||||
|
||||
@@ -277,20 +291,47 @@ expressions (with `let` bindings) work too:
|
||||
})
|
||||
```
|
||||
|
||||
`{..expr}` splices a `Vec<Id>` (or any iterable of `Id`); the contents
|
||||
are likewise a Rust block, so the splice can be the result of arbitrary
|
||||
computation:
|
||||
Inside `rule!`, captures are Rust variables — `{name}` works for
|
||||
single, optional, and repeated captures alike:
|
||||
|
||||
```rust
|
||||
yeast::trees!(ctx,
|
||||
(assignment left: {tmp} right: {right})
|
||||
{..extra_nodes} // splice a Vec<Id>
|
||||
rule!(
|
||||
(assignment left: @lhs right: _* @parts)
|
||||
=>
|
||||
(assignment left: {lhs} right: (block stmt: {parts}))
|
||||
)
|
||||
```
|
||||
|
||||
Inside `rule!`, captures are Rust variables, so `{name}` inserts a
|
||||
single capture (`Id`) and `{..name}` splices a repeated capture
|
||||
(`Vec<Id>`).
|
||||
### Raw captures (`@@name`)
|
||||
|
||||
The default `@name` capture marker is *auto-translated*: in OneShot
|
||||
phases the macro recursively translates the captured node before
|
||||
binding it, so `{name}` in the output template splices a node that
|
||||
already conforms to the output schema.
|
||||
|
||||
For rules that need the raw (input-schema) capture — typically to read
|
||||
its source text or to translate it explicitly with mutable context
|
||||
state between calls — use `@@name` instead. The body sees the original
|
||||
input-schema `Id`:
|
||||
|
||||
```rust
|
||||
yeast::rule!(
|
||||
(assignment left: (_) @@raw_lhs right: (_) @rhs)
|
||||
=>
|
||||
{
|
||||
// raw_lhs is untranslated: read its original source text.
|
||||
let text = ctx.ast.source_text(raw_lhs);
|
||||
// rhs is already translated by the auto-translate prefix.
|
||||
tree!((call
|
||||
method: (identifier #{text.as_str()})
|
||||
receiver: {rhs}))
|
||||
}
|
||||
);
|
||||
```
|
||||
|
||||
Mix `@` and `@@` freely in the same rule. In a Repeating phase both
|
||||
markers are equivalent (auto-translation is a no-op for repeating
|
||||
rules).
|
||||
|
||||
## Complete example: for-loop desugaring
|
||||
|
||||
|
||||
@@ -158,15 +158,6 @@ impl<'a, C> BuildCtx<'a, C> {
|
||||
self.ast
|
||||
.create_named_token_with_range(kind, generated, self.source_range)
|
||||
}
|
||||
|
||||
/// Prepend a value to a field of an existing node.
|
||||
pub fn prepend_field(&mut self, node_id: Id, field_name: &str, value_id: Id) {
|
||||
let field_id = self
|
||||
.ast
|
||||
.field_id_for_name(field_name)
|
||||
.unwrap_or_else(|| panic!("build: field '{field_name}' not found"));
|
||||
self.ast.prepend_field_child(node_id, field_id, value_id);
|
||||
}
|
||||
}
|
||||
|
||||
impl<C: Clone> BuildCtx<'_, C> {
|
||||
@@ -176,9 +167,6 @@ impl<C: Clone> BuildCtx<'_, C> {
|
||||
/// (translation is not meaningful when input and output share a
|
||||
/// schema).
|
||||
///
|
||||
/// Accepts any value convertible to [`Id`] (including [`crate::NodeRef`]),
|
||||
/// so manual rules can pass capture bindings directly without unwrapping.
|
||||
///
|
||||
/// Errors if this `BuildCtx` was constructed by hand (without a
|
||||
/// translator handle) — for example, in unit tests that don't go
|
||||
/// through the rule driver.
|
||||
@@ -189,20 +177,6 @@ impl<C: Clone> BuildCtx<'_, C> {
|
||||
None => Err("translate() called on a BuildCtx without a translator handle".into()),
|
||||
}
|
||||
}
|
||||
|
||||
/// Translate an optional capture, returning the first translated id or
|
||||
/// `None`. Convenience for `?`-quantifier captures (`Option<NodeRef>`).
|
||||
///
|
||||
/// If the underlying translation produces multiple ids for a single
|
||||
/// input, only the first is returned. For most use cases (e.g.
|
||||
/// translating a single type annotation) this is what you want; if
|
||||
/// you need all ids, use [`translate`] directly.
|
||||
pub fn translate_opt<I: Into<Id>>(&mut self, id: Option<I>) -> Result<Option<Id>, String> {
|
||||
match id {
|
||||
Some(id) => Ok(self.translate(id)?.into_iter().next()),
|
||||
None => Ok(None),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<C> std::ops::Deref for BuildCtx<'_, C> {
|
||||
|
||||
@@ -54,24 +54,24 @@ impl Captures {
|
||||
self.captures.entry(key).or_default().push(id);
|
||||
}
|
||||
|
||||
pub fn map_captures(&mut self, kind: &str, f: &mut impl FnMut(Id) -> Id) {
|
||||
if let Some(ids) = self.captures.get_mut(kind) {
|
||||
for id in ids {
|
||||
*id = f(*id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Apply a fallible function to every captured id (across all keys),
|
||||
/// replacing each id with the results. A function returning an empty
|
||||
/// vector removes the capture; returning multiple ids splices them
|
||||
/// into the capture's value list (suitable for `*`/`+` captures).
|
||||
/// Stops and returns the error on the first failure.
|
||||
pub fn try_map_all_captures<E>(
|
||||
/// Apply a fallible function to every captured id, replacing each id
|
||||
/// with the results. A function returning an empty vector removes
|
||||
/// the capture; returning multiple ids splices them into the
|
||||
/// capture's value list (suitable for `*`/`+` captures). Captures
|
||||
/// whose name appears in `skip` are left untouched. Stops and
|
||||
/// returns the error on the first failure.
|
||||
///
|
||||
/// Used by the `rule!` macro's auto-translate prefix to translate
|
||||
/// every capture except those marked `@@name` (raw).
|
||||
pub fn try_map_captures_except<E>(
|
||||
&mut self,
|
||||
skip: &[&str],
|
||||
mut f: impl FnMut(Id) -> Result<Vec<Id>, E>,
|
||||
) -> Result<(), E> {
|
||||
for ids in self.captures.values_mut() {
|
||||
for (name, ids) in self.captures.iter_mut() {
|
||||
if skip.contains(name) {
|
||||
continue;
|
||||
}
|
||||
let mut new_ids = Vec::with_capacity(ids.len());
|
||||
for &id in ids.iter() {
|
||||
new_ids.extend(f(id)?);
|
||||
@@ -80,12 +80,6 @@ impl Captures {
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
pub fn map_captures_to(&mut self, from: &str, to: &'static str, f: &mut impl FnMut(Id) -> Id) {
|
||||
if let Some(from_ids) = self.captures.get(from) {
|
||||
let new_values = from_ids.iter().copied().map(f).collect();
|
||||
self.captures.insert(to, new_values);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn merge(&mut self, other: &Captures) {
|
||||
for (key, ids) in &other.captures {
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
pub trait Cursor<'a, T, N, F> {
|
||||
fn node(&self) -> &'a N;
|
||||
fn field_id(&self) -> Option<F>;
|
||||
fn field_name(&self) -> Option<&'static str>;
|
||||
fn goto_first_child(&mut self) -> bool;
|
||||
fn goto_next_sibling(&mut self) -> bool;
|
||||
fn goto_parent(&mut self) -> bool;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
use std::fmt::Write;
|
||||
|
||||
use crate::{schema::Schema, Ast, Node, NodeContent, CHILD_FIELD};
|
||||
use crate::{schema::Schema, Ast, Id, Node, NodeContent, CHILD_FIELD};
|
||||
|
||||
/// Options for controlling AST dump output.
|
||||
pub struct DumpOptions {
|
||||
@@ -34,16 +34,11 @@ impl Default for DumpOptions {
|
||||
/// method:
|
||||
/// identifier "foo"
|
||||
/// ```
|
||||
pub fn dump_ast(ast: &Ast, root: usize, source: &str) -> String {
|
||||
pub fn dump_ast(ast: &Ast, root: Id, source: &str) -> String {
|
||||
dump_ast_with_options(ast, root, source, &DumpOptions::default())
|
||||
}
|
||||
|
||||
pub fn dump_ast_with_options(
|
||||
ast: &Ast,
|
||||
root: usize,
|
||||
source: &str,
|
||||
options: &DumpOptions,
|
||||
) -> String {
|
||||
pub fn dump_ast_with_options(ast: &Ast, root: Id, source: &str, options: &DumpOptions) -> String {
|
||||
let mut out = String::new();
|
||||
dump_node(ast, root, source, options, 0, None, &mut out);
|
||||
out
|
||||
@@ -53,7 +48,7 @@ pub fn dump_ast_with_options(
|
||||
///
|
||||
/// Any node that does not match the expected type set for its parent field is
|
||||
/// rendered with a trailing `" <-- ERROR: ..."` annotation on the same line.
|
||||
pub fn dump_ast_with_type_errors(ast: &Ast, root: usize, source: &str, schema: &Schema) -> String {
|
||||
pub fn dump_ast_with_type_errors(ast: &Ast, root: Id, source: &str, schema: &Schema) -> String {
|
||||
dump_ast_with_type_errors_and_options(ast, root, source, schema, &DumpOptions::default())
|
||||
}
|
||||
|
||||
@@ -63,7 +58,7 @@ pub fn dump_ast_with_type_errors(ast: &Ast, root: usize, source: &str, schema: &
|
||||
/// rendered with a trailing `" <-- ERROR: ..."` annotation on the same line.
|
||||
pub fn dump_ast_with_type_errors_and_options(
|
||||
ast: &Ast,
|
||||
root: usize,
|
||||
root: Id,
|
||||
source: &str,
|
||||
schema: &Schema,
|
||||
options: &DumpOptions,
|
||||
@@ -176,7 +171,7 @@ fn expected_for_field<'a>(
|
||||
|
||||
fn dump_node(
|
||||
ast: &Ast,
|
||||
id: usize,
|
||||
id: Id,
|
||||
source: &str,
|
||||
options: &DumpOptions,
|
||||
indent: usize,
|
||||
@@ -315,7 +310,7 @@ fn dump_node(
|
||||
/// Dump a leaf node inline (no newline prefix, caller provides context).
|
||||
fn dump_node_inline(
|
||||
ast: &Ast,
|
||||
id: usize,
|
||||
id: Id,
|
||||
source: &str,
|
||||
options: &DumpOptions,
|
||||
type_check: Option<(
|
||||
|
||||
@@ -7,7 +7,6 @@ use serde_json::{json, Value};
|
||||
|
||||
pub mod build;
|
||||
pub mod captures;
|
||||
pub mod cursor;
|
||||
pub mod dump;
|
||||
pub mod node_types_yaml;
|
||||
pub mod query;
|
||||
@@ -16,35 +15,64 @@ pub mod schema;
|
||||
pub mod tree_builder;
|
||||
mod visitor;
|
||||
|
||||
pub use yeast_macros::{manual_rule, query, rule, tree, trees};
|
||||
pub use yeast_macros::{query, rule, tree, trees};
|
||||
|
||||
use captures::Captures;
|
||||
pub use cursor::Cursor;
|
||||
use query::QueryNode;
|
||||
|
||||
/// Node ids are indexes into the arena
|
||||
pub type Id = usize;
|
||||
/// Node id: an index into the [`Ast`] arena. A newtype around `usize`
|
||||
/// rather than a bare alias so that it can carry its own
|
||||
/// [`YeastDisplay`] / [`YeastSourceRange`] / [`IntoFieldIds`] impls
|
||||
/// without colliding with the impls for plain integers.
|
||||
///
|
||||
/// Use `id.0` (or `id.into()`) to obtain the raw arena index.
|
||||
#[repr(transparent)]
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Debug, Hash, Serialize)]
|
||||
pub struct Id(pub usize);
|
||||
|
||||
impl From<usize> for Id {
|
||||
fn from(value: usize) -> Self {
|
||||
Id(value)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<Id> for usize {
|
||||
fn from(value: Id) -> Self {
|
||||
value.0
|
||||
}
|
||||
}
|
||||
|
||||
/// Field and Kind ids are provided by tree-sitter
|
||||
type FieldId = u16;
|
||||
type KindId = u16;
|
||||
|
||||
/// A typed reference to a node in an [`Ast`] arena. Wraps an [`Id`] but
|
||||
/// deliberately does not implement [`std::fmt::Display`]: rendering a node
|
||||
/// requires the [`Ast`] it lives in (to resolve [`NodeContent::Range`] back
|
||||
/// to source text). Use [`YeastDisplay::yeast_to_string`] to format it.
|
||||
#[derive(Copy, Clone, Eq, PartialEq, Debug, Hash)]
|
||||
pub struct NodeRef(pub Id);
|
||||
/// Trait for values that can be appended to a field's id list inside a
|
||||
/// `tree!`/`trees!`/`rule!` template (in `{expr}` placeholders).
|
||||
///
|
||||
/// `Id` pushes a single id; the blanket impl for
|
||||
/// `IntoIterator<Item: Into<Id>>` handles `Vec<Id>`, `Option<Id>`,
|
||||
/// arbitrary iterators yielding `Id`, etc.
|
||||
///
|
||||
/// This lets `{expr}` interpolate any of these shapes without a
|
||||
/// dedicated splice syntax — the macro emits the same trait-dispatched
|
||||
/// call regardless of the value's type.
|
||||
pub trait IntoFieldIds {
|
||||
fn extend_into(self, out: &mut Vec<Id>);
|
||||
}
|
||||
|
||||
impl NodeRef {
|
||||
pub fn id(self) -> Id {
|
||||
self.0
|
||||
impl IntoFieldIds for Id {
|
||||
fn extend_into(self, out: &mut Vec<Id>) {
|
||||
out.push(self);
|
||||
}
|
||||
}
|
||||
|
||||
impl From<NodeRef> for Id {
|
||||
fn from(value: NodeRef) -> Self {
|
||||
value.0
|
||||
impl<I, T> IntoFieldIds for I
|
||||
where
|
||||
I: IntoIterator<Item = T>,
|
||||
T: Into<Id>,
|
||||
{
|
||||
fn extend_into(self, out: &mut Vec<Id>) {
|
||||
out.extend(self.into_iter().map(Into::into));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,21 +89,21 @@ pub trait YeastDisplay {
|
||||
/// Optional source range for values used in `#{expr}` interpolations.
|
||||
///
|
||||
/// By default this returns `None`, so synthesized leaves inherit the matched
|
||||
/// rule's source range. `NodeRef` returns the referenced node's range, letting
|
||||
/// rule's source range. `Id` returns the referenced node's range, letting
|
||||
/// `(kind #{capture})` carry the captured node's location.
|
||||
pub trait YeastSourceRange {
|
||||
fn yeast_source_range(&self, ast: &Ast) -> Option<tree_sitter::Range>;
|
||||
}
|
||||
|
||||
impl YeastDisplay for NodeRef {
|
||||
impl YeastDisplay for Id {
|
||||
fn yeast_to_string(&self, ast: &Ast) -> String {
|
||||
ast.source_text(self.0)
|
||||
ast.source_text(*self)
|
||||
}
|
||||
}
|
||||
|
||||
impl YeastSourceRange for NodeRef {
|
||||
impl YeastSourceRange for Id {
|
||||
fn yeast_source_range(&self, ast: &Ast) -> Option<tree_sitter::Range> {
|
||||
ast.get_node(self.0).and_then(|n| match &n.content {
|
||||
ast.get_node(*self).and_then(|n| match &n.content {
|
||||
NodeContent::Range(r) => Some(r.clone()),
|
||||
_ => n.source_range,
|
||||
})
|
||||
@@ -144,6 +172,36 @@ impl<'a> AstCursor<'a> {
|
||||
self.node_id
|
||||
}
|
||||
|
||||
pub fn node(&self) -> &'a Node {
|
||||
&self.ast.nodes[self.node_id.0]
|
||||
}
|
||||
|
||||
pub fn field_id(&self) -> Option<FieldId> {
|
||||
let (_, children) = self.parents.last()?;
|
||||
children.current_field()
|
||||
}
|
||||
|
||||
pub fn field_name(&self) -> Option<&'static str> {
|
||||
if self.field_id() == Some(CHILD_FIELD) {
|
||||
None
|
||||
} else {
|
||||
self.field_id()
|
||||
.and_then(|id| self.ast.field_name_for_id(id))
|
||||
}
|
||||
}
|
||||
|
||||
pub fn goto_first_child(&mut self) -> bool {
|
||||
self.goto_first_child_opt().is_some()
|
||||
}
|
||||
|
||||
pub fn goto_next_sibling(&mut self) -> bool {
|
||||
self.goto_next_sibling_opt().is_some()
|
||||
}
|
||||
|
||||
pub fn goto_parent(&mut self) -> bool {
|
||||
self.goto_parent_opt().is_some()
|
||||
}
|
||||
|
||||
fn goto_next_sibling_opt(&mut self) -> Option<()> {
|
||||
self.node_id = self.parents.last_mut()?.1.next()?;
|
||||
Some(())
|
||||
@@ -164,37 +222,6 @@ impl<'a> AstCursor<'a> {
|
||||
Some(())
|
||||
}
|
||||
}
|
||||
impl<'a> Cursor<'a, Ast, Node, FieldId> for AstCursor<'a> {
|
||||
fn node(&self) -> &'a Node {
|
||||
&self.ast.nodes[self.node_id]
|
||||
}
|
||||
|
||||
fn field_id(&self) -> Option<FieldId> {
|
||||
let (_, children) = self.parents.last()?;
|
||||
children.current_field()
|
||||
}
|
||||
|
||||
fn field_name(&self) -> Option<&'static str> {
|
||||
if self.field_id() == Some(CHILD_FIELD) {
|
||||
None
|
||||
} else {
|
||||
self.field_id()
|
||||
.and_then(|id| self.ast.field_name_for_id(id))
|
||||
}
|
||||
}
|
||||
|
||||
fn goto_first_child(&mut self) -> bool {
|
||||
self.goto_first_child_opt().is_some()
|
||||
}
|
||||
|
||||
fn goto_next_sibling(&mut self) -> bool {
|
||||
self.goto_next_sibling_opt().is_some()
|
||||
}
|
||||
|
||||
fn goto_parent(&mut self) -> bool {
|
||||
self.goto_parent_opt().is_some()
|
||||
}
|
||||
}
|
||||
|
||||
/// An iterator over the child Ids of a node.
|
||||
#[derive(Debug)]
|
||||
@@ -341,16 +368,16 @@ impl Ast {
|
||||
///
|
||||
/// This reflects the effective AST after desugaring and excludes orphaned
|
||||
/// arena nodes left behind by rewrite operations.
|
||||
pub fn reachable_node_ids(&self) -> Vec<usize> {
|
||||
pub fn reachable_node_ids(&self) -> Vec<Id> {
|
||||
let mut reachable = Vec::new();
|
||||
let mut stack = vec![self.root];
|
||||
let mut seen = vec![false; self.nodes.len()];
|
||||
|
||||
while let Some(id) = stack.pop() {
|
||||
if id >= self.nodes.len() || seen[id] {
|
||||
if id.0 >= self.nodes.len() || seen[id.0] {
|
||||
continue;
|
||||
}
|
||||
seen[id] = true;
|
||||
seen[id.0] = true;
|
||||
reachable.push(id);
|
||||
|
||||
if let Some(node) = self.get_node(id) {
|
||||
@@ -374,11 +401,11 @@ impl Ast {
|
||||
}
|
||||
|
||||
pub fn get_node(&self, id: Id) -> Option<&Node> {
|
||||
self.nodes.get(id)
|
||||
self.nodes.get(id.0)
|
||||
}
|
||||
|
||||
pub fn print(&self, source: &str, root_id: Id) -> Value {
|
||||
let root = &self.nodes()[root_id];
|
||||
let root = &self.nodes()[root_id.0];
|
||||
self.print_node(root, source)
|
||||
}
|
||||
|
||||
@@ -421,7 +448,7 @@ impl Ast {
|
||||
is_named,
|
||||
source_range,
|
||||
});
|
||||
id
|
||||
Id(id)
|
||||
}
|
||||
|
||||
fn union_source_range_of_children(
|
||||
@@ -488,15 +515,6 @@ impl Ast {
|
||||
self.create_named_token_with_range(kind, content, None)
|
||||
}
|
||||
|
||||
/// Prepend a child id to the given field of the given node.
|
||||
pub fn prepend_field_child(&mut self, node_id: Id, field_id: FieldId, value_id: Id) {
|
||||
let node = self
|
||||
.nodes
|
||||
.get_mut(node_id)
|
||||
.expect("prepend_field_child: invalid node id");
|
||||
node.fields.entry(field_id).or_default().insert(0, value_id);
|
||||
}
|
||||
|
||||
pub fn create_named_token_with_range(
|
||||
&mut self,
|
||||
kind: &'static str,
|
||||
@@ -518,7 +536,7 @@ impl Ast {
|
||||
fields: BTreeMap::new(),
|
||||
content: NodeContent::DynamicString(content),
|
||||
});
|
||||
id
|
||||
Id(id)
|
||||
}
|
||||
|
||||
pub fn field_name_for_id(&self, id: FieldId) -> Option<&'static str> {
|
||||
@@ -602,10 +620,6 @@ pub struct Node {
|
||||
}
|
||||
|
||||
impl Node {
|
||||
pub fn kind(&self) -> &'static str {
|
||||
self.kind_name
|
||||
}
|
||||
|
||||
pub fn kind_name(&self) -> &'static str {
|
||||
self.kind_name
|
||||
}
|
||||
@@ -757,13 +771,14 @@ impl<'a, C: Clone> TranslatorHandle<'a, C> {
|
||||
}
|
||||
|
||||
/// Translate every captured node in `captures` in place (OneShot phase
|
||||
/// only). In a Repeating phase this is a no-op — Repeating rules
|
||||
/// receive raw captures.
|
||||
/// only), except for captures whose name appears in `skip` — those are
|
||||
/// left as raw (input-schema) ids for the rule body to consume
|
||||
/// directly. In a Repeating phase this is a no-op — Repeating rules
|
||||
/// receive raw captures regardless of `skip`.
|
||||
///
|
||||
/// Used by the `rule!` macro's generated prefix to preserve the
|
||||
/// pre-existing "auto-translate captures before running the transform
|
||||
/// body" behavior. Manually-written transforms typically translate
|
||||
/// captures selectively via [`translate`] instead.
|
||||
/// Used by the `rule!` macro's generated prefix. `skip` is populated
|
||||
/// from the macro's `@@name` capture markers; for plain `@name`
|
||||
/// captures (and rules with no `@@` markers) it is empty.
|
||||
///
|
||||
/// To avoid infinite recursion, a capture whose id matches the rule's
|
||||
/// matched root (e.g. from a `(_) @_` pattern) is left unchanged.
|
||||
@@ -772,11 +787,12 @@ impl<'a, C: Clone> TranslatorHandle<'a, C> {
|
||||
captures: &mut Captures,
|
||||
ast: &mut Ast,
|
||||
user_ctx: &mut C,
|
||||
skip: &[&str],
|
||||
) -> Result<(), String> {
|
||||
match &self.inner {
|
||||
TranslatorImpl::OneShot { matched_root, .. } => {
|
||||
let root = *matched_root;
|
||||
captures.try_map_all_captures(|cid| {
|
||||
captures.try_map_captures_except(skip, |cid| {
|
||||
if cid == root {
|
||||
Ok(vec![cid])
|
||||
} else {
|
||||
@@ -948,7 +964,7 @@ fn apply_repeating_rules_inner<C: Clone>(
|
||||
));
|
||||
}
|
||||
|
||||
let node_kind = ast.get_node(id).map(|n| n.kind()).unwrap_or("");
|
||||
let node_kind = ast.get_node(id).map(|n| n.kind_name()).unwrap_or("");
|
||||
for rule in index.rules_for_kind(node_kind) {
|
||||
let rule_ptr = *rule as *const Rule<C>;
|
||||
if Some(rule_ptr) == skip_rule {
|
||||
@@ -1000,7 +1016,7 @@ fn apply_repeating_rules_inner<C: Clone>(
|
||||
//
|
||||
// Child traversal does not increment rewrite depth and starts fresh
|
||||
// (no rule is skipped on child subtrees).
|
||||
let mut fields = std::mem::take(&mut ast.nodes[id].fields);
|
||||
let mut fields = std::mem::take(&mut ast.nodes[id.0].fields);
|
||||
for children in fields.values_mut() {
|
||||
let mut new_children: Option<Vec<Id>> = None;
|
||||
for (i, &child_id) in children.iter().enumerate() {
|
||||
@@ -1033,7 +1049,7 @@ fn apply_repeating_rules_inner<C: Clone>(
|
||||
*children = new;
|
||||
}
|
||||
}
|
||||
ast.nodes[id].fields = fields;
|
||||
ast.nodes[id.0].fields = fields;
|
||||
Ok(vec![id])
|
||||
}
|
||||
|
||||
@@ -1067,7 +1083,7 @@ fn apply_one_shot_rules_inner<C: Clone>(
|
||||
));
|
||||
}
|
||||
|
||||
let node_kind = ast.get_node(id).map(|n| n.kind()).unwrap_or("");
|
||||
let node_kind = ast.get_node(id).map(|n| n.kind_name()).unwrap_or("");
|
||||
|
||||
for rule in index.rules_for_kind(node_kind) {
|
||||
if let Some(captures) = rule.try_match(ast, id)? {
|
||||
|
||||
@@ -49,7 +49,7 @@ impl Visitor {
|
||||
|
||||
pub fn build_with_schema(self, schema: crate::schema::Schema) -> Ast {
|
||||
Ast {
|
||||
root: 0,
|
||||
root: Id(0),
|
||||
schema,
|
||||
nodes: self.nodes.into_iter().map(|n| n.inner).collect(),
|
||||
source: Vec::new(),
|
||||
@@ -72,7 +72,7 @@ impl Visitor {
|
||||
},
|
||||
parent: self.current,
|
||||
});
|
||||
id
|
||||
Id(id)
|
||||
}
|
||||
|
||||
fn enter_node(&mut self, node: tree_sitter::Node<'_>) -> bool {
|
||||
@@ -83,10 +83,10 @@ impl Visitor {
|
||||
|
||||
fn leave_node(&mut self, field_name: Option<&'static str>, _node: tree_sitter::Node<'_>) {
|
||||
let node_id = self.current.unwrap();
|
||||
let node_parent = self.nodes[node_id].parent;
|
||||
let node_parent = self.nodes[node_id.0].parent;
|
||||
|
||||
if let Some(parent_id) = node_parent {
|
||||
let parent = self.nodes.get_mut(parent_id).unwrap();
|
||||
let parent = self.nodes.get_mut(parent_id.0).unwrap();
|
||||
if let Some(field) = field_name {
|
||||
let field_id = self.language.field_id_for_name(field).unwrap().get();
|
||||
parent
|
||||
|
||||
@@ -300,7 +300,7 @@ fn test_query_skips_extras_in_positional_match() {
|
||||
let mut cursor = AstCursor::new(&ast);
|
||||
cursor.goto_first_child();
|
||||
let array_id = cursor.node_id();
|
||||
assert_eq!(ast.get_node(array_id).unwrap().kind(), "array");
|
||||
assert_eq!(ast.get_node(array_id).unwrap().kind_name(), "array");
|
||||
|
||||
// Two positional wildcards should bind to the two integers, skipping
|
||||
// the comment that sits between them.
|
||||
@@ -309,11 +309,15 @@ fn test_query_skips_extras_in_positional_match() {
|
||||
let matched = query.do_match(&ast, array_id, &mut captures).unwrap();
|
||||
assert!(matched);
|
||||
assert_eq!(
|
||||
ast.get_node(captures.get_var("a").unwrap()).unwrap().kind(),
|
||||
ast.get_node(captures.get_var("a").unwrap())
|
||||
.unwrap()
|
||||
.kind_name(),
|
||||
"integer"
|
||||
);
|
||||
assert_eq!(
|
||||
ast.get_node(captures.get_var("b").unwrap()).unwrap().kind(),
|
||||
ast.get_node(captures.get_var("b").unwrap())
|
||||
.unwrap()
|
||||
.kind_name(),
|
||||
"integer"
|
||||
);
|
||||
}
|
||||
@@ -391,7 +395,7 @@ fn test_capture_unnamed_node_parenthesized() {
|
||||
assert!(matched);
|
||||
let op_id = captures.get_var("op").unwrap();
|
||||
let op_node = ast.get_node(op_id).unwrap();
|
||||
assert_eq!(op_node.kind(), "=");
|
||||
assert_eq!(op_node.kind_name(), "=");
|
||||
assert!(!op_node.is_named());
|
||||
}
|
||||
|
||||
@@ -414,7 +418,7 @@ fn test_capture_bare_underscore_repeated() {
|
||||
|
||||
let all = captures.get_all("all");
|
||||
assert_eq!(all.len(), 1);
|
||||
assert_eq!(ast.get_node(all[0]).unwrap().kind(), "=");
|
||||
assert_eq!(ast.get_node(all[0]).unwrap().kind_name(), "=");
|
||||
assert!(!ast.get_node(all[0]).unwrap().is_named());
|
||||
}
|
||||
|
||||
@@ -441,7 +445,7 @@ fn test_capture_unnamed_node_bare_literal() {
|
||||
assert!(matched);
|
||||
let op_id = captures.get_var("op").unwrap();
|
||||
let op_node = ast.get_node(op_id).unwrap();
|
||||
assert_eq!(op_node.kind(), "=");
|
||||
assert_eq!(op_node.kind_name(), "=");
|
||||
assert!(!op_node.is_named());
|
||||
}
|
||||
|
||||
@@ -479,7 +483,7 @@ fn test_bare_underscore_matches_unnamed() {
|
||||
.unwrap();
|
||||
assert!(matched, "_ should match the unnamed `=`");
|
||||
let any_node = ast.get_node(captures.get_var("any").unwrap()).unwrap();
|
||||
assert_eq!(any_node.kind(), "=");
|
||||
assert_eq!(any_node.kind_name(), "=");
|
||||
assert!(!any_node.is_named());
|
||||
}
|
||||
|
||||
@@ -506,7 +510,7 @@ fn test_bare_forms_in_field_position() {
|
||||
assert_eq!(
|
||||
ast.get_node(captures.get_var("lhs").unwrap())
|
||||
.unwrap()
|
||||
.kind(),
|
||||
.kind_name(),
|
||||
"identifier"
|
||||
);
|
||||
|
||||
@@ -516,7 +520,7 @@ fn test_bare_forms_in_field_position() {
|
||||
let matched = query.do_match(&ast, assignment_id, &mut captures).unwrap();
|
||||
assert!(matched);
|
||||
let op = ast.get_node(captures.get_var("op").unwrap()).unwrap();
|
||||
assert_eq!(op.kind(), "=");
|
||||
assert_eq!(op.kind_name(), "=");
|
||||
assert!(!op.is_named());
|
||||
}
|
||||
|
||||
@@ -535,7 +539,7 @@ fn test_forward_scan_finds_unnamed_token_late() {
|
||||
let mut cursor = AstCursor::new(&ast);
|
||||
cursor.goto_first_child(); // for
|
||||
cursor.goto_first_child(); // do (the body)
|
||||
while cursor.node().kind() != "do" || !cursor.node().is_named() {
|
||||
while cursor.node().kind_name() != "do" || !cursor.node().is_named() {
|
||||
assert!(cursor.goto_next_sibling(), "expected to find named `do`");
|
||||
}
|
||||
let do_id = cursor.node_id();
|
||||
@@ -545,7 +549,7 @@ fn test_forward_scan_finds_unnamed_token_late() {
|
||||
let matched = query.do_match(&ast, do_id, &mut captures).unwrap();
|
||||
assert!(matched, "forward-scan should find the `end` keyword");
|
||||
let kw = ast.get_node(captures.get_var("kw").unwrap()).unwrap();
|
||||
assert_eq!(kw.kind(), "end");
|
||||
assert_eq!(kw.kind_name(), "end");
|
||||
assert!(!kw.is_named());
|
||||
}
|
||||
|
||||
@@ -561,7 +565,7 @@ fn test_forward_scan_preserves_order() {
|
||||
let mut cursor = AstCursor::new(&ast);
|
||||
cursor.goto_first_child();
|
||||
cursor.goto_first_child();
|
||||
while cursor.node().kind() != "do" || !cursor.node().is_named() {
|
||||
while cursor.node().kind_name() != "do" || !cursor.node().is_named() {
|
||||
assert!(cursor.goto_next_sibling(), "expected to find named `do`");
|
||||
}
|
||||
let do_id = cursor.node_id();
|
||||
@@ -635,7 +639,7 @@ fn ruby_rules() -> Vec<Rule> {
|
||||
left: (identifier $tmp)
|
||||
right: {right}
|
||||
)
|
||||
{..left.iter().enumerate().map(|(i, &lhs)|
|
||||
{left.iter().enumerate().map(|(i, &lhs)|
|
||||
yeast::tree!(
|
||||
(assignment
|
||||
left: {lhs}
|
||||
@@ -667,7 +671,7 @@ fn ruby_rules() -> Vec<Rule> {
|
||||
left: {pat}
|
||||
right: (identifier $tmp)
|
||||
)
|
||||
stmt: {..body}
|
||||
stmt: {body}
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -903,7 +907,7 @@ fn one_shot_xeq1_rules() -> Vec<Rule> {
|
||||
yeast::rule!(
|
||||
(program (_)* @stmts)
|
||||
=>
|
||||
(program stmt: {..stmts})
|
||||
(program stmt: {stmts})
|
||||
),
|
||||
yeast::rule!(
|
||||
(assignment left: (_) @left right: (_) @right)
|
||||
@@ -979,7 +983,7 @@ fn test_one_shot_recurses_into_returned_capture() {
|
||||
yeast::rule!(
|
||||
(program (_)* @stmts)
|
||||
=>
|
||||
(program stmt: {..stmts})
|
||||
(program stmt: {stmts})
|
||||
),
|
||||
// Returns the captured `left` verbatim, discarding `right`.
|
||||
yeast::rule!(
|
||||
@@ -1021,7 +1025,7 @@ fn test_one_shot_does_not_recurse_into_wrapper_output() {
|
||||
yeast::rule!(
|
||||
(program (_)* @stmts)
|
||||
=>
|
||||
(program stmt: {..stmts})
|
||||
(program stmt: {stmts})
|
||||
),
|
||||
// Wraps `left` in nested `first_node`/`second_node` output kinds.
|
||||
// Neither wrapper kind has a matching rule, so a buggy implementation
|
||||
@@ -1058,6 +1062,111 @@ fn test_one_shot_does_not_recurse_into_wrapper_output() {
|
||||
);
|
||||
}
|
||||
|
||||
/// Verify that `@@name` capture markers skip the auto-translate prefix:
|
||||
/// the body sees the *raw* (input-schema) `Id` and can read its
|
||||
/// source text or call `ctx.translate(...)` explicitly. Compare with
|
||||
/// the bare `@name` form, where the auto-translate prefix runs the
|
||||
/// same translation up front and the body sees the post-translate id.
|
||||
#[test]
|
||||
fn test_raw_capture_marker() {
|
||||
let lang: tree_sitter::Language = tree_sitter_ruby::LANGUAGE.into();
|
||||
let schema =
|
||||
yeast::node_types_yaml::schema_from_yaml_with_language(OUTPUT_SCHEMA_YAML, &lang).unwrap();
|
||||
let rules: Vec<Rule> = vec![
|
||||
yeast::rule!(
|
||||
(program (_)* @stmts)
|
||||
=>
|
||||
(program stmt: {stmts})
|
||||
),
|
||||
// `@@raw_lhs` is untranslated: the body reads its source text
|
||||
// ("x") and embeds it directly as the identifier content. `@rhs`
|
||||
// is auto-translated (rhs already points to (integer "INT")).
|
||||
yeast::rule!(
|
||||
(assignment left: (_) @@raw_lhs right: (_) @rhs)
|
||||
=>
|
||||
{
|
||||
let text = ctx.ast.source_text(raw_lhs);
|
||||
tree!((call
|
||||
method: (identifier #{text.as_str()})
|
||||
receiver: {rhs}))
|
||||
}
|
||||
),
|
||||
yeast::rule!((identifier) => (identifier "ID")),
|
||||
yeast::rule!((integer) => (integer "INT")),
|
||||
];
|
||||
let phases = vec![Phase::new("translate", PhaseKind::OneShot, rules)];
|
||||
let runner: Runner = Runner::with_schema(lang, &schema, &phases);
|
||||
|
||||
let input = "x = 1";
|
||||
let ast = runner.run(input).unwrap();
|
||||
let dump = dump_ast(&ast, ast.get_root(), input);
|
||||
// `method:` uses the raw source text ("x"); if `@@` were broken and
|
||||
// auto-translation ran on `raw_lhs`, it would still produce the
|
||||
// string "x" (source_text inherits the input range), so the dump
|
||||
// wouldn't change here. The companion test
|
||||
// `test_raw_capture_marker_explicit_translate` exercises the
|
||||
// stronger property that `ctx.translate(raw_lhs)?` succeeds and
|
||||
// produces the translated `(identifier "ID")`.
|
||||
assert_dump_eq(
|
||||
&dump,
|
||||
r#"
|
||||
program
|
||||
stmt:
|
||||
call
|
||||
method: identifier "x"
|
||||
receiver: integer "INT"
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
/// Companion to `test_raw_capture_marker`: confirms that calling
|
||||
/// `ctx.translate(raw)` on a `@@`-captured `Id` from the rule body
|
||||
/// produces the correctly-translated output-schema node. With `@`, the
|
||||
/// translation has already happened, so `ctx.translate(...)` inside the
|
||||
/// body would attempt to re-translate an output node (which has no
|
||||
/// matching rule and would error).
|
||||
#[test]
|
||||
fn test_raw_capture_marker_explicit_translate() {
|
||||
let lang: tree_sitter::Language = tree_sitter_ruby::LANGUAGE.into();
|
||||
let schema =
|
||||
yeast::node_types_yaml::schema_from_yaml_with_language(OUTPUT_SCHEMA_YAML, &lang).unwrap();
|
||||
let rules: Vec<Rule> = vec![
|
||||
yeast::rule!(
|
||||
(program (_)* @stmts)
|
||||
=>
|
||||
(program stmt: {stmts})
|
||||
),
|
||||
yeast::rule!(
|
||||
(assignment left: (_) @@raw_lhs right: (_) @rhs)
|
||||
=>
|
||||
{
|
||||
let translated_lhs = ctx.translate(raw_lhs)?;
|
||||
tree!((call
|
||||
method: {translated_lhs}
|
||||
receiver: {rhs}))
|
||||
}
|
||||
),
|
||||
yeast::rule!((identifier) => (identifier "ID")),
|
||||
yeast::rule!((integer) => (integer "INT")),
|
||||
];
|
||||
let phases = vec![Phase::new("translate", PhaseKind::OneShot, rules)];
|
||||
let runner: Runner = Runner::with_schema(lang, &schema, &phases);
|
||||
|
||||
let input = "x = 1";
|
||||
let ast = runner.run(input).unwrap();
|
||||
let dump = dump_ast(&ast, ast.get_root(), input);
|
||||
assert_dump_eq(
|
||||
&dump,
|
||||
r#"
|
||||
program
|
||||
stmt:
|
||||
call
|
||||
method: identifier "ID"
|
||||
receiver: integer "INT"
|
||||
"#,
|
||||
);
|
||||
}
|
||||
|
||||
// ---- Cursor tests ----
|
||||
|
||||
#[test]
|
||||
@@ -1067,11 +1176,11 @@ fn test_cursor_navigation() {
|
||||
let mut cursor = AstCursor::new(&ast);
|
||||
|
||||
// Start at root
|
||||
assert_eq!(cursor.node().kind(), "program");
|
||||
assert_eq!(cursor.node().kind_name(), "program");
|
||||
|
||||
// Go to first child (assignment)
|
||||
assert!(cursor.goto_first_child());
|
||||
assert_eq!(cursor.node().kind(), "assignment");
|
||||
assert_eq!(cursor.node().kind_name(), "assignment");
|
||||
|
||||
// No sibling
|
||||
assert!(!cursor.goto_next_sibling());
|
||||
@@ -1082,10 +1191,10 @@ fn test_cursor_navigation() {
|
||||
|
||||
// Go back up
|
||||
assert!(cursor.goto_parent());
|
||||
assert_eq!(cursor.node().kind(), "assignment");
|
||||
assert_eq!(cursor.node().kind_name(), "assignment");
|
||||
|
||||
assert!(cursor.goto_parent());
|
||||
assert_eq!(cursor.node().kind(), "program");
|
||||
assert_eq!(cursor.node().kind_name(), "program");
|
||||
|
||||
// Can't go further up
|
||||
assert!(!cursor.goto_parent());
|
||||
@@ -1130,10 +1239,8 @@ fn test_desugar_for_with_multiple_assignment() {
|
||||
}
|
||||
|
||||
/// Regression test: `#{capture}` in a template must render the *source text*
|
||||
/// of the captured node, not its arena `Id`. Previously, captures were bound
|
||||
/// as `usize`, so `#{cap}` printed the integer id (e.g. `"3"`) via `Display`.
|
||||
/// Captures are now bound as `NodeRef`, which has no `Display` impl and
|
||||
/// resolves to the captured node's source text via `YeastDisplay`.
|
||||
/// of the captured node, not its arena `Id`. Captures are bound as `Id`,
|
||||
/// whose `YeastDisplay` impl resolves to the captured node's source text.
|
||||
#[test]
|
||||
fn test_hash_brace_renders_capture_source_text() {
|
||||
let rule: Rule = rule!(
|
||||
@@ -1161,7 +1268,7 @@ fn test_hash_brace_renders_capture_source_text() {
|
||||
);
|
||||
}
|
||||
|
||||
/// Regression test: non-`NodeRef` values in `#{expr}` still render via their
|
||||
/// Regression test: non-`Id` values in `#{expr}` still render via their
|
||||
/// `Display` impl (covered by `YeastDisplay`'s blanket impls for primitives).
|
||||
#[test]
|
||||
fn test_hash_brace_renders_integer_expression() {
|
||||
@@ -1199,12 +1306,12 @@ fn test_hash_brace_uses_capture_location_for_leaf() {
|
||||
|
||||
let ast = run_and_ast("foo.bar()", vec![rule]);
|
||||
|
||||
let mut bar_ids: Vec<usize> = Vec::new();
|
||||
let mut bar_ids: Vec<yeast::Id> = Vec::new();
|
||||
for id in ast.reachable_node_ids() {
|
||||
let Some(node) = ast.get_node(id) else {
|
||||
continue;
|
||||
};
|
||||
if node.kind() == "identifier" && ast.source_text(id) == "bar" {
|
||||
if node.kind_name() == "identifier" && ast.source_text(id) == "bar" {
|
||||
bar_ids.push(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,11 @@ This is a CodeQL extractor based on tree-sitter.
|
||||
|
||||
- To run tests for the parser and mapping, run `cargo test` in the `extractor` directory.
|
||||
|
||||
- Do not edit the printed ASTs in `extractor/test/corpus` directly. To regenerate the ASTs, run `scripts/update-corpus.sh`.
|
||||
- Extractor test cases are located at `extractor/tests/corpus/swift/*/*.swift`.
|
||||
|
||||
- Each test case has a corresponding `.output` file containing its generated output along with a copy of the test case itself.
|
||||
|
||||
- Check the output files for correctness but do not edit them manually. Regenerate them with `scripts/update-corpus.sh`.
|
||||
|
||||
## CodeQL Testing
|
||||
- If you changed the extractor code, always rebuild it before running CodeQL tests.
|
||||
|
||||
@@ -5,6 +5,8 @@ column_kind: "utf8"
|
||||
legacy_qltest_extraction: true
|
||||
build_modes:
|
||||
- none
|
||||
default_queries:
|
||||
- codeql/unified-queries
|
||||
github_api_languages:
|
||||
- Swift
|
||||
scc_languages:
|
||||
|
||||
@@ -42,6 +42,7 @@ supertypes:
|
||||
- name_pattern
|
||||
- tuple_pattern
|
||||
- constructor_pattern
|
||||
- or_pattern
|
||||
- ignore_pattern
|
||||
- expr_equality_pattern
|
||||
- bulk_importing_pattern
|
||||
@@ -359,12 +360,12 @@ named:
|
||||
case*: switch_case
|
||||
|
||||
# A single `case ...:` (or `default:`) entry in a switch.
|
||||
# An entry with multiple `case p1, p2:` patterns has multiple `pattern`s.
|
||||
# A `default:` entry has no patterns.
|
||||
# An entry with multiple `case p1, p2:` patterns uses an `or_pattern`.
|
||||
# A `default:` entry has no pattern.
|
||||
# An optional `guard` corresponds to a `where`-clause on the case.
|
||||
switch_case:
|
||||
modifier*: modifier
|
||||
pattern*: pattern
|
||||
pattern?: pattern
|
||||
guard?: expr
|
||||
body: block
|
||||
|
||||
@@ -421,6 +422,11 @@ named:
|
||||
constructor: expr_or_type
|
||||
element*: pattern_element
|
||||
|
||||
# A disjunction pattern that matches if any of its sub-patterns match.
|
||||
or_pattern:
|
||||
modifier*: modifier
|
||||
pattern*: pattern
|
||||
|
||||
# A pattern with an optional associated name.
|
||||
pattern_element:
|
||||
modifier*: modifier
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
use codeql_extractor::extractor::simple;
|
||||
use yeast::{ConcreteDesugarer, DesugaringConfig, PhaseKind, Rule, manual_rule, rule, tree};
|
||||
use yeast::{ConcreteDesugarer, DesugaringConfig, PhaseKind, Rule, rule, tree};
|
||||
|
||||
/// User context propagated from outer rules down to the inner rules that
|
||||
/// emit the corresponding output declarations, so that each emitted node
|
||||
@@ -45,7 +45,7 @@ struct SwiftContext {
|
||||
/// Build a freshly-created `chained_declaration` modifier node if
|
||||
/// `ctx.is_chained`, else `None`. Used by inner declaration rules to
|
||||
/// emit the chained tag for non-first children of a flattening outer
|
||||
/// rule. Returns `Option<Id>` so it splices via `{..…}` to 0 or 1 ids.
|
||||
/// rule. Returns `Option<Id>` so it splices via `{…}` to 0 or 1 ids.
|
||||
fn chained_modifier(ctx: &mut yeast::build::BuildCtx<'_, SwiftContext>) -> Option<yeast::Id> {
|
||||
if ctx.is_chained {
|
||||
Some(ctx.literal("modifier", "chained_declaration"))
|
||||
@@ -63,10 +63,10 @@ fn chained_modifier(ctx: &mut yeast::build::BuildCtx<'_, SwiftContext>) -> Optio
|
||||
/// condition.
|
||||
fn and_chain(
|
||||
ctx: &mut yeast::build::BuildCtx<'_, SwiftContext>,
|
||||
conds: Vec<yeast::NodeRef>,
|
||||
conds: Vec<yeast::Id>,
|
||||
) -> yeast::Id {
|
||||
conds.into_iter()
|
||||
.map(yeast::Id::from)
|
||||
conds
|
||||
.into_iter()
|
||||
.reduce(|acc, elem| {
|
||||
tree!((binary_expr operator: (infix_operator "&&") left: {acc} right: {elem}))
|
||||
})
|
||||
@@ -79,7 +79,7 @@ fn and_chain(
|
||||
/// guarantees at least one part.
|
||||
fn member_chain(
|
||||
ctx: &mut yeast::build::BuildCtx<'_, SwiftContext>,
|
||||
parts: Vec<yeast::NodeRef>,
|
||||
parts: Vec<yeast::Id>,
|
||||
) -> yeast::Id {
|
||||
let mut iter = parts.into_iter();
|
||||
let first = iter
|
||||
@@ -100,7 +100,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(source_file statement: _* @children)
|
||||
=>
|
||||
(top_level
|
||||
body: (block stmt: {..children})
|
||||
body: (block stmt: {children})
|
||||
)
|
||||
),
|
||||
// Declarations may be wrapped in local/global wrapper nodes.
|
||||
@@ -144,12 +144,12 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
rule!(
|
||||
(operator_declaration "prefix" (referenceable_operator _ @op) (simple_identifier)? @prec)
|
||||
=>
|
||||
(operator_syntax_declaration name: (identifier #{op}) fixity: (fixity "prefix") precedence: {..prec})
|
||||
(operator_syntax_declaration name: (identifier #{op}) fixity: (fixity "prefix") precedence: {prec})
|
||||
),
|
||||
rule!(
|
||||
(operator_declaration "postfix" (referenceable_operator _ @op) (simple_identifier)? @prec)
|
||||
=>
|
||||
(operator_syntax_declaration name: (identifier #{op}) fixity: (fixity "postfix") precedence: {..prec})
|
||||
(operator_syntax_declaration name: (identifier #{op}) fixity: (fixity "postfix") precedence: {prec})
|
||||
),
|
||||
rule!(
|
||||
(operator_declaration "infix" (referenceable_operator _ @op) (simple_identifier)? @prec)
|
||||
@@ -157,7 +157,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(operator_syntax_declaration
|
||||
name: (identifier #{op})
|
||||
fixity: (fixity "infix")
|
||||
precedence: {..prec})
|
||||
precedence: {prec})
|
||||
),
|
||||
rule!((bitwise_operation lhs: @l op: @op rhs: @r) => (binary_expr left: {l} operator: (infix_operator #{op}) right: {r})),
|
||||
rule!((nil_coalescing_expression value: @l if_nil: @r) => (binary_expr left: {l} operator: (infix_operator "??") right: {r})),
|
||||
@@ -170,9 +170,9 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
rule!((postfix_expression operation: @op target: @operand) => (unary_expr operator: (postfix_operator #{op}) operand: {operand})),
|
||||
// TODO: Parenthesised single-value tuple is a grouping expression and should pass through.
|
||||
// Multi-value tuples become tuple_expr.
|
||||
rule!((tuple_expression value: _* @v) => (tuple_expr element: {..v})),
|
||||
rule!((tuple_expression value: _* @v) => (tuple_expr element: {v})),
|
||||
// Blocks contain statement* directly.
|
||||
rule!((block statement: _+ @stmts) => (block stmt: {..stmts})),
|
||||
rule!((block statement: _+ @stmts) => (block stmt: {stmts})),
|
||||
rule!((block) => (block)),
|
||||
// ---- Variables ----
|
||||
// property_binding rules — these produce variable_declaration and/or accessor_declaration
|
||||
@@ -192,21 +192,15 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
// this whole property_binding is itself a non-first declarator
|
||||
// of a containing property_declaration); subsequent accessors
|
||||
// always emit `chained_declaration`.
|
||||
manual_rule!(
|
||||
rule!(
|
||||
(property_binding
|
||||
name: @pattern
|
||||
type: _? @ty
|
||||
computed_value: (computed_property accessor: _+ @accessors))
|
||||
{
|
||||
// Translate `ty` first so the context holds an
|
||||
// output-schema node id.
|
||||
let translated_ty = ctx.translate_opt(ty)?;
|
||||
// Build the property-name identifier from the
|
||||
// (untranslated) pattern leaf.
|
||||
let name_id = tree!((identifier #{pattern}));
|
||||
|
||||
ctx.property_name = Some(name_id);
|
||||
ctx.property_type = translated_ty;
|
||||
computed_value: (computed_property accessor: _+ @@accessors))
|
||||
=>
|
||||
{{
|
||||
ctx.property_name = Some(tree!((identifier #{pattern})));
|
||||
ctx.property_type = ty;
|
||||
|
||||
let mut result = Vec::new();
|
||||
for (i, acc) in accessors.into_iter().enumerate() {
|
||||
@@ -215,8 +209,8 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
}
|
||||
result.extend(ctx.translate(acc)?);
|
||||
}
|
||||
Ok(result)
|
||||
}
|
||||
result
|
||||
}}
|
||||
),
|
||||
// Computed property: shorthand getter (no explicit get/set, just
|
||||
// statements) → a single accessor_declaration with kind "get".
|
||||
@@ -229,13 +223,13 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
computed_value: (computed_property statement: _* @body))
|
||||
=>
|
||||
(accessor_declaration
|
||||
modifier: {..ctx.binding_modifier}
|
||||
modifier: {..ctx.outer_modifiers.clone()}
|
||||
modifier: {..chained_modifier(&mut ctx)}
|
||||
modifier: {ctx.binding_modifier}
|
||||
modifier: {ctx.outer_modifiers.clone()}
|
||||
modifier: {chained_modifier(&mut ctx)}
|
||||
name: (identifier #{name})
|
||||
type: {..ty}
|
||||
type: {ty}
|
||||
accessor_kind: (accessor_kind "get")
|
||||
body: (block stmt: {..body}))
|
||||
body: (block stmt: {body}))
|
||||
),
|
||||
// Stored property with willSet/didSet observers (initializer
|
||||
// optional) → a `variable_declaration` followed by one
|
||||
@@ -248,26 +242,22 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
// The `variable_declaration` itself inherits the outer rule's
|
||||
// chained state; observers always get `chained_declaration`
|
||||
// because they're subsequent outputs of this flattening rule.
|
||||
manual_rule!(
|
||||
rule!(
|
||||
(property_binding
|
||||
name: (pattern bound_identifier: @name)
|
||||
type: _? @ty
|
||||
value: _? @val
|
||||
observers: (willset_didset_block willset: _? @ws didset: _? @ds))
|
||||
{
|
||||
// Translate ty and val so the variable_declaration
|
||||
// below contains output-schema nodes.
|
||||
let translated_ty = ctx.translate_opt(ty)?;
|
||||
let translated_val = ctx.translate_opt(val)?;
|
||||
|
||||
observers: (willset_didset_block willset: _? @@ws didset: _? @@ds))
|
||||
=>
|
||||
{{
|
||||
let var_decl = tree!(
|
||||
(variable_declaration
|
||||
modifier: {..ctx.binding_modifier}
|
||||
modifier: {..ctx.outer_modifiers.clone()}
|
||||
modifier: {..chained_modifier(&mut ctx)}
|
||||
modifier: {ctx.binding_modifier}
|
||||
modifier: {ctx.outer_modifiers.clone()}
|
||||
modifier: {chained_modifier(&mut ctx)}
|
||||
pattern: (name_pattern identifier: (identifier #{name}))
|
||||
type: {..translated_ty}
|
||||
value: {..translated_val})
|
||||
type: {ty}
|
||||
value: {val})
|
||||
);
|
||||
|
||||
// Publish the property name for the observer rules.
|
||||
@@ -280,8 +270,8 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
for obs in ws.into_iter().chain(ds) {
|
||||
result.extend(ctx.translate(obs)?);
|
||||
}
|
||||
Ok(result)
|
||||
}
|
||||
result
|
||||
}}
|
||||
),
|
||||
// property_binding with any pattern name (identifier or
|
||||
// destructuring). Reads outer modifiers / chained tag from `ctx`.
|
||||
@@ -292,12 +282,12 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
value: _? @val)
|
||||
=>
|
||||
(variable_declaration
|
||||
modifier: {..ctx.binding_modifier}
|
||||
modifier: {..ctx.outer_modifiers.clone()}
|
||||
modifier: {..chained_modifier(&mut ctx)}
|
||||
modifier: {ctx.binding_modifier}
|
||||
modifier: {ctx.outer_modifiers.clone()}
|
||||
modifier: {chained_modifier(&mut ctx)}
|
||||
pattern: {pattern}
|
||||
type: {..ty}
|
||||
value: {..val})
|
||||
type: {ty}
|
||||
value: {val})
|
||||
),
|
||||
// property_declaration: flatten declarators (each may translate
|
||||
// to multiple nodes — variable_declaration and/or
|
||||
@@ -309,27 +299,24 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
// inner declaration rules (`property_binding` variants,
|
||||
// accessor inner rules) read these fields and emit complete
|
||||
// `modifier:` lists from the start.
|
||||
manual_rule!(
|
||||
rule!(
|
||||
(property_declaration
|
||||
binding: (value_binding_pattern mutability: @binding_kind)
|
||||
declarator: _* @decls
|
||||
binding: (value_binding_pattern mutability: @@binding_kind)
|
||||
declarator: _* @@decls
|
||||
(modifiers)* @mods)
|
||||
{
|
||||
let binding_text = ctx.ast.source_text(binding_kind.0);
|
||||
=>
|
||||
{{
|
||||
let binding_text = ctx.ast.source_text(binding_kind);
|
||||
ctx.binding_modifier = Some(ctx.literal("modifier", &binding_text));
|
||||
let mut modifiers = Vec::new();
|
||||
for m in mods {
|
||||
modifiers.extend(ctx.translate(m)?);
|
||||
}
|
||||
ctx.outer_modifiers = modifiers;
|
||||
ctx.outer_modifiers = mods;
|
||||
|
||||
let mut result = Vec::new();
|
||||
for (i, decl) in decls.into_iter().enumerate() {
|
||||
ctx.is_chained = i > 0;
|
||||
result.extend(ctx.translate(decl)?);
|
||||
}
|
||||
Ok(result)
|
||||
}
|
||||
result
|
||||
}}
|
||||
),
|
||||
// ---- Enums ----
|
||||
// enum_type_parameter → parameter (with optional name as pattern).
|
||||
@@ -355,19 +342,19 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
data_contents: (enum_type_parameters parameter: _* @params))
|
||||
=>
|
||||
(class_like_declaration
|
||||
modifier: {..ctx.outer_modifiers.clone()}
|
||||
modifier: {..chained_modifier(&mut ctx)}
|
||||
modifier: {ctx.outer_modifiers.clone()}
|
||||
modifier: {chained_modifier(&mut ctx)}
|
||||
modifier: (modifier "enum_case")
|
||||
name: (identifier #{name})
|
||||
member: (constructor_declaration parameter: {..params} body: (block)))
|
||||
member: (constructor_declaration parameter: {params} body: (block)))
|
||||
),
|
||||
// enum_case_entry with explicit raw value → variable_declaration with that value.
|
||||
rule!(
|
||||
(enum_case_entry name: @name raw_value: @val)
|
||||
=>
|
||||
(variable_declaration
|
||||
modifier: {..ctx.outer_modifiers.clone()}
|
||||
modifier: {..chained_modifier(&mut ctx)}
|
||||
modifier: {ctx.outer_modifiers.clone()}
|
||||
modifier: {chained_modifier(&mut ctx)}
|
||||
modifier: (modifier "enum_case")
|
||||
pattern: (name_pattern identifier: (identifier #{name}))
|
||||
value: {val})
|
||||
@@ -377,8 +364,8 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(enum_case_entry name: @name)
|
||||
=>
|
||||
(variable_declaration
|
||||
modifier: {..ctx.outer_modifiers.clone()}
|
||||
modifier: {..chained_modifier(&mut ctx)}
|
||||
modifier: {ctx.outer_modifiers.clone()}
|
||||
modifier: {chained_modifier(&mut ctx)}
|
||||
modifier: (modifier "enum_case")
|
||||
pattern: (name_pattern identifier: (identifier #{name})))
|
||||
),
|
||||
@@ -386,22 +373,19 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
// into `ctx` and translate each case with `ctx.is_chained`
|
||||
// toggled per iteration so the inner `enum_case_entry` rules
|
||||
// emit complete `modifier:` lists from the start.
|
||||
manual_rule!(
|
||||
(enum_entry case: _+ @cases (modifiers)* @mods)
|
||||
{
|
||||
let mut modifiers = Vec::new();
|
||||
for m in mods {
|
||||
modifiers.extend(ctx.translate(m)?);
|
||||
}
|
||||
ctx.outer_modifiers = modifiers;
|
||||
rule!(
|
||||
(enum_entry case: _+ @@cases (modifiers)* @mods)
|
||||
=>
|
||||
{{
|
||||
ctx.outer_modifiers = mods;
|
||||
|
||||
let mut result = Vec::new();
|
||||
for (i, case) in cases.into_iter().enumerate() {
|
||||
ctx.is_chained = i > 0;
|
||||
result.extend(ctx.translate(case)?);
|
||||
}
|
||||
Ok(result)
|
||||
}
|
||||
result
|
||||
}}
|
||||
),
|
||||
// Plain assignment: `x = expr`
|
||||
rule!(
|
||||
@@ -434,7 +418,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
=>
|
||||
(constructor_pattern
|
||||
constructor: (member_access_expr base: {typ} member: (identifier #{name}))
|
||||
element: {..items})
|
||||
element: {items})
|
||||
),
|
||||
// case .foo(x,y) pattern
|
||||
rule!(
|
||||
@@ -442,10 +426,10 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
=>
|
||||
(constructor_pattern
|
||||
constructor: (member_access_expr base: (inferred_type_expr #{dot}) member: (identifier #{name}))
|
||||
element: {..items})
|
||||
element: {items})
|
||||
),
|
||||
// Tuple pattern and its (optionally named) items
|
||||
rule!((pattern kind: (tuple_pattern item: _* @elems)) => (tuple_pattern element: {..elems})),
|
||||
rule!((pattern kind: (tuple_pattern item: _* @elems)) => (tuple_pattern element: {elems})),
|
||||
rule!((tuple_pattern_item name: @key pattern: @pat) => (pattern_element key: (identifier #{key}) pattern: {pat})),
|
||||
rule!((tuple_pattern_item pattern: @pat) => (pattern_element pattern: {pat})),
|
||||
// Type casting pattern (TODO)
|
||||
@@ -468,20 +452,21 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
=>
|
||||
(function_declaration
|
||||
name: (identifier #{name})
|
||||
parameter: {..params}
|
||||
return_type: {..ret}
|
||||
body: (block stmt: {..body_stmts}))
|
||||
parameter: {params}
|
||||
return_type: {ret}
|
||||
body: (block stmt: {body_stmts}))
|
||||
),
|
||||
// Parameters are wrapped in function_parameter, which also carries
|
||||
// optional default values. Publishes the default value into `ctx`
|
||||
// before translating the inner `parameter` so the `parameter`
|
||||
// rules can include it as a `default:` field directly.
|
||||
manual_rule!(
|
||||
(function_parameter parameter: @p default_value: _? @def)
|
||||
{
|
||||
ctx.default_value = ctx.translate_opt(def)?;
|
||||
ctx.translate(p)
|
||||
}
|
||||
rule!(
|
||||
(function_parameter parameter: @@p default_value: _? @def)
|
||||
=>
|
||||
{{
|
||||
ctx.default_value = def;
|
||||
ctx.translate(p)?
|
||||
}}
|
||||
),
|
||||
// Parameter with external name and type
|
||||
rule!(
|
||||
@@ -490,7 +475,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(parameter
|
||||
external_name: (identifier #{ext})
|
||||
pattern: (name_pattern identifier: (identifier #{name}))
|
||||
default: {..ctx.default_value})
|
||||
default: {ctx.default_value})
|
||||
),
|
||||
rule!(
|
||||
(parameter external_name: @ext name: @name type: @ty)
|
||||
@@ -499,7 +484,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
external_name: (identifier #{ext})
|
||||
pattern: (name_pattern identifier: (identifier #{name}))
|
||||
type: {ty}
|
||||
default: {..ctx.default_value})
|
||||
default: {ctx.default_value})
|
||||
),
|
||||
// Parameter with just name and type (no external name)
|
||||
rule!(
|
||||
@@ -507,7 +492,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
=>
|
||||
(parameter
|
||||
pattern: (name_pattern identifier: (identifier #{name}))
|
||||
default: {..ctx.default_value})
|
||||
default: {ctx.default_value})
|
||||
),
|
||||
rule!(
|
||||
(parameter name: @name type: @ty)
|
||||
@@ -515,7 +500,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(parameter
|
||||
pattern: (name_pattern identifier: (identifier #{name}))
|
||||
type: {ty}
|
||||
default: {..ctx.default_value})
|
||||
default: {ctx.default_value})
|
||||
),
|
||||
// Reference to a function, f(x:y:z:). This is parsed as a call with a single argument with multiple reference_specifier labels.
|
||||
// We don't want downstream QL to try to handle this as a call_expr with a weird argument, so explicitly mark it as unsupported for now.
|
||||
@@ -529,7 +514,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
rule!(
|
||||
(call_expression function: @func suffix: (call_suffix arguments: (value_arguments argument: (value_argument)* @args)))
|
||||
=>
|
||||
(call_expr callee: {func} argument: {..args})
|
||||
(call_expr callee: {func} argument: {args})
|
||||
),
|
||||
// Value argument with label (value: _ matches both named nodes and anonymous tokens like nil)
|
||||
rule!(
|
||||
@@ -552,7 +537,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
// Return / break / continue, one rule per keyword.
|
||||
// The anonymous "return"/"break"/"continue" keywords are matched as
|
||||
// string literals.
|
||||
rule!((control_transfer_statement kind: "return" result: _? @val) => (return_expr value: {..val})),
|
||||
rule!((control_transfer_statement kind: "return" result: _? @val) => (return_expr value: {val})),
|
||||
rule!((control_transfer_statement kind: "break" result: @lbl) => (break_expr label: (identifier #{lbl}))),
|
||||
rule!((control_transfer_statement kind: "break") => (break_expr)),
|
||||
rule!((control_transfer_statement kind: "continue" result: @lbl) => (continue_expr label: (identifier #{lbl}))),
|
||||
@@ -571,20 +556,20 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
statement: _* @body)
|
||||
=>
|
||||
(function_expr
|
||||
modifier: {..attrs}
|
||||
capture_declaration: {..captures}
|
||||
parameter: {..params}
|
||||
return_type: {..ret}
|
||||
body: (block stmt: {..body}))
|
||||
modifier: {attrs}
|
||||
capture_declaration: {captures}
|
||||
parameter: {params}
|
||||
return_type: {ret}
|
||||
body: (block stmt: {body}))
|
||||
),
|
||||
// capture_list_item with ownership modifier (e.g. [weak self], [unowned x])
|
||||
rule!(
|
||||
(capture_list_item ownership: _? @ownership name: @name value: _? @val)
|
||||
=>
|
||||
(variable_declaration
|
||||
modifier: {..ownership}
|
||||
modifier: {ownership}
|
||||
pattern: (name_pattern identifier: (identifier #{name}))
|
||||
value: {..val})
|
||||
value: {val})
|
||||
),
|
||||
// Lambda parameter with type and optional external name
|
||||
rule!(
|
||||
@@ -630,7 +615,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(if_expr
|
||||
condition: {and_chain(&mut ctx, cond)}
|
||||
then: {then_body}
|
||||
else: {..else_stmts})
|
||||
else: {else_stmts})
|
||||
),
|
||||
// Guard statement
|
||||
rule!(
|
||||
@@ -638,7 +623,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
=>
|
||||
(guard_if_stmt
|
||||
condition: {and_chain(&mut ctx, cond)}
|
||||
else: (block stmt: {..else_stmts}))
|
||||
else: (block stmt: {else_stmts}))
|
||||
),
|
||||
// Ternary expression → if_expr
|
||||
rule!(
|
||||
@@ -650,27 +635,36 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
rule!(
|
||||
(switch_statement expr: @val entry: (switch_entry)* @cases)
|
||||
=>
|
||||
(switch_expr value: {val} case: {..cases})
|
||||
(switch_expr value: {val} case: {cases})
|
||||
),
|
||||
// Switch entry with patterns and body
|
||||
// Switch entry with multiple patterns and body
|
||||
rule!(
|
||||
(switch_entry pattern: (switch_pattern pattern: @pats)* statement: _* @body)
|
||||
(switch_entry
|
||||
pattern: (switch_pattern pattern: @first)
|
||||
pattern: (switch_pattern pattern: @rest)+
|
||||
statement: _* @body)
|
||||
=>
|
||||
(switch_case pattern: {..pats} body: (block stmt: {..body}))
|
||||
(switch_case pattern: (or_pattern pattern: {first} pattern: {rest}) body: (block stmt: {body}))
|
||||
),
|
||||
// Switch entry with exactly one pattern and body
|
||||
rule!(
|
||||
(switch_entry pattern: (switch_pattern pattern: @pat) statement: _* @body)
|
||||
=>
|
||||
(switch_case pattern: {pat} body: (block stmt: {body}))
|
||||
),
|
||||
// Switch entry: default case (no patterns)
|
||||
rule!(
|
||||
(switch_entry default: (default_keyword) statement: _* @body)
|
||||
=>
|
||||
(switch_case body: (block stmt: {..body}))
|
||||
(switch_case body: (block stmt: {body}))
|
||||
),
|
||||
// if case let x = expr — the pattern is taken as-is (no Optional wrapping)
|
||||
// if case PATTERN = expr — preserve the pattern directly (no Optional wrapping)
|
||||
rule!(
|
||||
(if_let_binding "case" (value_binding_pattern) bound_identifier: @name _ @val)
|
||||
(if_let_binding "case" pattern: @pat value: @val)
|
||||
=>
|
||||
(pattern_guard_expr
|
||||
value: {val}
|
||||
pattern: (name_pattern identifier: (identifier #{name})))
|
||||
pattern: {pat})
|
||||
),
|
||||
rule!(
|
||||
(if_let_binding
|
||||
@@ -708,8 +702,8 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(for_each_stmt
|
||||
pattern: {pat}
|
||||
iterable: {iter}
|
||||
guard: {..guard}
|
||||
body: (block stmt: {..body}))
|
||||
guard: {guard}
|
||||
body: (block stmt: {body}))
|
||||
),
|
||||
// While loop
|
||||
rule!(
|
||||
@@ -717,7 +711,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
=>
|
||||
(while_stmt
|
||||
condition: {and_chain(&mut ctx, cond)}
|
||||
body: (block stmt: {..body}))
|
||||
body: (block stmt: {body}))
|
||||
),
|
||||
// Repeat-while loop
|
||||
rule!(
|
||||
@@ -725,28 +719,28 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
=>
|
||||
(do_while_stmt
|
||||
condition: {and_chain(&mut ctx, cond)}
|
||||
body: (block stmt: {..body}))
|
||||
body: (block stmt: {body}))
|
||||
),
|
||||
// Labeled statement (e.g. `outer: for ...`). Strip the trailing ':' from the label token.
|
||||
rule!((labeled_statement label: (statement_label) @lbl statement: @stmt) => {
|
||||
let text = ctx.ast.source_text(lbl.into());
|
||||
let text = ctx.ast.source_text(lbl);
|
||||
let name = &text[..text.len() - 1];
|
||||
tree!((labeled_stmt label: (identifier #{name}) stmt: {stmt}))
|
||||
}),
|
||||
// ---- Collections ----
|
||||
// Array literal
|
||||
rule!((array_literal element: _* @elems) => (array_literal element: {..elems})),
|
||||
rule!((array_literal element: _* @elems) => (array_literal element: {elems})),
|
||||
// Empty array literal
|
||||
rule!((array_literal) => (array_literal)),
|
||||
// Dictionary literal — zip keys and values into key_value_pairs
|
||||
rule!(
|
||||
(dictionary_literal key: _* @keys value: _* @vals)
|
||||
=>
|
||||
(map_literal element: {..keys.into_iter().zip(vals).map(|(k, v)|
|
||||
(map_literal element: {keys.into_iter().zip(vals).map(|(k, v)|
|
||||
tree!((key_value_pair key: {k} value: {v}))
|
||||
)})
|
||||
),
|
||||
rule!((dictionary_literal element: _* @elems) => (map_literal element: {..elems})),
|
||||
rule!((dictionary_literal element: _* @elems) => (map_literal element: {elems})),
|
||||
rule!((dictionary_literal_item key: @k value: @v) => (key_value_pair key: {k} value: {v})),
|
||||
// ---- Optionals and errors ----
|
||||
// Optional chaining — unwrap the marker
|
||||
@@ -759,8 +753,8 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(do_statement body: (block statement: _* @body) catch: (catch_block)* @catches)
|
||||
=>
|
||||
(try_expr
|
||||
body: (block stmt: {..body})
|
||||
catch_clause: {..catches})
|
||||
body: (block stmt: {body})
|
||||
catch_clause: {catches})
|
||||
),
|
||||
// Catch block with bound identifier; optional where-clause guard.
|
||||
rule!(
|
||||
@@ -772,14 +766,14 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
=>
|
||||
(catch_clause
|
||||
pattern: {pattern}
|
||||
guard: {..guard}
|
||||
body: (block stmt: {..body}))
|
||||
guard: {guard}
|
||||
body: (block stmt: {body}))
|
||||
),
|
||||
// Catch block without error binding
|
||||
rule!(
|
||||
(catch_block keyword: (catch_keyword) body: (block statement: _* @body))
|
||||
=>
|
||||
(catch_clause body: (block stmt: {..body}))
|
||||
(catch_clause body: (block stmt: {body}))
|
||||
),
|
||||
// Empty catch block: catch {}
|
||||
rule!(
|
||||
@@ -793,7 +787,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
=>
|
||||
(catch_clause
|
||||
pattern: {pat}
|
||||
body: (block stmt: {..body}))
|
||||
body: (block stmt: {body}))
|
||||
),
|
||||
// As expression (type cast) — as?, as!
|
||||
rule!((as_expression (as_operator) @op expr: @val type: @ty) => (type_cast_expr expr: {val} operator: (infix_operator #{op}) type: {ty})),
|
||||
@@ -818,7 +812,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
pattern: (name_pattern identifier: (identifier #{parts.last().unwrap()}))
|
||||
imported_expr: {name}
|
||||
modifier: (modifier #{kind})
|
||||
modifier: {..mods})
|
||||
modifier: {mods})
|
||||
),
|
||||
// Non-scoped import declaration (for example `import Foundation`):
|
||||
// flatten the identifier parts into a member_access_expr and use a
|
||||
@@ -829,7 +823,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(import_declaration
|
||||
pattern: (bulk_importing_pattern)
|
||||
imported_expr: {name}
|
||||
modifier: {..mods})
|
||||
modifier: {mods})
|
||||
),
|
||||
// ---- Types and classes ----
|
||||
// Self expression → name_expr
|
||||
@@ -837,7 +831,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
// Super expression → super_expr
|
||||
rule!((super_expression) => (super_expr)),
|
||||
// Modifiers — unwrap to individual modifier children
|
||||
rule!((modifiers _* @mods) => {..mods}),
|
||||
rule!((modifiers _* @mods) => {mods}),
|
||||
rule!((attribute) @m => (modifier #{m})),
|
||||
rule!((visibility_modifier) @m => (modifier #{m})),
|
||||
rule!((function_modifier) @m => (modifier #{m})),
|
||||
@@ -854,7 +848,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
// Keep a conservative textual fallback to avoid dropping type information.
|
||||
rule!((user_type) @ty => (named_type_expr name: (identifier #{ty}))),
|
||||
// Tuple type → tuple_type_expr
|
||||
rule!((tuple_type element: _* @elems) => (tuple_type_expr element: {..elems})),
|
||||
rule!((tuple_type element: _* @elems) => (tuple_type_expr element: {elems})),
|
||||
rule!((tuple_type_item name: @name type: @ty) => (tuple_type_element name: (identifier #{name}) type: {ty})),
|
||||
rule!((tuple_type_item type: @ty) => (tuple_type_element type: {ty})),
|
||||
// Array type `[T]` → generic_type_expr with Array base
|
||||
@@ -871,7 +865,7 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
base: (named_type_expr name: (identifier "Optional"))
|
||||
type_argument: {w})),
|
||||
// Function type `(Params) -> Ret` → function_type_expr.
|
||||
rule!((function_type parameter: _* @ps return_type: @ret) => (function_type_expr parameter: {..ps} return_type: {ret})),
|
||||
rule!((function_type parameter: _* @ps return_type: @ret) => (function_type_expr parameter: {ps} return_type: {ret})),
|
||||
rule!((function_type_parameter name: @name type: @ty) => (parameter external_name: (identifier #{name}) type: {ty})),
|
||||
rule!((function_type_parameter type: @ty) => (parameter type: {ty})),
|
||||
// Selector expression: `#selector(inner)` -- not yet supported
|
||||
@@ -895,10 +889,10 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
=>
|
||||
(class_like_declaration
|
||||
modifier: (modifier #{kind})
|
||||
modifier: {..mods}
|
||||
modifier: {mods}
|
||||
name: (identifier #{name})
|
||||
base_type: {..bases}
|
||||
member: {..members})
|
||||
base_type: {bases}
|
||||
member: {members})
|
||||
),
|
||||
// Enum class declaration: same as a regular class but with an enum body.
|
||||
rule!(
|
||||
@@ -911,10 +905,10 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
=>
|
||||
(class_like_declaration
|
||||
modifier: (modifier #{kind})
|
||||
modifier: {..mods}
|
||||
modifier: {mods}
|
||||
name: (identifier #{name})
|
||||
base_type: {..bases}
|
||||
member: {..members})
|
||||
base_type: {bases}
|
||||
member: {members})
|
||||
),
|
||||
// Class declaration with empty body
|
||||
rule!(
|
||||
@@ -927,9 +921,9 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
=>
|
||||
(class_like_declaration
|
||||
modifier: (modifier #{kind})
|
||||
modifier: {..mods}
|
||||
modifier: {mods}
|
||||
name: (identifier #{name})
|
||||
base_type: {..bases})
|
||||
base_type: {bases})
|
||||
),
|
||||
// Protocol declaration
|
||||
rule!(
|
||||
@@ -941,10 +935,10 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
=>
|
||||
(class_like_declaration
|
||||
modifier: (modifier "protocol")
|
||||
modifier: {..mods}
|
||||
modifier: {mods}
|
||||
name: (identifier #{name})
|
||||
base_type: {..bases}
|
||||
member: {..members})
|
||||
base_type: {bases}
|
||||
member: {members})
|
||||
),
|
||||
// Protocol function — return type and body statements both optional.
|
||||
rule!(
|
||||
@@ -956,11 +950,11 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(modifiers)* @mods)
|
||||
=>
|
||||
(function_declaration
|
||||
modifier: {..mods}
|
||||
modifier: {mods}
|
||||
name: (identifier #{name})
|
||||
parameter: {..params}
|
||||
return_type: {..ret}
|
||||
body: (block stmt: {..body_stmts}))
|
||||
parameter: {params}
|
||||
return_type: {ret}
|
||||
body: (block stmt: {body_stmts}))
|
||||
),
|
||||
// Init declaration → constructor_declaration. Body statements optional;
|
||||
// body itself is also optional (protocol requirement).
|
||||
@@ -971,9 +965,9 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(modifiers)* @mods)
|
||||
=>
|
||||
(constructor_declaration
|
||||
modifier: {..mods}
|
||||
parameter: {..params}
|
||||
body: (block stmt: {..body_stmts}))
|
||||
modifier: {mods}
|
||||
parameter: {params}
|
||||
body: (block stmt: {body_stmts}))
|
||||
),
|
||||
// Deinit declaration → destructor_declaration. Body statements optional.
|
||||
rule!(
|
||||
@@ -982,15 +976,15 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(modifiers)* @mods)
|
||||
=>
|
||||
(destructor_declaration
|
||||
modifier: {..mods}
|
||||
body: (block stmt: {..body_stmts}))
|
||||
modifier: {mods}
|
||||
body: (block stmt: {body_stmts}))
|
||||
),
|
||||
// Typealias declaration
|
||||
rule!(
|
||||
(typealias_declaration name: @name value: @val (modifiers)* @mods)
|
||||
=>
|
||||
(type_alias_declaration
|
||||
modifier: {..mods}
|
||||
modifier: {mods}
|
||||
name: (identifier #{name})
|
||||
r#type: {val})
|
||||
),
|
||||
@@ -1005,9 +999,9 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(associatedtype_declaration name: @name inherits_from: _? @bound (modifiers)* @mods)
|
||||
=>
|
||||
(associated_type_declaration
|
||||
modifier: {..mods}
|
||||
modifier: {mods}
|
||||
name: (identifier #{name})
|
||||
bound: {..bound})
|
||||
bound: {bound})
|
||||
),
|
||||
// Protocol property declaration: translate each accessor
|
||||
// requirement to an `accessor_declaration` carrying the property
|
||||
@@ -1017,28 +1011,25 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
// inner `getter_specifier`/`setter_specifier` rules emit
|
||||
// complete nodes from the start (including the
|
||||
// `chained_declaration` tag for non-first accessors).
|
||||
manual_rule!(
|
||||
rule!(
|
||||
(protocol_property_declaration
|
||||
name: (pattern bound_identifier: @name)
|
||||
requirements: (protocol_property_requirements accessor: _+ @accessors)
|
||||
requirements: (protocol_property_requirements accessor: _+ @@accessors)
|
||||
type: _? @ty
|
||||
(modifiers)* @mods)
|
||||
{
|
||||
=>
|
||||
{{
|
||||
ctx.property_name = Some(tree!((identifier #{name})));
|
||||
ctx.property_type = ctx.translate_opt(ty)?;
|
||||
let mut modifiers = Vec::new();
|
||||
for m in mods {
|
||||
modifiers.extend(ctx.translate(m)?);
|
||||
}
|
||||
ctx.outer_modifiers = modifiers;
|
||||
ctx.property_type = ty;
|
||||
ctx.outer_modifiers = mods;
|
||||
|
||||
let mut result = Vec::new();
|
||||
for (i, acc) in accessors.into_iter().enumerate() {
|
||||
ctx.is_chained = i > 0;
|
||||
result.extend(ctx.translate(acc)?);
|
||||
}
|
||||
Ok(result)
|
||||
}
|
||||
result
|
||||
}}
|
||||
),
|
||||
// getter_specifier / setter_specifier → bodyless accessor_declaration
|
||||
// getter_specifier / setter_specifier → bodyless
|
||||
@@ -1049,23 +1040,23 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
=>
|
||||
(accessor_declaration
|
||||
name: {ctx.property_name.ok_or("getter_specifier outside protocol_property_declaration context")?}
|
||||
type: {..ctx.property_type}
|
||||
type: {ctx.property_type}
|
||||
accessor_kind: (accessor_kind "get")
|
||||
modifier: {..ctx.outer_modifiers.clone()}
|
||||
modifier: {..chained_modifier(&mut ctx)})
|
||||
modifier: {ctx.outer_modifiers.clone()}
|
||||
modifier: {chained_modifier(&mut ctx)})
|
||||
),
|
||||
rule!(
|
||||
(setter_specifier)
|
||||
=>
|
||||
(accessor_declaration
|
||||
name: {ctx.property_name.ok_or("setter_specifier outside protocol_property_declaration context")?}
|
||||
type: {..ctx.property_type}
|
||||
type: {ctx.property_type}
|
||||
accessor_kind: (accessor_kind "set")
|
||||
modifier: {..ctx.outer_modifiers.clone()}
|
||||
modifier: {..chained_modifier(&mut ctx)})
|
||||
modifier: {ctx.outer_modifiers.clone()}
|
||||
modifier: {chained_modifier(&mut ctx)})
|
||||
),
|
||||
// protocol_property_requirements wrapper — should be consumed by above; fallback
|
||||
rule!((protocol_property_requirements accessor: _* @accs) => {..accs}),
|
||||
rule!((protocol_property_requirements accessor: _* @accs) => {accs}),
|
||||
// Computed getter → accessor_declaration (body optional).
|
||||
// Reads property name/type from the outer property_binding rule
|
||||
// and binding/outer modifiers + chained tag from the outer
|
||||
@@ -1074,58 +1065,58 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(computed_getter body: (block statement: _* @body)?)
|
||||
=>
|
||||
(accessor_declaration
|
||||
modifier: {..ctx.binding_modifier}
|
||||
modifier: {..ctx.outer_modifiers.clone()}
|
||||
modifier: {..chained_modifier(&mut ctx)}
|
||||
modifier: {ctx.binding_modifier}
|
||||
modifier: {ctx.outer_modifiers.clone()}
|
||||
modifier: {chained_modifier(&mut ctx)}
|
||||
name: {ctx.property_name.ok_or("computed_getter outside property_binding context")?}
|
||||
type: {..ctx.property_type}
|
||||
type: {ctx.property_type}
|
||||
accessor_kind: (accessor_kind "get")
|
||||
body: (block stmt: {..body}))
|
||||
body: (block stmt: {body}))
|
||||
),
|
||||
// Computed setter with explicit parameter name.
|
||||
rule!(
|
||||
(computed_setter parameter: @param body: (block statement: _* @body))
|
||||
=>
|
||||
(accessor_declaration
|
||||
modifier: {..ctx.binding_modifier}
|
||||
modifier: {..ctx.outer_modifiers.clone()}
|
||||
modifier: {..chained_modifier(&mut ctx)}
|
||||
modifier: {ctx.binding_modifier}
|
||||
modifier: {ctx.outer_modifiers.clone()}
|
||||
modifier: {chained_modifier(&mut ctx)}
|
||||
name: {ctx.property_name.ok_or("computed_setter outside property_binding context")?}
|
||||
type: {..ctx.property_type}
|
||||
type: {ctx.property_type}
|
||||
accessor_kind: (accessor_kind "set")
|
||||
parameter: (parameter pattern: (name_pattern identifier: (identifier #{param})))
|
||||
body: (block stmt: {..body}))
|
||||
body: (block stmt: {body}))
|
||||
),
|
||||
// Computed setter without explicit parameter name; body optional.
|
||||
rule!(
|
||||
(computed_setter body: (block statement: _* @body)?)
|
||||
=>
|
||||
(accessor_declaration
|
||||
modifier: {..ctx.binding_modifier}
|
||||
modifier: {..ctx.outer_modifiers.clone()}
|
||||
modifier: {..chained_modifier(&mut ctx)}
|
||||
modifier: {ctx.binding_modifier}
|
||||
modifier: {ctx.outer_modifiers.clone()}
|
||||
modifier: {chained_modifier(&mut ctx)}
|
||||
name: {ctx.property_name.ok_or("computed_setter outside property_binding context")?}
|
||||
type: {..ctx.property_type}
|
||||
type: {ctx.property_type}
|
||||
accessor_kind: (accessor_kind "set")
|
||||
body: (block stmt: {..body}))
|
||||
body: (block stmt: {body}))
|
||||
),
|
||||
// Computed modify → accessor_declaration
|
||||
rule!(
|
||||
(computed_modify body: (block statement: _* @body))
|
||||
=>
|
||||
(accessor_declaration
|
||||
modifier: {..ctx.binding_modifier}
|
||||
modifier: {..ctx.outer_modifiers.clone()}
|
||||
modifier: {..chained_modifier(&mut ctx)}
|
||||
modifier: {ctx.binding_modifier}
|
||||
modifier: {ctx.outer_modifiers.clone()}
|
||||
modifier: {chained_modifier(&mut ctx)}
|
||||
name: {ctx.property_name.ok_or("computed_modify outside property_binding context")?}
|
||||
type: {..ctx.property_type}
|
||||
type: {ctx.property_type}
|
||||
accessor_kind: (accessor_kind "modify")
|
||||
body: (block stmt: {..body}))
|
||||
body: (block stmt: {body}))
|
||||
),
|
||||
// willset/didset block — spread to children (only reachable as a
|
||||
// fallback; the outer property_binding manual rule normally
|
||||
// captures the willset/didset clauses directly).
|
||||
rule!((willset_didset_block _* @clauses) => {..clauses}),
|
||||
rule!((willset_didset_block _* @clauses) => {clauses}),
|
||||
// willset clause → accessor_declaration (body optional). Reads
|
||||
// `ctx.property_name` set by the outer property_binding rule and
|
||||
// binding/outer modifiers + chained tag from the outer
|
||||
@@ -1134,24 +1125,24 @@ fn translation_rules() -> Vec<Rule<SwiftContext>> {
|
||||
(willset_clause body: (block statement: _* @body)?)
|
||||
=>
|
||||
(accessor_declaration
|
||||
modifier: {..ctx.binding_modifier}
|
||||
modifier: {..ctx.outer_modifiers.clone()}
|
||||
modifier: {..chained_modifier(&mut ctx)}
|
||||
modifier: {ctx.binding_modifier}
|
||||
modifier: {ctx.outer_modifiers.clone()}
|
||||
modifier: {chained_modifier(&mut ctx)}
|
||||
name: {ctx.property_name.ok_or("willset_clause outside property_binding context")?}
|
||||
accessor_kind: (accessor_kind "willSet")
|
||||
body: (block stmt: {..body}))
|
||||
body: (block stmt: {body}))
|
||||
),
|
||||
// didset clause → accessor_declaration (body optional).
|
||||
rule!(
|
||||
(didset_clause body: (block statement: _* @body)?)
|
||||
=>
|
||||
(accessor_declaration
|
||||
modifier: {..ctx.binding_modifier}
|
||||
modifier: {..ctx.outer_modifiers.clone()}
|
||||
modifier: {..chained_modifier(&mut ctx)}
|
||||
modifier: {ctx.binding_modifier}
|
||||
modifier: {ctx.outer_modifiers.clone()}
|
||||
modifier: {chained_modifier(&mut ctx)}
|
||||
name: {ctx.property_name.ok_or("didset_clause outside property_binding context")?}
|
||||
accessor_kind: (accessor_kind "didSet")
|
||||
body: (block stmt: {..body}))
|
||||
body: (block stmt: {body}))
|
||||
),
|
||||
// Preprocessor conditionals — unsupported
|
||||
rule!((diagnostic) => (unsupported_node)),
|
||||
|
||||
@@ -1,377 +0,0 @@
|
||||
===
|
||||
Closure with explicit parameters
|
||||
===
|
||||
|
||||
let f = { (x: Int) -> Int in x * 2 }
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "f"
|
||||
value:
|
||||
lambda_literal
|
||||
statement:
|
||||
multiplicative_expression
|
||||
lhs: simple_identifier "x"
|
||||
op: *
|
||||
rhs: integer_literal "2"
|
||||
type:
|
||||
lambda_function_type
|
||||
params:
|
||||
lambda_function_type_parameters
|
||||
parameter:
|
||||
lambda_parameter
|
||||
name: simple_identifier "x"
|
||||
type:
|
||||
type
|
||||
name:
|
||||
user_type
|
||||
part:
|
||||
simple_user_type
|
||||
name: type_identifier "Int"
|
||||
return_type:
|
||||
type
|
||||
name:
|
||||
user_type
|
||||
part:
|
||||
simple_user_type
|
||||
name: type_identifier "Int"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "f"
|
||||
value:
|
||||
function_expr
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
binary_expr
|
||||
operator: infix_operator "*"
|
||||
left:
|
||||
name_expr
|
||||
identifier: identifier "x"
|
||||
right: int_literal "2"
|
||||
parameter:
|
||||
parameter
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "x"
|
||||
type:
|
||||
named_type_expr
|
||||
name: identifier "Int"
|
||||
return_type:
|
||||
named_type_expr
|
||||
name: identifier "Int"
|
||||
|
||||
===
|
||||
Closure with shorthand parameters
|
||||
===
|
||||
|
||||
let f = { $0 + $1 }
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "f"
|
||||
value:
|
||||
lambda_literal
|
||||
statement:
|
||||
additive_expression
|
||||
lhs: simple_identifier "$0"
|
||||
op: +
|
||||
rhs: simple_identifier "$1"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "f"
|
||||
value:
|
||||
function_expr
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
binary_expr
|
||||
operator: infix_operator "+"
|
||||
left:
|
||||
name_expr
|
||||
identifier: identifier "$0"
|
||||
right:
|
||||
name_expr
|
||||
identifier: identifier "$1"
|
||||
|
||||
===
|
||||
Trailing closure
|
||||
===
|
||||
|
||||
xs.map { $0 * 2 }
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
call_expression
|
||||
function:
|
||||
navigation_expression
|
||||
suffix:
|
||||
navigation_suffix
|
||||
suffix: simple_identifier "map"
|
||||
target: simple_identifier "xs"
|
||||
suffix:
|
||||
call_suffix
|
||||
lambda:
|
||||
lambda_literal
|
||||
statement:
|
||||
multiplicative_expression
|
||||
lhs: simple_identifier "$0"
|
||||
op: *
|
||||
rhs: integer_literal "2"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
call_expr
|
||||
argument:
|
||||
argument
|
||||
value:
|
||||
function_expr
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
binary_expr
|
||||
operator: infix_operator "*"
|
||||
left:
|
||||
name_expr
|
||||
identifier: identifier "$0"
|
||||
right: int_literal "2"
|
||||
callee:
|
||||
member_access_expr
|
||||
base:
|
||||
name_expr
|
||||
identifier: identifier "xs"
|
||||
member: identifier "map"
|
||||
|
||||
===
|
||||
Closure with capture list
|
||||
===
|
||||
|
||||
let f = { [weak self] in self?.doThing() }
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "f"
|
||||
value:
|
||||
lambda_literal
|
||||
captures:
|
||||
capture_list
|
||||
item:
|
||||
capture_list_item
|
||||
name: simple_identifier "self"
|
||||
ownership:
|
||||
ownership_modifier
|
||||
statement:
|
||||
call_expression
|
||||
function:
|
||||
navigation_expression
|
||||
suffix:
|
||||
navigation_suffix
|
||||
suffix: simple_identifier "doThing"
|
||||
target:
|
||||
optional_chain_marker
|
||||
expr:
|
||||
self_expression
|
||||
suffix:
|
||||
call_suffix
|
||||
arguments:
|
||||
value_arguments
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "f"
|
||||
value:
|
||||
function_expr
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
call_expr
|
||||
callee:
|
||||
member_access_expr
|
||||
base:
|
||||
name_expr
|
||||
identifier: identifier "self"
|
||||
member: identifier "doThing"
|
||||
capture_declaration:
|
||||
variable_declaration
|
||||
modifier: modifier "weak"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "self"
|
||||
|
||||
===
|
||||
Multi-statement closure
|
||||
===
|
||||
|
||||
let f = { (x: Int) -> Int in
|
||||
let y = x + 1
|
||||
return y * 2
|
||||
}
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "f"
|
||||
value:
|
||||
lambda_literal
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "y"
|
||||
value:
|
||||
additive_expression
|
||||
lhs: simple_identifier "x"
|
||||
op: +
|
||||
rhs: integer_literal "1"
|
||||
control_transfer_statement
|
||||
kind: return
|
||||
result:
|
||||
multiplicative_expression
|
||||
lhs: simple_identifier "y"
|
||||
op: *
|
||||
rhs: integer_literal "2"
|
||||
type:
|
||||
lambda_function_type
|
||||
params:
|
||||
lambda_function_type_parameters
|
||||
parameter:
|
||||
lambda_parameter
|
||||
name: simple_identifier "x"
|
||||
type:
|
||||
type
|
||||
name:
|
||||
user_type
|
||||
part:
|
||||
simple_user_type
|
||||
name: type_identifier "Int"
|
||||
return_type:
|
||||
type
|
||||
name:
|
||||
user_type
|
||||
part:
|
||||
simple_user_type
|
||||
name: type_identifier "Int"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "f"
|
||||
value:
|
||||
function_expr
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "y"
|
||||
value:
|
||||
binary_expr
|
||||
operator: infix_operator "+"
|
||||
left:
|
||||
name_expr
|
||||
identifier: identifier "x"
|
||||
right: int_literal "1"
|
||||
return_expr
|
||||
value:
|
||||
binary_expr
|
||||
operator: infix_operator "*"
|
||||
left:
|
||||
name_expr
|
||||
identifier: identifier "y"
|
||||
right: int_literal "2"
|
||||
parameter:
|
||||
parameter
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "x"
|
||||
type:
|
||||
named_type_expr
|
||||
name: identifier "Int"
|
||||
return_type:
|
||||
named_type_expr
|
||||
name: identifier "Int"
|
||||
@@ -0,0 +1,69 @@
|
||||
let f = { [weak self] in self?.doThing() }
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "f"
|
||||
value:
|
||||
lambda_literal
|
||||
captures:
|
||||
capture_list
|
||||
item:
|
||||
capture_list_item
|
||||
name: simple_identifier "self"
|
||||
ownership:
|
||||
ownership_modifier
|
||||
statement:
|
||||
call_expression
|
||||
function:
|
||||
navigation_expression
|
||||
suffix:
|
||||
navigation_suffix
|
||||
suffix: simple_identifier "doThing"
|
||||
target:
|
||||
optional_chain_marker
|
||||
expr:
|
||||
self_expression
|
||||
suffix:
|
||||
call_suffix
|
||||
arguments:
|
||||
value_arguments
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "f"
|
||||
value:
|
||||
function_expr
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
call_expr
|
||||
callee:
|
||||
member_access_expr
|
||||
base:
|
||||
name_expr
|
||||
identifier: identifier "self"
|
||||
member: identifier "doThing"
|
||||
capture_declaration:
|
||||
variable_declaration
|
||||
modifier: modifier "weak"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "self"
|
||||
@@ -0,0 +1 @@
|
||||
let f = { [weak self] in self?.doThing() }
|
||||
@@ -0,0 +1,77 @@
|
||||
let f = { (x: Int) -> Int in x * 2 }
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "f"
|
||||
value:
|
||||
lambda_literal
|
||||
statement:
|
||||
multiplicative_expression
|
||||
lhs: simple_identifier "x"
|
||||
op: *
|
||||
rhs: integer_literal "2"
|
||||
type:
|
||||
lambda_function_type
|
||||
params:
|
||||
lambda_function_type_parameters
|
||||
parameter:
|
||||
lambda_parameter
|
||||
name: simple_identifier "x"
|
||||
type:
|
||||
type
|
||||
name:
|
||||
user_type
|
||||
part:
|
||||
simple_user_type
|
||||
name: type_identifier "Int"
|
||||
return_type:
|
||||
type
|
||||
name:
|
||||
user_type
|
||||
part:
|
||||
simple_user_type
|
||||
name: type_identifier "Int"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "f"
|
||||
value:
|
||||
function_expr
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
binary_expr
|
||||
operator: infix_operator "*"
|
||||
left:
|
||||
name_expr
|
||||
identifier: identifier "x"
|
||||
right: int_literal "2"
|
||||
parameter:
|
||||
parameter
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "x"
|
||||
type:
|
||||
named_type_expr
|
||||
name: identifier "Int"
|
||||
return_type:
|
||||
named_type_expr
|
||||
name: identifier "Int"
|
||||
@@ -0,0 +1 @@
|
||||
let f = { (x: Int) -> Int in x * 2 }
|
||||
@@ -0,0 +1,47 @@
|
||||
let f = { $0 + $1 }
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "f"
|
||||
value:
|
||||
lambda_literal
|
||||
statement:
|
||||
additive_expression
|
||||
lhs: simple_identifier "$0"
|
||||
op: +
|
||||
rhs: simple_identifier "$1"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "f"
|
||||
value:
|
||||
function_expr
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
binary_expr
|
||||
operator: infix_operator "+"
|
||||
left:
|
||||
name_expr
|
||||
identifier: identifier "$0"
|
||||
right:
|
||||
name_expr
|
||||
identifier: identifier "$1"
|
||||
@@ -0,0 +1 @@
|
||||
let f = { $0 + $1 }
|
||||
@@ -0,0 +1,111 @@
|
||||
let f = { (x: Int) -> Int in
|
||||
let y = x + 1
|
||||
return y * 2
|
||||
}
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "f"
|
||||
value:
|
||||
lambda_literal
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "y"
|
||||
value:
|
||||
additive_expression
|
||||
lhs: simple_identifier "x"
|
||||
op: +
|
||||
rhs: integer_literal "1"
|
||||
control_transfer_statement
|
||||
kind: return
|
||||
result:
|
||||
multiplicative_expression
|
||||
lhs: simple_identifier "y"
|
||||
op: *
|
||||
rhs: integer_literal "2"
|
||||
type:
|
||||
lambda_function_type
|
||||
params:
|
||||
lambda_function_type_parameters
|
||||
parameter:
|
||||
lambda_parameter
|
||||
name: simple_identifier "x"
|
||||
type:
|
||||
type
|
||||
name:
|
||||
user_type
|
||||
part:
|
||||
simple_user_type
|
||||
name: type_identifier "Int"
|
||||
return_type:
|
||||
type
|
||||
name:
|
||||
user_type
|
||||
part:
|
||||
simple_user_type
|
||||
name: type_identifier "Int"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "f"
|
||||
value:
|
||||
function_expr
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "y"
|
||||
value:
|
||||
binary_expr
|
||||
operator: infix_operator "+"
|
||||
left:
|
||||
name_expr
|
||||
identifier: identifier "x"
|
||||
right: int_literal "1"
|
||||
return_expr
|
||||
value:
|
||||
binary_expr
|
||||
operator: infix_operator "*"
|
||||
left:
|
||||
name_expr
|
||||
identifier: identifier "y"
|
||||
right: int_literal "2"
|
||||
parameter:
|
||||
parameter
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "x"
|
||||
type:
|
||||
named_type_expr
|
||||
name: identifier "Int"
|
||||
return_type:
|
||||
named_type_expr
|
||||
name: identifier "Int"
|
||||
@@ -0,0 +1,4 @@
|
||||
let f = { (x: Int) -> Int in
|
||||
let y = x + 1
|
||||
return y * 2
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
xs.map { $0 * 2 }
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
call_expression
|
||||
function:
|
||||
navigation_expression
|
||||
suffix:
|
||||
navigation_suffix
|
||||
suffix: simple_identifier "map"
|
||||
target: simple_identifier "xs"
|
||||
suffix:
|
||||
call_suffix
|
||||
lambda:
|
||||
lambda_literal
|
||||
statement:
|
||||
multiplicative_expression
|
||||
lhs: simple_identifier "$0"
|
||||
op: *
|
||||
rhs: integer_literal "2"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
call_expr
|
||||
argument:
|
||||
argument
|
||||
value:
|
||||
function_expr
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
binary_expr
|
||||
operator: infix_operator "*"
|
||||
left:
|
||||
name_expr
|
||||
identifier: identifier "$0"
|
||||
right: int_literal "2"
|
||||
callee:
|
||||
member_access_expr
|
||||
base:
|
||||
name_expr
|
||||
identifier: identifier "xs"
|
||||
member: identifier "map"
|
||||
@@ -0,0 +1 @@
|
||||
xs.map { $0 * 2 }
|
||||
@@ -1,410 +0,0 @@
|
||||
===
|
||||
Array literal
|
||||
===
|
||||
|
||||
let xs = [1, 2, 3]
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "xs"
|
||||
value:
|
||||
array_literal
|
||||
element:
|
||||
integer_literal "1"
|
||||
integer_literal "2"
|
||||
integer_literal "3"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "xs"
|
||||
value:
|
||||
array_literal
|
||||
element:
|
||||
int_literal "1"
|
||||
int_literal "2"
|
||||
int_literal "3"
|
||||
|
||||
===
|
||||
Empty array literal with type
|
||||
===
|
||||
|
||||
let xs: [Int] = []
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "xs"
|
||||
type:
|
||||
type_annotation
|
||||
type:
|
||||
type
|
||||
name:
|
||||
array_type
|
||||
element:
|
||||
type
|
||||
name:
|
||||
user_type
|
||||
part:
|
||||
simple_user_type
|
||||
name: type_identifier "Int"
|
||||
value:
|
||||
array_literal
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "xs"
|
||||
type:
|
||||
generic_type_expr
|
||||
base:
|
||||
named_type_expr
|
||||
name: identifier "Array"
|
||||
type_argument:
|
||||
named_type_expr
|
||||
name: identifier "Int"
|
||||
value: array_literal "[]"
|
||||
|
||||
===
|
||||
Dictionary literal
|
||||
===
|
||||
|
||||
let d = ["a": 1, "b": 2]
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "d"
|
||||
value:
|
||||
dictionary_literal
|
||||
element:
|
||||
dictionary_literal_item
|
||||
key:
|
||||
line_string_literal
|
||||
text: line_str_text "a"
|
||||
value: integer_literal "1"
|
||||
dictionary_literal_item
|
||||
key:
|
||||
line_string_literal
|
||||
text: line_str_text "b"
|
||||
value: integer_literal "2"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "d"
|
||||
value: map_literal "[\"a\": 1, \"b\": 2]"
|
||||
|
||||
===
|
||||
Set literal
|
||||
===
|
||||
|
||||
let s: Set<Int> = [1, 2, 3]
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "s"
|
||||
type:
|
||||
type_annotation
|
||||
type:
|
||||
type
|
||||
name:
|
||||
user_type
|
||||
part:
|
||||
simple_user_type
|
||||
arguments:
|
||||
type_arguments
|
||||
argument:
|
||||
type
|
||||
name:
|
||||
user_type
|
||||
part:
|
||||
simple_user_type
|
||||
name: type_identifier "Int"
|
||||
name: type_identifier "Set"
|
||||
value:
|
||||
array_literal
|
||||
element:
|
||||
integer_literal "1"
|
||||
integer_literal "2"
|
||||
integer_literal "3"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "s"
|
||||
type:
|
||||
named_type_expr
|
||||
name: identifier "Set<Int>"
|
||||
value:
|
||||
array_literal
|
||||
element:
|
||||
int_literal "1"
|
||||
int_literal "2"
|
||||
int_literal "3"
|
||||
|
||||
===
|
||||
Tuple literal
|
||||
===
|
||||
|
||||
let t = (1, "two", 3.0)
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "t"
|
||||
value:
|
||||
tuple_expression
|
||||
element:
|
||||
tuple_expression_item
|
||||
value: integer_literal "1"
|
||||
tuple_expression_item
|
||||
value:
|
||||
line_string_literal
|
||||
text: line_str_text "two"
|
||||
tuple_expression_item
|
||||
value: real_literal "3.0"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "t"
|
||||
value: tuple_expr "(1, \"two\", 3.0)"
|
||||
|
||||
===
|
||||
Subscript access
|
||||
===
|
||||
|
||||
// TODO: tree-sitter-swift parses `xs[0]` as a call_expression (same shape
|
||||
// as `xs(0)`), so the mapping currently produces a call_expr. Update the
|
||||
// parser / add a separate subscript_expr node and remap when fixed.
|
||||
let first = xs[0]
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "first"
|
||||
value:
|
||||
call_expression
|
||||
function: simple_identifier "xs"
|
||||
suffix:
|
||||
call_suffix
|
||||
arguments:
|
||||
value_arguments
|
||||
argument:
|
||||
value_argument
|
||||
value: integer_literal "0"
|
||||
comment "// TODO: tree-sitter-swift parses `xs[0]` as a call_expression (same shape"
|
||||
comment "// as `xs(0)`), so the mapping currently produces a call_expr. Update the"
|
||||
comment "// parser / add a separate subscript_expr node and remap when fixed."
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "first"
|
||||
value:
|
||||
call_expr
|
||||
argument:
|
||||
argument
|
||||
value: int_literal "0"
|
||||
callee:
|
||||
name_expr
|
||||
identifier: identifier "xs"
|
||||
|
||||
===
|
||||
Dictionary subscript
|
||||
===
|
||||
|
||||
// TODO: same parser issue as the array subscript case above —
|
||||
// `d["key"]` is parsed as `call_expression(d, ("key"))`.
|
||||
let v = d["key"]
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "v"
|
||||
value:
|
||||
call_expression
|
||||
function: simple_identifier "d"
|
||||
suffix:
|
||||
call_suffix
|
||||
arguments:
|
||||
value_arguments
|
||||
argument:
|
||||
value_argument
|
||||
value:
|
||||
line_string_literal
|
||||
text: line_str_text "key"
|
||||
comment "// TODO: same parser issue as the array subscript case above —"
|
||||
comment "// `d[\"key\"]` is parsed as `call_expression(d, (\"key\"))`."
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "v"
|
||||
value:
|
||||
call_expr
|
||||
argument:
|
||||
argument
|
||||
value: string_literal "\"key\""
|
||||
callee:
|
||||
name_expr
|
||||
identifier: identifier "d"
|
||||
|
||||
===
|
||||
Tuple member access
|
||||
===
|
||||
|
||||
let n = t.0
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "n"
|
||||
value:
|
||||
navigation_expression
|
||||
suffix:
|
||||
navigation_suffix
|
||||
suffix: integer_literal "0"
|
||||
target: simple_identifier "t"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "n"
|
||||
value:
|
||||
member_access_expr
|
||||
base:
|
||||
name_expr
|
||||
identifier: identifier "t"
|
||||
member: identifier "0"
|
||||
@@ -0,0 +1,39 @@
|
||||
let xs = [1, 2, 3]
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "xs"
|
||||
value:
|
||||
array_literal
|
||||
element:
|
||||
integer_literal "1"
|
||||
integer_literal "2"
|
||||
integer_literal "3"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "xs"
|
||||
value:
|
||||
array_literal
|
||||
element:
|
||||
int_literal "1"
|
||||
int_literal "2"
|
||||
int_literal "3"
|
||||
@@ -0,0 +1 @@
|
||||
let xs = [1, 2, 3]
|
||||
@@ -0,0 +1,41 @@
|
||||
let d = ["a": 1, "b": 2]
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "d"
|
||||
value:
|
||||
dictionary_literal
|
||||
element:
|
||||
dictionary_literal_item
|
||||
key:
|
||||
line_string_literal
|
||||
text: line_str_text "a"
|
||||
value: integer_literal "1"
|
||||
dictionary_literal_item
|
||||
key:
|
||||
line_string_literal
|
||||
text: line_str_text "b"
|
||||
value: integer_literal "2"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "d"
|
||||
value: map_literal "[\"a\": 1, \"b\": 2]"
|
||||
@@ -0,0 +1 @@
|
||||
let d = ["a": 1, "b": 2]
|
||||
@@ -0,0 +1,51 @@
|
||||
// TODO: same parser issue as the array subscript case above —
|
||||
// `d["key"]` is parsed as `call_expression(d, ("key"))`.
|
||||
let v = d["key"]
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "v"
|
||||
value:
|
||||
call_expression
|
||||
function: simple_identifier "d"
|
||||
suffix:
|
||||
call_suffix
|
||||
arguments:
|
||||
value_arguments
|
||||
argument:
|
||||
value_argument
|
||||
value:
|
||||
line_string_literal
|
||||
text: line_str_text "key"
|
||||
comment "// TODO: same parser issue as the array subscript case above —"
|
||||
comment "// `d[\"key\"]` is parsed as `call_expression(d, (\"key\"))`."
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "v"
|
||||
value:
|
||||
call_expr
|
||||
argument:
|
||||
argument
|
||||
value: string_literal "\"key\""
|
||||
callee:
|
||||
name_expr
|
||||
identifier: identifier "d"
|
||||
@@ -0,0 +1,3 @@
|
||||
// TODO: same parser issue as the array subscript case above —
|
||||
// `d["key"]` is parsed as `call_expression(d, ("key"))`.
|
||||
let v = d["key"]
|
||||
@@ -0,0 +1,51 @@
|
||||
let xs: [Int] = []
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "xs"
|
||||
type:
|
||||
type_annotation
|
||||
type:
|
||||
type
|
||||
name:
|
||||
array_type
|
||||
element:
|
||||
type
|
||||
name:
|
||||
user_type
|
||||
part:
|
||||
simple_user_type
|
||||
name: type_identifier "Int"
|
||||
value:
|
||||
array_literal
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "xs"
|
||||
type:
|
||||
generic_type_expr
|
||||
base:
|
||||
named_type_expr
|
||||
name: identifier "Array"
|
||||
type_argument:
|
||||
named_type_expr
|
||||
name: identifier "Int"
|
||||
value: array_literal "[]"
|
||||
@@ -0,0 +1 @@
|
||||
let xs: [Int] = []
|
||||
@@ -0,0 +1,60 @@
|
||||
let s: Set<Int> = [1, 2, 3]
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "s"
|
||||
type:
|
||||
type_annotation
|
||||
type:
|
||||
type
|
||||
name:
|
||||
user_type
|
||||
part:
|
||||
simple_user_type
|
||||
arguments:
|
||||
type_arguments
|
||||
argument:
|
||||
type
|
||||
name:
|
||||
user_type
|
||||
part:
|
||||
simple_user_type
|
||||
name: type_identifier "Int"
|
||||
name: type_identifier "Set"
|
||||
value:
|
||||
array_literal
|
||||
element:
|
||||
integer_literal "1"
|
||||
integer_literal "2"
|
||||
integer_literal "3"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "s"
|
||||
type:
|
||||
named_type_expr
|
||||
name: identifier "Set<Int>"
|
||||
value:
|
||||
array_literal
|
||||
element:
|
||||
int_literal "1"
|
||||
int_literal "2"
|
||||
int_literal "3"
|
||||
@@ -0,0 +1 @@
|
||||
let s: Set<Int> = [1, 2, 3]
|
||||
@@ -0,0 +1,51 @@
|
||||
// TODO: tree-sitter-swift parses `xs[0]` as a call_expression (same shape
|
||||
// as `xs(0)`), so the mapping currently produces a call_expr. Update the
|
||||
// parser / add a separate subscript_expr node and remap when fixed.
|
||||
let first = xs[0]
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "first"
|
||||
value:
|
||||
call_expression
|
||||
function: simple_identifier "xs"
|
||||
suffix:
|
||||
call_suffix
|
||||
arguments:
|
||||
value_arguments
|
||||
argument:
|
||||
value_argument
|
||||
value: integer_literal "0"
|
||||
comment "// TODO: tree-sitter-swift parses `xs[0]` as a call_expression (same shape"
|
||||
comment "// as `xs(0)`), so the mapping currently produces a call_expr. Update the"
|
||||
comment "// parser / add a separate subscript_expr node and remap when fixed."
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "first"
|
||||
value:
|
||||
call_expr
|
||||
argument:
|
||||
argument
|
||||
value: int_literal "0"
|
||||
callee:
|
||||
name_expr
|
||||
identifier: identifier "xs"
|
||||
@@ -0,0 +1,4 @@
|
||||
// TODO: tree-sitter-swift parses `xs[0]` as a call_expression (same shape
|
||||
// as `xs(0)`), so the mapping currently produces a call_expr. Update the
|
||||
// parser / add a separate subscript_expr node and remap when fixed.
|
||||
let first = xs[0]
|
||||
@@ -0,0 +1,39 @@
|
||||
let t = (1, "two", 3.0)
|
||||
|
||||
---
|
||||
|
||||
source_file
|
||||
statement:
|
||||
property_declaration
|
||||
binding:
|
||||
value_binding_pattern
|
||||
mutability: let
|
||||
declarator:
|
||||
property_binding
|
||||
name:
|
||||
pattern
|
||||
bound_identifier: simple_identifier "t"
|
||||
value:
|
||||
tuple_expression
|
||||
element:
|
||||
tuple_expression_item
|
||||
value: integer_literal "1"
|
||||
tuple_expression_item
|
||||
value:
|
||||
line_string_literal
|
||||
text: line_str_text "two"
|
||||
tuple_expression_item
|
||||
value: real_literal "3.0"
|
||||
|
||||
---
|
||||
|
||||
top_level
|
||||
body:
|
||||
block
|
||||
stmt:
|
||||
variable_declaration
|
||||
modifier: modifier "let"
|
||||
pattern:
|
||||
name_pattern
|
||||
identifier: identifier "t"
|
||||
value: tuple_expr "(1, \"two\", 3.0)"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user