Skip to content

Commit c90831d

Browse files
committed
Java: Preparatory tweaks.
1 parent c98afc1 commit c90831d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

java/ql/lib/semmle/code/java/Statement.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class Stmt extends StmtParent, ExprParent, @stmt {
6161
}
6262

6363
/** A statement parent is any element that can have a statement as its child. */
64-
class StmtParent extends @stmtparent, Top { }
64+
class StmtParent extends @stmtparent, ExprParent { }
6565

6666
/**
6767
* An error statement.

java/ql/lib/semmle/code/java/dataflow/internal/BaseSSA.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ private module BaseSsaImpl {
132132
inner != outer and
133133
inner.getDeclaringType() = innerclass and
134134
result = parentDef(desugaredGetEnclosingType*(innerclass)) and
135-
result.getEnclosingStmt().getEnclosingCallable() = outer and
135+
result.getEnclosingCallable() = outer and
136136
capturedvar = TLocalVar(outer, v) and
137137
closurevar = TLocalVar(inner, v)
138138
)

java/ql/lib/semmle/code/java/dataflow/internal/SsaImpl.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private ControlFlowNode captureNode(TrackedVar capturedvar, TrackedVar closureva
115115
inner != outer and
116116
inner.getDeclaringType() = innerclass and
117117
result = parentDef(desugaredGetEnclosingType*(innerclass)) and
118-
result.getEnclosingStmt().getEnclosingCallable() = outer and
118+
result.getEnclosingCallable() = outer and
119119
capturedvar = TLocalVar(outer, v) and
120120
closurevar = TLocalVar(inner, v)
121121
)

java/ql/src/experimental/quantum/Examples/ArtifactReuse.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ private DataFlow::Node getGeneratingWrapperSet(Crypto::NonceArtifactNode a) {
4242
}
4343

4444
private predicate ancestorOfArtifact(
45-
Crypto::ArtifactNode a, Callable enclosingCallable, ControlFlow::Node midOrTarget
45+
Crypto::ArtifactNode a, Callable enclosingCallable, ControlFlowNode midOrTarget
4646
) {
4747
a.asElement().(Expr).getEnclosingCallable() = enclosingCallable and
4848
(
@@ -87,7 +87,7 @@ predicate isArtifactReuse(Crypto::ArtifactNode a, Crypto::ArtifactNode b) {
8787
ancestorOfArtifact(b, commonParent, _)
8888
)
8989
implies
90-
exists(Callable commonParent, ControlFlow::Node aMid, ControlFlow::Node bMid |
90+
exists(Callable commonParent, ControlFlowNode aMid, ControlFlowNode bMid |
9191
ancestorOfArtifact(a, commonParent, aMid) and
9292
ancestorOfArtifact(b, commonParent, bMid) and
9393
a instanceof Crypto::NonceArtifactNode and

0 commit comments

Comments
 (0)