mirror of
https://github.com/github/codeql.git
synced 2026-03-23 16:06:47 +01:00
12 lines
285 B
Plaintext
12 lines
285 B
Plaintext
/**
|
|
* @name Test for object creations
|
|
*/
|
|
import csharp
|
|
|
|
from Assignment a, CollectionInitializer i
|
|
where a.getLValue().(VariableAccess).getTarget().hasName("list1")
|
|
and i.getParent+() = a
|
|
and i.getElementInitializer(0).getArgument(0) instanceof AssignExpr
|
|
select i.getAChild+()
|
|
|