File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
shared/dataflow/codeql/dataflow/internal Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -244,6 +244,13 @@ module MakeConsistency<
244244
245245 private predicate hasPost ( Node n ) { exists ( PostUpdateNode post | post .getPreUpdateNode ( ) = n ) }
246246
247+ /**
248+ * Consider code like `a.b.f = source()`. There is flow from `source()` to
249+ * `[post] a.b` (with an appropriate access path), but we also want there to
250+ * be flow to `[post] a` (with an appropriate access path). The data flow
251+ * library is able to infer this step because there is a read step from `a`
252+ * to `a.b`, as long as the post-update node for `a` exists.
253+ */
247254 query predicate reverseRead ( Node n , string msg ) {
248255 exists ( Node n2 | readStep ( n , _, n2 ) and hasPost ( n2 ) and not hasPost ( n ) ) and
249256 not Input:: reverseReadExclude ( n ) and
You can’t perform that action at this time.
0 commit comments