Skip to content

Commit

Permalink
Revert change to hasEmbeddedField
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-mc committed Oct 17, 2024
1 parent 5007666 commit 87992fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion go/ql/lib/semmle/go/Types.qll
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,8 @@ class StructType extends @structtype, CompositeType {
*/
private predicate hasEmbeddedField(Type tp, int depth) {
exists(Field f | this.hasFieldCand(_, f, depth, true) |
tp = lookThroughPointerType(f.getType())
tp = f.getType() or
tp = f.getType().(PointerType).getBaseType()
)
}

Expand Down

0 comments on commit 87992fa

Please sign in to comment.