mirror of
https://github.com/github/codeql.git
synced 2025-12-18 01:33:15 +01:00
17 lines
318 B
Plaintext
17 lines
318 B
Plaintext
/**
|
|
* @id py/examples/new-instance
|
|
* @name Create new object
|
|
* @description Finds places where we create a new instanceof `MyClass`
|
|
* @tags call
|
|
* constructor
|
|
* new
|
|
*/
|
|
|
|
import python
|
|
|
|
from Call new, ClassObject cls
|
|
where
|
|
cls.getName() = "MyClass" and
|
|
new.getFunc().refersTo(cls)
|
|
select new
|