We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ba3ec50 + b9a57a4 commit 0b89101Copy full SHA for 0b89101
cpp/ql/src/Likely Bugs/Conversion/CastArrayPointerArithmetic.ql
@@ -43,11 +43,15 @@ class CastToPointerArithFlow extends DataFlow::Configuration {
43
}
44
45
46
+/**
47
+ * `derived` has a (possibly indirect) base class of `base`, and at least one new
48
+ * field has been introduced in the inheritance chain after `base`.
49
+ */
50
predicate introducesNewField(Class derived, Class base) {
- derived.getABaseClass+() = base and
51
(
52
exists(Field f |
- f.getDeclaringType() = derived
53
+ f.getDeclaringType() = derived and
54
+ derived.getABaseClass+() = base
55
) or
56
introducesNewField(derived.getABaseClass(), base)
57
)
0 commit comments