Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0b4459d

Browse files
committed
C++: Add more QLDoc.
1 parent 4535043 commit 0b4459d

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

cpp/ql/lib/semmle/code/cpp/dataflow/ExternalFlow.qll

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,17 @@
1414
* The interpretation of a row is similar to API-graphs with a left-to-right
1515
* reading.
1616
* 1. The `namespace` column selects a namespace.
17-
* 2. The `type` column selects a type within that namespace.
17+
* 2. The `type` column selects a type within that namespace. This column can
18+
* introduce template names that can be mentioned in the `signature` column.
19+
* For example, `vector<T,Allocator>` introduces the template names `T` and
20+
* `Allocator`.
1821
* 3. The `subtypes` is a boolean that indicates whether to jump to an
1922
* arbitrary subtype of that type. Set this to `false` if leaving the `type`
2023
* blank (for example, a free function).
2124
* 4. The `name` column optionally selects a specific named member of the type.
25+
* Like the `type` column, this column can introduce template names that can
26+
* be mentioned in the `signature` column. For example, `insert<InputIt>`
27+
* introduces the template name `InputIt`.
2228
* 5. The `signature` column optionally restricts the named member. If
2329
* `signature` is blank then no such filtering is done. The format of the
2430
* signature is a comma-separated list of types enclosed in parentheses. The
@@ -44,6 +50,9 @@
4450
* One or more "*" can be added as an argument to indicate indirection, for
4551
* example, "ReturnValue[*]" indicates the first indirection of the return
4652
* value.
53+
* The special symbol `@` can be used to specify an arbitrary (but fixed)
54+
* number of indirections. For example, the `input` column `Argument[*@0]`
55+
* indicates one or more indirections of the 0th argument.
4756
*
4857
* An `output` can be either:
4958
* - "": Selects a read of a selected field.
@@ -65,6 +74,17 @@
6574
* One or more "*" can be added as an argument to indicate indirection, for
6675
* example, "ReturnValue[*]" indicates the first indirection of the return
6776
* value.
77+
* The special symbol `@` can be used to specify an arbitrary (but fixed)
78+
* number of indirections. For example, the `output` column
79+
* `ReturnValue[*@0]` indicates one or more indirections of the return
80+
* value.
81+
* Note: The symbol `@` only ever takes a single value across a row. Thus,
82+
* the (`input`, `output`) pair `("Argument[*@0]", "ReturnValue[@]")`
83+
* represents:
84+
* - flow from the _first_ indirection of the 0th argument to the return
85+
* value, and
86+
* - flow from the _second_ indirection of the 0th argument to the first
87+
* indirection of the return value, etc.
6888
* 8. The `kind` column is a tag that can be referenced from QL to determine to
6989
* which classes the interpreted elements should be added. For example, for
7090
* sources "remote" indicates a default remote flow source, and for summaries

0 commit comments

Comments
 (0)