Commit 3832100
Dave Bartolomeo
C++: Isolate models from AST dataflow's reference/object conflation
`DataFlowFunction` models treat references a pointers - an explicit level of indirection. The AST dataflow library generally treats references as if they were the referred-to object. This commit removes a workaround in the dataflow model for unary `operator*` on smart pointers, and makes the AST dataflow library adjust the results of querying the model so that a returned reference only gets flow that was modeled as going to the dereference of the return value.
This fixes some missing flow in IR dataflow, and recovers some (presumably) missing reverse taint flow in AST taint tracking as well.1 parent 0bc4b04 commit 3832100
File tree
3 files changed
+49
-33
lines changed- cpp/ql
- src/semmle/code/cpp/dataflow/internal
- test/library-tests/dataflow/taint-tests
3 files changed
+49
-33
lines changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
694 | 694 | | |
695 | 695 | | |
696 | 696 | | |
697 | | - | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
698 | 703 | | |
699 | 704 | | |
700 | 705 | | |
| |||
0 commit comments