mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
17 lines
356 B
Plaintext
17 lines
356 B
Plaintext
/**
|
|
* @name Test for object creations
|
|
*/
|
|
|
|
import csharp
|
|
|
|
from Method m, ObjectCreation e, Constructor cc
|
|
where
|
|
m.hasName("MainUnaryOperator") and
|
|
e.getEnclosingCallable() = m and
|
|
e.getTarget() = cc and
|
|
e.getNumberOfArguments() = 1 and
|
|
e.getArgument(0).getValue() = "4" and
|
|
cc.hasName("IntVector") and
|
|
not e.hasInitializer()
|
|
select m, e, cc
|