Skip to content

Commit f6ce270

Browse files
committed
C++: Address review comments
1 parent 7ce230a commit f6ce270

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/codeql/codeql-language-guides/analyzing-data-flow-in-cpp-new.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ Local data flow is data flow within a single function. Local data flow is usuall
2222
Using local data flow
2323
~~~~~~~~~~~~~~~~~~~~~
2424

25-
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``:
25+
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.
26+
27+
It is possible to map between data flow nodes and expressions/parameters using the member predicates ``asExpr``, ``asIndirectExpr``, and ``asParameter``:
2628

2729
.. code-block:: ql
2830
@@ -115,7 +117,7 @@ Unfortunately, this will only give the expression in the argument, not the value
115117
DataFlow::localFlow(source, sink)
116118
select src
117119
118-
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:
120+
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:
119121

120122
.. code-block:: ql
121123

docs/codeql/codeql-language-guides/analyzing-data-flow-in-cpp.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Unfortunately, this will only give the expression in the argument, not the value
105105
and DataFlow::localFlow(DataFlow::exprNode(src), DataFlow::exprNode(fc.getArgument(0)))
106106
select src
107107
108-
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:
108+
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:
109109

110110
.. code-block:: ql
111111

0 commit comments

Comments
 (0)