Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6122cdb

Browse files
committed
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.
1 parent 57732ee commit 6122cdb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • cpp/ql/src/semmle/code/cpp/dataflow/internal

cpp/ql/src/semmle/code/cpp/dataflow/internal/FlowVar.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,15 +269,15 @@ module FlowVar_internal {
269269
override string toString() {
270270
exists(Expr e |
271271
this.definedByExpr(e, _) and
272-
result = v +" := "+ e
272+
result = "assignment to "+ v
273273
)
274274
or
275275
this.definedByInitialValue(_) and
276276
result = "initial value of "+ v
277277
or
278278
exists(Expr arg |
279279
this.definedByReference(arg) and
280-
result = "ref def: "+ arg
280+
result = "definition by reference of "+ v
281281
)
282282
or
283283
// impossible case

0 commit comments

Comments
 (0)