CPP: Simplify getClassAndNameImpl

This commit is contained in:
Alex Eyers-Taylor
2025-02-21 16:23:45 +00:00
parent 53c5b8ff9e
commit 57e985cc21

View File

@@ -869,10 +869,8 @@ private predicate elementSpecMatchesSignature(
bindingset[nameWithoutArgs]
pragma[inline_late]
private Class getClassAndNameImpl(Function method, string nameWithoutArgs) {
exists(string memberName |
result = method.getClassAndName(memberName) and
nameWithoutArgs = "operator " + method.(ConversionOperator).getDestType()
)
result = method.getDeclaringType() and
nameWithoutArgs = "operator " + method.(ConversionOperator).getDestType()
or
result = method.getClassAndName(nameWithoutArgs) and
not method instanceof ConversionOperator