mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
17 lines
333 B
Plaintext
17 lines
333 B
Plaintext
/**
|
|
* @id cpp/examples/constructor-call
|
|
* @name Call to constructor
|
|
* @description Finds places where we call `new MyClass(...)`
|
|
* @tags call
|
|
* constructor
|
|
* new
|
|
*/
|
|
|
|
import cpp
|
|
|
|
from NewExpr new, Constructor c
|
|
where
|
|
c = new.getInitializer().(ConstructorCall).getTarget() and
|
|
c.getName() = "MyClass"
|
|
select new
|