mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
16 lines
365 B
Plaintext
16 lines
365 B
Plaintext
/**
|
|
* @name Address of reference variable
|
|
* @description Finds address-of expressions (`&`) that take the address
|
|
* of a reference variable
|
|
* @tags addressof
|
|
* reference
|
|
*/
|
|
|
|
import cpp
|
|
|
|
from AddressOfExpr addr, VariableAccess access
|
|
where
|
|
access = addr.getOperand() and
|
|
access.getTarget().getType() instanceof ReferenceType
|
|
select addr
|