Files
codeql/csharp/ql/test/library-tests/dataflow/ssa/SsaCapturedVariableDef.ql
2018-08-02 17:53:23 +01:00

7 lines
367 B
Plaintext

import csharp
from string inout, Ssa::ExplicitDefinition def, Ssa::Definition targetDef, Call c
where (inout = "in" and def.isCapturedVariableDefinitionFlowIn(targetDef, c))
or (inout = "out" and def.isCapturedVariableDefinitionFlowOut(targetDef) and targetDef.(Ssa::ImplicitCallDefinition).getCall() = c)
select inout, def.getSourceVariable(), def, targetDef, c