add all remaining explicit this

This commit is contained in:
Erik Krogh Kristensen
2021-11-26 13:50:10 +01:00
parent 00ee34c0a0
commit 6ff8d4de5c
104 changed files with 479 additions and 451 deletions

View File

@@ -118,7 +118,7 @@ private predicate exprReleases(Expr e, Expr released, string kind) {
}
class Resource extends MemberVariable {
Resource() { not isStatic() }
Resource() { not this.isStatic() }
// Check that an expr is somewhere in this class - does not have to be a constructor
predicate inSameClass(Expr e) {
@@ -129,7 +129,7 @@ class Resource extends MemberVariable {
f instanceof Destructor and f.getDeclaringType() = this.getDeclaringType()
or
exists(Function mid, FunctionCall fc |
calledFromDestructor(mid) and
this.calledFromDestructor(mid) and
fc.getEnclosingFunction() = mid and
fc.getTarget() = f and
f.getDeclaringType() = this.getDeclaringType()
@@ -137,7 +137,7 @@ class Resource extends MemberVariable {
}
predicate inDestructor(Expr e) {
exists(Function f | f = e.getEnclosingFunction() | calledFromDestructor(f))
exists(Function f | f = e.getEnclosingFunction() | this.calledFromDestructor(f))
}
predicate acquisitionWithRequiredKind(Assignment acquireAssign, string kind) {