@@ -18,44 +18,47 @@ TemplateClass getADependentBaseType(TemplateClass t) {
1818}
1919
2020/**
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.
2323 */
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
2627 not other = parentFunction and
27- parent .getAMember ( ) = parentFunction and
28+ dependentBaseType .getAMember ( ) = parentFunction and
2829 other .getName ( ) = parentFunction .getName ( ) and
2930 result = other .getACallToThisFunction ( ) and
30- result .getEnclosingFunction ( ) = child .getAMemberFunction ( )
31+ result .getEnclosingFunction ( ) = t .getAMemberFunction ( )
3132 )
3233}
3334
3435/**
3536 * There is a `MemberFunction` in parent class with same name
3637 * as a `FunctionAccess` that exists in a child `MemberFunction`
3738 */
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
4042 not other = parentFunction and
41- parent .getAMember ( ) = parentFunction and
43+ dependentBaseType .getAMember ( ) = parentFunction and
4244 other .getName ( ) = parentFunction .getName ( ) and
4345 result = other .getAnAccess ( ) and
44- result .getEnclosingFunction ( ) = child .getAMemberFunction ( )
46+ result .getEnclosingFunction ( ) = t .getAMemberFunction ( )
4547 )
4648}
4749
4850/**
4951 * There is a `MemberVariable` in parent class with same name
5052 * as a `VariableAccess` that exists in a child `MemberFunction`
5153 */
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
5457 not other = parentMember and
55- parent .getAMemberVariable ( ) = parentMember and
58+ dependentBaseType .getAMemberVariable ( ) = parentMember and
5659 other .getName ( ) = parentMember .getName ( ) and
5760 result = other .getAnAccess ( ) and
58- result .getEnclosingFunction ( ) = child .getAMemberFunction ( )
61+ result .getEnclosingFunction ( ) = t .getAMemberFunction ( )
5962 )
6063}
6164
0 commit comments