Skip to content

Commit 57e985c

Browse files
committed
CPP: Simplify getClassAndNameImpl
1 parent 53c5b8f commit 57e985c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll

+2-4
Original file line numberDiff line numberDiff line change
@@ -869,10 +869,8 @@ private predicate elementSpecMatchesSignature(
869869
bindingset[nameWithoutArgs]
870870
pragma[inline_late]
871871
private Class getClassAndNameImpl(Function method, string nameWithoutArgs) {
872-
exists(string memberName |
873-
result = method.getClassAndName(memberName) and
874-
nameWithoutArgs = "operator " + method.(ConversionOperator).getDestType()
875-
)
872+
result = method.getDeclaringType() and
873+
nameWithoutArgs = "operator " + method.(ConversionOperator).getDestType()
876874
or
877875
result = method.getClassAndName(nameWithoutArgs) and
878876
not method instanceof ConversionOperator

0 commit comments

Comments
 (0)