Skip to content

Commit 72bd958

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 8c67dee commit 72bd958

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
@@ -2155,20 +2155,12 @@ private predicate isTypeExprTopDown(Expr e) {
21552155
or
21562156
e = any(ArrayTypeExpr ae).getElement()
21572157
or
2158-
e = any(FieldDecl f).getTypeExpr()
2159-
or
2160-
e = any(ParameterDecl pd).getTypeExpr()
2158+
e = any(FieldBase fb).getTypeExpr()
21612159
or
21622160
e = any(TypeParamDecl tpd).getTypeConstraintExpr()
21632161
or
21642162
e = any(TypeParamDecl tpd).getNameExpr(_)
21652163
or
2166-
e = any(ReceiverDecl rd).getTypeExpr()
2167-
or
2168-
e = any(ResultVariableDecl rvd).getTypeExpr()
2169-
or
2170-
e = any(MethodSpec md).getTypeExpr()
2171-
or
21722164
e = any(MapTypeExpr mt).getKeyTypeExpr()
21732165
or
21742166
e = any(MapTypeExpr mt).getValueTypeExpr()

0 commit comments

Comments
 (0)