C++: Add QLDoc to 'isDereference'.

This commit is contained in:
Mathias Vorreiter Pedersen
2023-08-30 14:34:30 +01:00
parent b092da485d
commit 261ba8e02d

View File

@@ -320,6 +320,14 @@ private module IteratorIndirections {
}
}
/**
* Holds if `deref` is the result of loading the value at the address
* represented by `address`.
*
* If `additional = true` then the dereference comes from an `Indirection`
* class (such as a call to an iterator's `operator*`), and if
* `additional = false` the dereference is a `LoadInstruction`.
*/
predicate isDereference(Instruction deref, Operand address, boolean additional) {
any(Indirection ind).isAdditionalDereference(deref, address) and
additional = true