From 44641de91b343d82b10edab291e01c2dae345994 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Thu, 13 Jan 2022 08:26:50 +0000 Subject: [PATCH] Represent ReturnValue[n] correctly in test output --- .../semmle/go/dataflow/internal/FlowSummaryImplSpecific.qll | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ql/lib/semmle/go/dataflow/internal/FlowSummaryImplSpecific.qll b/ql/lib/semmle/go/dataflow/internal/FlowSummaryImplSpecific.qll index 1cc7ea188b6..915fdbcf0b9 100644 --- a/ql/lib/semmle/go/dataflow/internal/FlowSummaryImplSpecific.qll +++ b/ql/lib/semmle/go/dataflow/internal/FlowSummaryImplSpecific.qll @@ -95,6 +95,12 @@ private string getContentSpecificCsv(Content c) { /** Gets the textual representation of the content in the format used for flow summaries. */ string getComponentSpecificCsv(SummaryComponent sc) { exists(Content c | sc = TContentSummaryComponent(c) and result = getContentSpecificCsv(c)) + or + exists(ReturnKind rk, int n | n = rk.getIndex() | + sc = TReturnSummaryComponent(rk) and + result = "ReturnValue[" + n + "]" and + n != 0 + ) } /** Holds if input specification component `c` needs a reference. */