Files
codeql/cpp/ql/examples/snippets/field_access.ql
2019-08-02 15:29:20 +02:00

18 lines
337 B
Plaintext

/**
* @id cpp/examples/field-access
* @name Access of field
* @description Finds reads of `aDate` (defined on class `Order`)
* @tags access
* field
* read
*/
import cpp
from Field f, FieldAccess access
where
f.hasName("aDate") and
f.getDeclaringType().hasName("Order") and
f = access.getTarget()
select access