Skip to content

Commit 207dcb0

Browse files
committed
C++: Make it clear that 'getAnAssignment' also gets the expression from the initializer.
1 parent 586c5b9 commit 207dcb0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ class Variable extends Declaration, @variable {
140140
* This does _not_ include the initialization of the variable. Use
141141
* `Variable.getInitializer()` to get the variable's initializer,
142142
* or use `Variable.getAnAssignedValue()` to get an expression that
143-
* is assigned to this variable somewhere in the program.
143+
* is the right-hand side of an assignment or an initialization of
144+
* the varible.
144145
*/
145146
Assignment getAnAssignment() { result.getLValue() = this.getAnAccess() }
146147

0 commit comments

Comments
 (0)