@@ -18,44 +18,47 @@ TemplateClass getADependentBaseType(TemplateClass t) {
18
18
}
19
19
20
20
/**
21
- * There is a `MemberFunction` in parent class with same name
22
- * as a `FunctionCall` that exists in a child `MemberFunction`
21
+ * Gets a function call in `TemplateClass` `t` where the target function name exists in a dependent
22
+ * base type and the function does not call that function.
23
23
*/
24
- FunctionCall parentMemberFunctionCall ( Class child , Class parent ) {
25
- exists ( MemberFunction parentFunction , Function other |
24
+ FunctionCall parentMemberFunctionCall ( TemplateClass t ) {
25
+ exists ( TemplateClass dependentBaseType , MemberFunction parentFunction , Function other |
26
+ dependentBaseType = getADependentBaseType ( t ) and
26
27
not other = parentFunction and
27
- parent .getAMember ( ) = parentFunction and
28
+ dependentBaseType .getAMember ( ) = parentFunction and
28
29
other .getName ( ) = parentFunction .getName ( ) and
29
30
result = other .getACallToThisFunction ( ) and
30
- result .getEnclosingFunction ( ) = child .getAMemberFunction ( )
31
+ result .getEnclosingFunction ( ) = t .getAMemberFunction ( )
31
32
)
32
33
}
33
34
34
35
/**
35
36
* There is a `MemberFunction` in parent class with same name
36
37
* as a `FunctionAccess` that exists in a child `MemberFunction`
37
38
*/
38
- FunctionAccess parentMemberFunctionAccess ( Class child , Class parent ) {
39
- exists ( MemberFunction parentFunction , Function other |
39
+ FunctionAccess parentMemberFunctionAccess ( TemplateClass t ) {
40
+ exists ( TemplateClass dependentBaseType , MemberFunction parentFunction , Function other |
41
+ dependentBaseType = getADependentBaseType ( t ) and
40
42
not other = parentFunction and
41
- parent .getAMember ( ) = parentFunction and
43
+ dependentBaseType .getAMember ( ) = parentFunction and
42
44
other .getName ( ) = parentFunction .getName ( ) and
43
45
result = other .getAnAccess ( ) and
44
- result .getEnclosingFunction ( ) = child .getAMemberFunction ( )
46
+ result .getEnclosingFunction ( ) = t .getAMemberFunction ( )
45
47
)
46
48
}
47
49
48
50
/**
49
51
* There is a `MemberVariable` in parent class with same name
50
52
* as a `VariableAccess` that exists in a child `MemberFunction`
51
53
*/
52
- Access parentMemberAccess ( Class child , Class parent ) {
53
- exists ( MemberVariable parentMember , Variable other |
54
+ Access parentMemberAccess ( TemplateClass t ) {
55
+ exists ( TemplateClass dependentBaseType , MemberVariable parentMember , Variable other |
56
+ dependentBaseType = getADependentBaseType ( t ) and
54
57
not other = parentMember and
55
- parent .getAMemberVariable ( ) = parentMember and
58
+ dependentBaseType .getAMemberVariable ( ) = parentMember and
56
59
other .getName ( ) = parentMember .getName ( ) and
57
60
result = other .getAnAccess ( ) and
58
- result .getEnclosingFunction ( ) = child .getAMemberFunction ( )
61
+ result .getEnclosingFunction ( ) = t .getAMemberFunction ( )
59
62
)
60
63
}
61
64
0 commit comments