C++: Make FlowVar::toString not use Expr::toString

The `FlowVar::toString` predicate is purely a debugging aid, but
unfortunately it has to be `cached` because it's in a `cached` class.
Before this commit, it caused `Expr::toString` to be evaluated in full.
This commit is contained in:
Jonas Jensen
2019-03-11 11:37:08 +01:00
parent 57732ee6f9
commit 6122cdb424

View File

@@ -269,7 +269,7 @@ module FlowVar_internal {
override string toString() {
exists(Expr e |
this.definedByExpr(e, _) and
result = v +" := "+ e
result = "assignment to "+ v
)
or
this.definedByInitialValue(_) and
@@ -277,7 +277,7 @@ module FlowVar_internal {
or
exists(Expr arg |
this.definedByReference(arg) and
result = "ref def: "+ arg
result = "definition by reference of "+ v
)
or
// impossible case