@@ -91,16 +91,17 @@ private predicate exprReleases(Expr e, Expr released, string kind) {
91
91
// `e` is a call to a release function and `released` is the released argument
92
92
releaseExpr ( e , released , kind )
93
93
or
94
- exists ( Function f , int arg |
94
+ exists ( int arg , VariableAccess access , Function f |
95
95
// `e` is a call to a function that releases one of it's parameters,
96
96
// and `released` is the corresponding argument
97
97
(
98
98
e .( FunctionCall ) .getTarget ( ) = f or
99
99
e .( FunctionCall ) .getTarget ( ) .( MemberFunction ) .getAnOverridingFunction + ( ) = f
100
100
) and
101
+ access = f .getParameter ( arg ) .getAnAccess ( ) and
101
102
e .( FunctionCall ) .getArgument ( arg ) = released and
102
103
exprReleases ( _,
103
- exprOrDereference ( globalValueNumber ( f . getParameter ( arg ) . getAnAccess ( ) ) . getAnExpr ( ) ) , kind )
104
+ pragma [ only_bind_into ] ( exprOrDereference ( globalValueNumber ( access ) . getAnExpr ( ) ) ) , kind )
104
105
)
105
106
or
106
107
exists ( Function f , ThisExpr innerThis |
@@ -112,7 +113,7 @@ private predicate exprReleases(Expr e, Expr released, string kind) {
112
113
) and
113
114
e .( FunctionCall ) .getQualifier ( ) = exprOrDereference ( released ) and
114
115
innerThis .getEnclosingFunction ( ) = f and
115
- exprReleases ( _, globalValueNumber ( innerThis ) .getAnExpr ( ) , kind )
116
+ exprReleases ( _, pragma [ only_bind_into ] ( globalValueNumber ( innerThis ) .getAnExpr ( ) ) , kind )
116
117
)
117
118
}
118
119
0 commit comments