From 1318504aa57986091317f27f4de759fbf4cc13f9 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Thu, 17 Oct 2024 12:06:46 +0100 Subject: [PATCH] Add QLDoc --- go/ql/lib/semmle/go/Types.qll | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go/ql/lib/semmle/go/Types.qll b/go/ql/lib/semmle/go/Types.qll index 9f0b1c845121..1b09ea466cc4 100644 --- a/go/ql/lib/semmle/go/Types.qll +++ b/go/ql/lib/semmle/go/Types.qll @@ -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