Files
codeql/csharp/ql/test/library-tests/expressions/Call7.ql
2023-11-10 08:46:15 +01:00

16 lines
366 B
Plaintext

/**
* @name Test for calls
*/
import csharp
from Method m, MethodCall e, Method t
where
m.hasName("MainLocalVarDecl") and
e.getEnclosingCallable() = m and
t = e.getTarget() and
t.hasName("WriteLine") and
t.getDeclaringType().hasFullyQualifiedName("System", "Console") and
e.getArgument(0) instanceof AddExpr
select m, e.getAnArgument(), t.toString()