File tree Expand file tree Collapse file tree
cpp/ql/src/semmle/code/cpp/rangeanalysis Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,23 +96,18 @@ private float wideningUpperBounds(ArithmeticType t) {
9696 * This predicate also handles the case of constant variables initialized in compilation units,
9797 * which doesn't necessarily have a getValue() result from the extractor.
9898 */
99- private string getValue0 ( Expr e ) {
99+ private string getValue ( Expr e ) {
100100 if exists ( e .getValue ( ) )
101101 then result = e .getValue ( )
102102 else
103103 exists ( VariableAccess access , Variable v |
104104 e = access and
105105 v = access .getTarget ( ) and
106106 v .getUnderlyingType ( ) .isConst ( ) and
107- result = getValue0 ( v .getAnAssignedValue ( ) )
107+ result = getValue ( v .getAnAssignedValue ( ) )
108108 )
109109}
110110
111- private string getValue ( Expr e ) {
112- result = min ( getValue0 ( e ) ) and
113- result = max ( getValue0 ( e ) )
114- }
115-
116111/** Set of expressions which we know how to analyze. */
117112private predicate analyzableExpr ( Expr e ) {
118113 // The type of the expression must be arithmetic. We reuse the logic in
You can’t perform that action at this time.
0 commit comments