Skip to content

Commit 8bd3be6

Browse files
committed
C++: add MemberFunction::getTypeOfThis()
1 parent ca25971 commit 8bd3be6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

cpp/ql/src/semmle/code/cpp/MemberFunction.qll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ class MemberFunction extends Function {
7070
result = getADeclarationEntry() and result != getDefinition()
7171
)
7272
}
73+
74+
/**
75+
* Gets the type of the `this` parameter associated with this member function.
76+
*/
77+
Type getTypeOfThis() {
78+
member_function_this_type(underlyingElement(this), unresolveElement(result))
79+
}
7380
}
7481

7582
/**

0 commit comments

Comments
 (0)