Files
codeql/cpp/ql/lib/semmle/code/cpp/commons/PolymorphicClass.qll
Andrew Eisenberg 2c5dd2dfa3 Packaging: Refactor the cpp libraries
This PR separates the core cpp packs into `codeql/cpp-queries` and
`codeql/cpp-all`.

There are very few lines of code changed. Almost all changes are moving
files around.
2021-08-17 11:22:36 -07:00

11 lines
275 B
Plaintext

import cpp
/**
* A C++ class or structure which (possibly by inheritance) has at least one virtual method.
*/
class PolymorphicClass extends Class {
PolymorphicClass() {
exists(MemberFunction f | this.getABaseClass*() = f.getDeclaringType() and f.isVirtual())
}
}