mirror of
https://github.com/github/codeql.git
synced 2026-04-30 11:15:13 +02:00
Handle constructor call qualifiers
This commit is contained in:
committed by
Jonas Jensen
parent
66164eb06f
commit
bb8eb235e0
@@ -5,6 +5,10 @@ private import DataFlowDispatch
|
||||
/** Gets the instance argument of a non-static call. */
|
||||
private Node getInstanceArgument(Call call) {
|
||||
result.asExpr() = call.getQualifier()
|
||||
or
|
||||
// For constructors, there is no qualifier, so we pretend the call itself
|
||||
// is the instance argument.
|
||||
result.asExpr() = call.(ConstructorCall)
|
||||
// This does not include the implicit `this` argument on auto-generated
|
||||
// base class destructor calls as those do not have an AST element.
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user