Skip to content

Commit 586c5b9

Browse files
committed
C++: Mention Variable.getAnAssignedValue() in the QLDoc for getAnAssignment.
1 parent 01dfab2 commit 586c5b9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cpp/ql/lib/semmle/code/cpp/Variable.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ class Variable extends Declaration, @variable {
138138
* For example: `x=...` or `x+=...`.
139139
*
140140
* This does _not_ include the initialization of the variable. Use
141-
* `Variable.getInitializer()` to get the variable's initializer.
141+
* `Variable.getInitializer()` to get the variable's initializer,
142+
* or use `Variable.getAnAssignedValue()` to get an expression that
143+
* is assigned to this variable somewhere in the program.
142144
*/
143145
Assignment getAnAssignment() { result.getLValue() = this.getAnAccess() }
144146

0 commit comments

Comments
 (0)