CPP: Prevent forced bad join order.

This commit is contained in:
Alex Eyers-Taylor
2025-02-19 10:22:44 +00:00
parent bc6ce32af2
commit 53c5b8ff9e

View File

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