Skip to content

Commit

Permalink
Add QLDoc
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-mc committed Oct 17, 2024
1 parent 87992fa commit 1318504
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go/ql/lib/semmle/go/Types.qll
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,9 @@ class PointerType extends @pointertype, CompositeType {
override string toString() { result = "pointer type" }
}

/**
* Gets the base type if `t` is a pointer type, otherwise `t` itself.
*/
Type lookThroughPointerType(Type t) {
not t instanceof PointerType and
result = t
Expand Down

0 comments on commit 1318504

Please sign in to comment.