Files
codeql/csharp/ql/test/library-tests/expressions/ObjectCreation3.ql
2018-12-20 10:19:59 +01:00

16 lines
344 B
Plaintext

/**
* @name Test for object creations
*/
import csharp
from Method m, ObjectCreation e, Constructor cc, ObjectOrCollectionInitializer i
where
m.hasName("MainCreations") and
e.getEnclosingCallable() = m and
e.getTarget() = cc and
e.getNumberOfArguments() = 0 and
cc.hasName("Point") and
i = e.getInitializer()
select m, e, cc, i