@@ -93,24 +93,23 @@ private float wideningUpperBounds(ArithmeticType t) {
9393
9494/**
9595 * Gets the value of the expression `e`, if it is a constant.
96- * This predicate also handles the case of constant variables initialized in compilation units,
97- * which doesn't necessarily have a getValue() result from the extractor.
96+ * This predicate also handles the case of constant variables initialized in different
97+ * compilation units, which doesn't necessarily have a getValue() result from the extractor.
9898 */
9999private string getValue ( Expr e ) {
100100 if exists ( e .getValue ( ) )
101101 then result = e .getValue ( )
102102 else
103- exists ( VariableAccess access , Variable v |
104- /*
105- * It should be safe to propagate the initialization value to a variable if:
106- * The type of v is const, and
107- * The type of v is not volatile, and
108- * Either:
109- * v is a local/global variable, or
110- * v is a static member variable
111- */
103+ /*
104+ * It should be safe to propagate the initialization value to a variable if:
105+ * The type of v is const, and
106+ * The type of v is not volatile, and
107+ * Either:
108+ * v is a local/global variable, or
109+ * v is a static member variable
110+ */
112111
113- ( v instanceof StaticStorageDurationVariable or v instanceof LocalVariable ) and
112+ exists ( VariableAccess access , StaticStorageDurationVariable v |
114113 not v .getUnderlyingType ( ) .isVolatile ( ) and
115114 v .getUnderlyingType ( ) .isConst ( ) and
116115 e = access and
0 commit comments