-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
Description
I was running a query on a project and it is stuck on Running query: Stage 10/10 - computing '#select#ff' for hours. I tried different projects and the same thing happened.
My query is
import cpp
import semmle.code.cpp.ir.IR
/** Holds if `i` is a narrowing conversion. */
predicate isNarrowingConversion(ConvertInstruction i) {
i.getResultSize() < i.getUnary().getResultSize()
}
from ConvertInstruction conv, Type inputType, Type outputType, FunctionCall fc
where
fc.getTarget().getQualifiedName() = "accept" or fc.getTarget().getQualifiedName() = "accept4" and
conv.getEnclosingFunction().calls(fc.getTarget()) and
isNarrowingConversion(conv) and
inputType = conv.getUnary().getResultType() and
outputType = conv.getResultType()
select conv, "Narrowing conversion from " + inputType + " to " + outputType + "."