Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,13 @@ Type stripType(Type t) {

/**
* Holds if `t` points to `base` via a specified number of levels of pointer
* indirection. Intermediate typedefs and array types are allowed.
* indirection. Intermediate typedefs and array types are allowed. Note that
* `base` is a stripped type (via `stripType`).
*/
predicate pointerIndirection(Type t, int indirection, Type base) {
exists(Type u |
u = stripType(t) and
u = stripType(base) and
not u instanceof PointerType and
(
base = stripType(t) and
not base instanceof PointerType and
indirection = 0
) or (
pointerIndirection(stripType(t).(PointerType).getBaseType(), indirection - 1, base)
Expand Down