Skip to content

Commit 22e012c

Browse files
committed
Expand isTypeExprTopDown
We should be using all subtypes of `FieldBase`. This allows us to find more type expressions, and is also simpler to evaluate.
1 parent bbd02b8 commit 22e012c

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

go/ql/lib/semmle/go/Expr.qll

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2145,20 +2145,12 @@ private predicate isTypeExprTopDown(Expr e) {
21452145
or
21462146
e = any(ArrayTypeExpr ae).getElement()
21472147
or
2148-
e = any(FieldDecl f).getTypeExpr()
2149-
or
2150-
e = any(ParameterDecl pd).getTypeExpr()
2148+
e = any(FieldBase fb).getTypeExpr()
21512149
or
21522150
e = any(TypeParamDecl tpd).getTypeConstraintExpr()
21532151
or
21542152
e = any(TypeParamDecl tpd).getNameExpr(_)
21552153
or
2156-
e = any(ReceiverDecl rd).getTypeExpr()
2157-
or
2158-
e = any(ResultVariableDecl rvd).getTypeExpr()
2159-
or
2160-
e = any(MethodSpec md).getTypeExpr()
2161-
or
21622154
e = any(MapTypeExpr mt).getKeyTypeExpr()
21632155
or
21642156
e = any(MapTypeExpr mt).getValueTypeExpr()

0 commit comments

Comments
 (0)