Files
codeql/cpp/ql/test/library-tests/functions/functions/Functions2.ql
2018-08-02 17:53:23 +01:00

16 lines
393 B
Plaintext

/**
* @name Functions2
* @kind table
*/
import cpp
from Class c, string ctype, MemberFunction f, string ftype
where
if c instanceof Struct then ctype = "Struct" else ctype = "Class" and
(
(f = c.getAConstructor() and ftype = "constructor") or
(f = c.getDestructor() and ftype = "destructor") or
(f.getDeclaringType() = c and ftype = "member function")
)
select c, ctype, f, ftype