File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
rust/ql/lib/codeql/rust/security Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -15,12 +15,12 @@ private import codeql.rust.frameworks.stdlib.Builtins
1515 */
1616class NumericTypeBarrier extends DataFlow:: Node {
1717 NumericTypeBarrier ( ) {
18- exists ( TypeInference :: Type t |
18+ exists ( StructType t , Struct s |
1919 t = TypeInference:: inferType ( this .asExpr ( ) .getExpr ( ) ) and
20- (
21- t . ( StructType ) . getStruct ( ) instanceof NumericType or
22- t . ( StructType ) . getStruct ( ) instanceof Bool
23- )
20+ s = t . getStruct ( )
21+ |
22+ s instanceof NumericType or
23+ s instanceof Bool
2424 )
2525 }
2626}
@@ -31,12 +31,12 @@ class NumericTypeBarrier extends DataFlow::Node {
3131 */
3232class IntegralOrBooleanTypeBarrier extends DataFlow:: Node {
3333 IntegralOrBooleanTypeBarrier ( ) {
34- exists ( TypeInference :: Type t |
34+ exists ( StructType t , Struct s |
3535 t = TypeInference:: inferType ( this .asExpr ( ) .getExpr ( ) ) and
36- (
37- t . ( StructType ) . getStruct ( ) instanceof IntegralType or
38- t . ( StructType ) . getStruct ( ) instanceof Bool
39- )
36+ s = t . getStruct ( )
37+ |
38+ s instanceof IntegralType or
39+ s instanceof Bool
4040 )
4141 }
4242}
You can’t perform that action at this time.
0 commit comments