@@ -139,8 +139,52 @@ SummaryComponent interpretComponentSpecific(AccessPathToken c) {
139139 )
140140}
141141
142+ private string getContentSpecific ( Content c ) {
143+ exists ( string name | c = TFieldContent ( name ) and result = "Field[" + name + "]" )
144+ or
145+ exists ( ConstantValue cv |
146+ c = TKnownElementContent ( cv ) and result = "Element[" + cv .toString ( ) + "!]"
147+ )
148+ or
149+ c = TUnknownElementContent ( ) and result = "Element[?]"
150+ }
151+
152+ private string getContentSetSpecific ( ContentSet cs ) {
153+ exists ( Content c | cs = TSingletonContent ( c ) and result = getContentSpecific ( c ) )
154+ or
155+ cs = TAnyElementContent ( ) and result = "Element[any]"
156+ or
157+ exists ( Content:: KnownElementContent kec |
158+ cs = TKnownOrUnknownElementContent ( kec ) and result = "Element[" + kec .getIndex ( ) + "]"
159+ )
160+ or
161+ exists ( int lower , boolean includeUnknown , string unknown |
162+ cs = TElementLowerBoundContent ( lower , includeUnknown ) and
163+ ( if includeUnknown = true then unknown = "" else unknown = "!" ) and
164+ result = "Element[" + lower + ".." + unknown + "]"
165+ )
166+ }
167+
142168/** Gets the textual representation of a summary component in the format used for flow summaries. */
143- string getAccessStepSpecific ( SummaryComponent sc ) { none ( ) }
169+ string getAccessStepSpecific ( SummaryComponent sc ) {
170+ exists ( ContentSet cs | sc = TContentSummaryComponent ( cs ) and result = getContentSetSpecific ( cs ) )
171+ or
172+ exists ( ContentSet cs |
173+ sc = TWithoutContentSummaryComponent ( cs ) and
174+ result = "WithoutElement[" + getContentSetSpecific ( cs ) + "]"
175+ )
176+ or
177+ exists ( ContentSet cs |
178+ sc = TWithContentSummaryComponent ( cs ) and
179+ result = "WithElement[" + getContentSetSpecific ( cs ) + "]"
180+ )
181+ or
182+ exists ( ReturnKind rk |
183+ sc = TReturnSummaryComponent ( rk ) and
184+ not rk = getReturnValueKind ( ) and
185+ result = "ReturnValue[" + rk + "]"
186+ )
187+ }
144188
145189/** Gets the textual representation of a parameter position in the format used for flow summaries. */
146190string getParameterPosition ( ParameterPosition pos ) {
@@ -170,6 +214,9 @@ string getParameterPosition(ParameterPosition pos) {
170214 or
171215 pos .isAnyNamed ( ) and
172216 result = "any-named"
217+ or
218+ pos .isHashSplat ( ) and
219+ result = "hash-splat"
173220}
174221
175222/** Gets the textual representation of an argument position in the format used for flow summaries. */
0 commit comments