Skip to content

Commit d46b2a3

Browse files
committed
Dataflow: Improve debug printing.
1 parent e6d7a83 commit d46b2a3

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

java/ql/lib/semmle/code/java/dataflow/internal/DataFlowImpl.qll

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2706,7 +2706,7 @@ module Impl<FullStateConfigSig Config> {
27062706

27072707
ParamNodeEx getParamNode() { result = p }
27082708

2709-
override string toString() { result = p + ": " + ap }
2709+
override string toString() { result = p + concat(" : " + ppReprType(t)) + " " + ap }
27102710

27112711
predicate hasLocationInfo(
27122712
string filepath, int startline, int startcolumn, int endline, int endcolumn
@@ -3092,6 +3092,12 @@ module Impl<FullStateConfigSig Config> {
30923092
result = " <" + this.(PathNodeMid).getCallContext().toString() + ">"
30933093
}
30943094

3095+
private string ppSummaryCtx() {
3096+
this instanceof PathNodeSink and result = ""
3097+
or
3098+
result = " <" + this.(PathNodeMid).getSummaryCtx().toString() + ">"
3099+
}
3100+
30953101
/** Gets a textual representation of this element. */
30963102
string toString() { result = this.getNodeEx().toString() + this.ppType() + this.ppAp() }
30973103

@@ -3100,7 +3106,9 @@ module Impl<FullStateConfigSig Config> {
31003106
* representation of the call context.
31013107
*/
31023108
string toStringWithContext() {
3103-
result = this.getNodeEx().toString() + this.ppType() + this.ppAp() + this.ppCtx()
3109+
result =
3110+
this.getNodeEx().toString() + this.ppType() + this.ppAp() + this.ppCtx() +
3111+
this.ppSummaryCtx()
31043112
}
31053113

31063114
/**

0 commit comments

Comments
 (0)