File tree Expand file tree Collapse file tree 3 files changed +14
-4
lines changed
test/library-tests/dataflow/global Expand file tree Collapse file tree 3 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -3482,7 +3482,15 @@ private module Cached {
34823482 /** Holds if `receiver` is the receiver of a method call with an implicit dereference. */
34833483 cached
34843484 predicate receiverHasImplicitDeref ( AstNode receiver ) {
3485- none ( ) // todo
3485+ exists ( MethodCall mc |
3486+ exists ( resolveMethodCallTarget ( MkMethodCallDerefChainRef ( mc , ".ref;" ) ) ) and
3487+ receiver = mc .getArgument ( CallImpl:: TSelfArgumentPosition ( ) )
3488+ )
3489+ or
3490+ exists ( Op op |
3491+ op .( Call ) .implicitBorrowAt ( CallImpl:: TSelfArgumentPosition ( ) , true ) and
3492+ receiver = op .getOperand ( 0 )
3493+ )
34863494 // exists(MethodCallExprMatchingInput::Access a, MethodCallExprMatchingInput::AccessPosition apos |
34873495 // apos.getArgumentPosition().isSelf() and
34883496 // apos.isBorrowed(_) and
@@ -3495,7 +3503,10 @@ private module Cached {
34953503 /** Holds if `receiver` is the receiver of a method call with an implicit borrow. */
34963504 cached
34973505 predicate receiverHasImplicitBorrow ( AstNode receiver ) {
3498- none ( ) // todo
3506+ exists ( MethodCall mc |
3507+ exists ( resolveMethodCallTarget ( MkMethodCallDerefChainRef ( mc , ";ref" ) ) ) and
3508+ receiver = mc .getArgument ( CallImpl:: TSelfArgumentPosition ( ) )
3509+ )
34993510 // exists(MethodCallExprMatchingInput::Access a, MethodCallExprMatchingInput::AccessPosition apos |
35003511 // apos.getArgumentPosition().isSelf() and
35013512 // apos.isBorrowed(_) and
Original file line number Diff line number Diff line change @@ -400,6 +400,7 @@ subpaths
400400| main.rs:301:50:301:50 | a [MyInt] | main.rs:289:18:289:21 | SelfParam [MyInt] | main.rs:289:48:291:5 | { ... } [MyInt] | main.rs:301:30:301:54 | ...::take_self(...) [MyInt] |
401401| main.rs:306:55:306:55 | b [MyInt] | main.rs:293:26:293:37 | ...: MyInt [MyInt] | main.rs:293:49:295:5 | { ... } [MyInt] | main.rs:306:30:306:56 | ...::take_second(...) [MyInt] |
402402testFailures
403+ | main.rs:277:14:277:58 | //... | Missing result: hasTaintFlow=28 |
403404#select
404405| main.rs:18:10:18:10 | a | main.rs:13:5:13:13 | source(...) | main.rs:18:10:18:10 | a | $@ | main.rs:13:5:13:13 | source(...) | source(...) |
405406| main.rs:39:10:39:21 | a.get_data() | main.rs:38:23:38:31 | source(...) | main.rs:39:10:39:21 | a.get_data() | $@ | main.rs:38:23:38:31 | source(...) | source(...) |
Original file line number Diff line number Diff line change 5959| main.rs:212:13:212:34 | ...::new(...) | main.rs:205:5:208:5 | fn new |
6060| main.rs:212:24:212:33 | source(...) | main.rs:1:1:3:1 | fn source |
6161| main.rs:214:5:214:11 | sink(...) | main.rs:5:1:7:1 | fn sink |
62- | main.rs:228:10:228:14 | * ... | main.rs:235:5:237:5 | fn deref |
63- | main.rs:236:11:236:15 | * ... | main.rs:235:5:237:5 | fn deref |
6462| main.rs:242:28:242:36 | source(...) | main.rs:1:1:3:1 | fn source |
6563| main.rs:244:13:244:17 | ... + ... | main.rs:220:5:223:5 | fn add |
6664| main.rs:245:5:245:17 | sink(...) | main.rs:5:1:7:1 | fn sink |
You can’t perform that action at this time.
0 commit comments