File tree Expand file tree Collapse file tree 2 files changed +5
-10
lines changed
go/ql/lib/semmle/go/dataflow/internal Expand file tree Collapse file tree 2 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -166,15 +166,10 @@ module Public {
166
166
SummaryComponentStack return ( ReturnKind rk ) { result = singleton ( SummaryComponent:: return ( rk ) ) }
167
167
}
168
168
169
- private predicate noComponentSpecific ( SummaryComponent sc ) {
170
- not exists ( getComponentSpecific ( sc ) )
171
- }
172
-
173
169
/** Gets a textual representation of this component used for flow summaries. */
174
170
private string getComponent ( SummaryComponent sc ) {
175
171
result = getComponentSpecific ( sc )
176
172
or
177
- noComponentSpecific ( sc ) and
178
173
(
179
174
exists ( ArgumentPosition pos |
180
175
sc = TParameterSummaryComponent ( pos ) and
@@ -185,9 +180,9 @@ module Public {
185
180
sc = TArgumentSummaryComponent ( pos ) and
186
181
result = "Argument[" + getParameterPosition ( pos ) + "]"
187
182
)
188
- or
189
- sc = TReturnSummaryComponent ( getReturnValueKind ( ) ) and result = "ReturnValue"
190
183
)
184
+ or
185
+ sc = TReturnSummaryComponent ( getReturnValueKind ( ) ) and result = "ReturnValue"
191
186
}
192
187
193
188
/** Gets a textual representation of this stack used for flow summaries. */
Original file line number Diff line number Diff line change @@ -111,10 +111,10 @@ private string getContentSpecific(Content c) {
111
111
string getComponentSpecific ( SummaryComponent sc ) {
112
112
exists ( Content c | sc = TContentSummaryComponent ( c ) and result = getContentSpecific ( c ) )
113
113
or
114
- exists ( ReturnKind rk , int n | n = rk . getIndex ( ) |
114
+ exists ( ReturnKind rk |
115
115
sc = TReturnSummaryComponent ( rk ) and
116
- result = "ReturnValue[" + n + "]" and
117
- n != 0
116
+ not rk = getReturnValueKind ( ) and
117
+ result = "ReturnValue[" + rk . getIndex ( ) + "]"
118
118
)
119
119
}
120
120
You can’t perform that action at this time.
0 commit comments