C++: More helpful toString for def. by ref. node

This commit is contained in:
Jonas Jensen
2020-04-03 10:29:37 +02:00
parent 36da2d1dae
commit 469bdae9b2
2 changed files with 23 additions and 15 deletions

View File

@@ -239,6 +239,14 @@ class DefinitionByReferenceNode extends InstructionNode {
Parameter getParameter() {
exists(CallInstruction ci | result = ci.getStaticCallTarget().getParameter(instr.getIndex()))
}
override string toString() {
// This string should be unique enough to be helpful but common enough to
// avoid storing too many different strings.
result =
instr.getPrimaryInstruction().(CallInstruction).getStaticCallTarget().getName() +
" output argument"
}
}
/**