Files
codeql/cpp/ql/examples/snippets/constructor_call.ql
2019-07-26 17:47:11 +02:00

16 lines
297 B
Plaintext

/**
* @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