Merge pull request #20351 from hvitved/rust/summarized-callable-location

Rust: Assign locations to all `DataFlowCallable`s
This commit is contained in:
Tom Hvitved
2025-09-03 12:24:37 +02:00
committed by GitHub
3 changed files with 7 additions and 3 deletions

View File

@@ -53,7 +53,9 @@ final class DataFlowCallable extends TDataFlowCallable {
}
/** Gets the location of this callable. */
Location getLocation() { result = this.asCfgScope().getLocation() }
Location getLocation() {
result = [this.asCfgScope().getLocation(), this.asSummarizedCallable().getLocation()]
}
}
final class DataFlowCall extends TDataFlowCall {

View File

@@ -98,10 +98,10 @@
| main.rs:326:17:326:25 | source(...) | main.rs:1:1:3:1 | fn source |
| main.rs:327:9:327:15 | sink(...) | main.rs:5:1:7:1 | fn sink |
| main.rs:330:5:330:17 | sink(...) | main.rs:5:1:7:1 | fn sink |
| main.rs:334:13:334:55 | ...::block_on(...) | file://:0:0:0:0 | fn block_on |
| main.rs:334:13:334:55 | ...::block_on(...) | {EXTERNAL LOCATION} | fn block_on |
| main.rs:334:41:334:54 | async_source(...) | main.rs:315:1:319:1 | fn async_source |
| main.rs:335:5:335:11 | sink(...) | main.rs:5:1:7:1 | fn sink |
| main.rs:337:5:337:62 | ...::block_on(...) | file://:0:0:0:0 | fn block_on |
| main.rs:337:5:337:62 | ...::block_on(...) | {EXTERNAL LOCATION} | fn block_on |
| main.rs:337:33:337:61 | test_async_await_async_part(...) | main.rs:321:1:331:1 | fn test_async_await_async_part |
| main.rs:341:5:341:22 | data_out_of_call(...) | main.rs:16:1:19:1 | fn data_out_of_call |
| main.rs:342:5:342:35 | data_out_of_call_side_effect1(...) | main.rs:35:1:40:1 | fn data_out_of_call_side_effect1 |

View File

@@ -0,0 +1,2 @@
query: viableCallable.ql
postprocess: utils/test/ExternalLocationPostProcessing.ql