C++: Address review comments

This commit is contained in:
Jeroen Ketema
2023-03-02 14:31:59 +01:00
parent 7ce230af77
commit f6ce27075c
2 changed files with 5 additions and 3 deletions

View File

@@ -22,7 +22,9 @@ Local data flow is data flow within a single function. Local data flow is usuall
Using local data flow
~~~~~~~~~~~~~~~~~~~~~
The local data flow library is in the module ``DataFlow``, which defines the class ``Node`` denoting any element that data can flow through. ``Node``\ s are divided into expression nodes (``ExprNode``) and parameter nodes (``ParameterNode``). It is possible to map between data flow nodes and expressions/parameters using the member predicates ``asExpr``, ``asIndirectExpr``, and ``asParameter``:
The local data flow library is in the module ``DataFlow``, which defines the class ``Node`` denoting any element that data can flow through. ``Node``\ s are divided into expression nodes (``ExprNode``, ``IndirectExprNode``) and parameter nodes (``ParameterNode``, ``IndirectParameterNode``). The indirect nodes represent expressions or parameters after a fixed number of pointer dereferences.
It is possible to map between data flow nodes and expressions/parameters using the member predicates ``asExpr``, ``asIndirectExpr``, and ``asParameter``:
.. code-block:: ql
@@ -115,7 +117,7 @@ Unfortunately, this will only give the expression in the argument, not the value
DataFlow::localFlow(source, sink)
select src
Then we can vary the source, for example an access to a public parameter. The following query finds where a public parameter is used to open a file:
Then we can vary the source and, for example, use the parameter of a function. The following query finds where a parameter is used when opening a file:
.. code-block:: ql

View File

@@ -105,7 +105,7 @@ Unfortunately, this will only give the expression in the argument, not the value
and DataFlow::localFlow(DataFlow::exprNode(src), DataFlow::exprNode(fc.getArgument(0)))
select src
Then we can vary the source, for example an access to a public parameter. The following query finds where a public parameter is used to open a file:
Then we can vary the source and, for example, use the parameter of a function. The following query finds where a parameter is used when opening a file:
.. code-block:: ql