File tree Expand file tree Collapse file tree 1 file changed +11
-12
lines changed
cpp/ql/lib/semmle/code/cpp/rangeanalysis Expand file tree Collapse file tree 1 file changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -484,17 +484,16 @@ QlBuiltins::BigInt varMaxVal(Variable v) { result = typeUpperBound(v.getUnspecif
484484 */
485485QlBuiltins:: BigInt infinityAsBigInt ( ) { result = 1 .toBigInt ( ) .bitShiftLeft ( 1024 ) }
486486
487+ bindingset [ s]
487488QlBuiltins:: BigInt parseAsBigInt ( string s ) {
488- exists ( Expr e | s = e .getValue ( ) |
489- if exists ( s .toBigInt ( ) ) then
490- result = s .toBigInt ( )
491- else
492- exists ( float f | f = s .toFloat ( ) |
493- f = 1.0 / 0.0 and result = infinityAsBigInt ( )
494- or
495- f = - ( 1.0 / 0.0 ) and result = - infinityAsBigInt ( )
496- or
497- result = f .toString ( ) .toBigInt ( )
498- )
499- )
489+ if exists ( s .toBigInt ( ) ) then
490+ result = s .toBigInt ( )
491+ else
492+ exists ( float f | f = s .toFloat ( ) |
493+ f = 1.0 / 0.0 and result = infinityAsBigInt ( )
494+ or
495+ f = - ( 1.0 / 0.0 ) and result = - infinityAsBigInt ( )
496+ or
497+ result = f .toString ( ) .toBigInt ( )
498+ )
500499}
You can’t perform that action at this time.
0 commit comments