CodeQL queries 1.24

Skip to end of metadata
Go to start of metadata

Finds address-of expressions (`&`) that take the address of a reference variable

import cpp

from AddressOfExpr addr, VariableAccess access
where
  access = addr.getOperand() and
  access.getTarget().getType() instanceof ReferenceType
select addr