Optimize return type check

This commit is contained in:
Benjamin Muskalla
2021-08-02 16:13:48 +02:00
parent fda394858b
commit 60c7003667

View File

@@ -9,10 +9,10 @@ class ExternalAPI extends Callable {
predicate isInteresting() {
getNumberOfParameters() > 0 and
not (
getReturnType() instanceof VoidType or
getReturnType() instanceof PrimitiveType or
getReturnType() instanceof BoxedType
exists(Type retType | retType = getReturnType() |
not retType instanceof VoidType and
not retType instanceof PrimitiveType and
not retType instanceof BoxedType
)
}