Skip to content

Commit 388acff

Browse files
committed
unified: Exclude UnqualifiedMemberAccess in fallback
UnqualifiedMemberAccess is only populated when static name binding positively identifies the resolution target, so either the first case catches it, and if unresolved, the second case will miss it anyway because it won't be a MemberAccess instance.
1 parent bd2d5a4 commit 388acff

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎unified/ql/lib/codeql/unified/internal/dataflow/DataFlowCall.qll‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ private newtype TDataFlowCall =
1212
(
1313
N::getStaticBindingTargetFromRef(expr) = any(GetterDeclaration g).getNameNode()
1414
or
15-
expr instanceof MemberAccess
15+
// Assume a qualified member accesses might resolve to a getter.
16+
expr instanceof MemberAccessExpr
1617
)
1718
} or
1819
TSetterCall(Expr expr) {
@@ -26,7 +27,8 @@ private newtype TDataFlowCall =
2627
(
2728
N::getStaticBindingTargetFromRef(expr) = any(SetterDeclaration g).getNameNode()
2829
or
29-
expr instanceof MemberAccess
30+
// Assume a qualified member accesses might resolve to a setter.
31+
expr instanceof MemberAccessExpr
3032
)
3133
} or
3234
TSummaryCall(SummarizedCallable callable, SummaryNode callee) {

0 commit comments

Comments
 (0)