We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 41d5d5a commit ce29047Copy full SHA for ce29047
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 `derived`
48
+ * introduces at least one new field that isn't in a base class.
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