mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Update docs/codeql/codeql-language-guides/advanced-dataflow-scenarios-cpp.rst
Co-authored-by: Felicity Chapman <felicitymay@github.com>
This commit is contained in:
committed by
GitHub
parent
e6ae3ffe7a
commit
02e3d2704c
@@ -11,7 +11,7 @@ Data flow for C and C++ distinguishes between the value of a pointer and the val
|
||||
|
||||
For almost all situations we only need to instantiate a dataflow configuration and specify our sources and sinks, and the dataflow library will handle everything for us.
|
||||
|
||||
However, when a write to a field is not visible to CodeQL (for example because it happens in a function whose definition is not in the database) we need to track the qualifier, and tell the dataflow library that it is okay to transfer flow from the qualifier to the field access. This is done by adding an ``isAdditionalFlowStep`` predicate to the dataflow module.
|
||||
However, when a write to a field is not visible to CodeQL (for example, because it happens in a function whose definition is not in the database) we need to track the qualifier, and tell the dataflow library that it should transfer flow from the qualifier to the field access. This is done by adding an ``isAdditionalFlowStep`` predicate to the dataflow module.
|
||||
|
||||
When adding additional flow steps involving pointers one needs to be careful about whether the dataflow step should flow from the pointer or its indirection. Similarly, care must be taken to decide whether the additional step should target a pointer or its indirection.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user