mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
Will need subsequent PRs fixing up test failures (due to deprecated methods moving around), but other than that everything should be straight-forward.
17 lines
312 B
Plaintext
17 lines
312 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, ClassValue cls
|
|
where
|
|
cls.getName() = "MyClass" and
|
|
new.getFunc().pointsTo(cls)
|
|
select new
|