Handle constructor call qualifiers

This commit is contained in:
Pavel Avgustinov
2019-07-10 11:38:05 +01:00
committed by Jonas Jensen
parent 66164eb06f
commit bb8eb235e0

View File

@@ -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.
}