diff --git a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll index f93506385318..9e335dbcbfed 100644 --- a/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll +++ b/cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll @@ -869,12 +869,11 @@ private predicate elementSpecMatchesSignature( bindingset[nameWithoutArgs] pragma[inline_late] private Class getClassAndNameImpl(Function method, string nameWithoutArgs) { - exists(string memberName | result = method.getClassAndName(memberName) | - nameWithoutArgs = "operator " + method.(ConversionOperator).getDestType() - or - not method instanceof ConversionOperator and - memberName = nameWithoutArgs - ) + result = method.getDeclaringType() and + nameWithoutArgs = "operator " + method.(ConversionOperator).getDestType() + or + result = method.getClassAndName(nameWithoutArgs) and + not method instanceof ConversionOperator } /**