Merge pull request #729 from aschackmull/java/intmulttolong

Java: Restrict attention to integral types in IntMultToLong.
This commit is contained in:
yh-semmle
2019-01-08 14:40:22 -05:00
committed by GitHub
4 changed files with 4 additions and 2 deletions

View File

@@ -47,6 +47,8 @@ where
e.getType() = sourceType and
c.getConversionTarget() = destType and
destType.widerThan(sourceType) and
// restrict attention to integral types
destType instanceof IntegralType and
// not a trivial conversion
not c.isTrivial() and
// not an explicit conversion, which is probably intended by a user