Skip to content

Commit eb1024c

Browse files
committed
C++: Improve (and simplify) 'toString's.
1 parent 86e7919 commit eb1024c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/SsaInternals.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ class GlobalDefImpl extends DefOrUseImpl, TGlobalDefImpl {
525525
*/
526526
Type getUnspecifiedType() { result = global.getUnspecifiedType() }
527527

528-
override string toString() { result = "GlobalDef" }
528+
override string toString() { result = "Def of " + this.getSourceVariable() }
529529

530530
override Location getLocation() { result = f.getLocation() }
531531

@@ -995,7 +995,7 @@ class GlobalDef extends TGlobalDef, SsaDefOrUse {
995995
final override Location getLocation() { result = global.getLocation() }
996996

997997
/** Gets a textual representation of this definition. */
998-
override string toString() { result = "GlobalDef" }
998+
override string toString() { result = global.toString() }
999999

10001000
/**
10011001
* Holds if this definition has index `index` in block `block`, and

0 commit comments

Comments
 (0)