From 207dcb08a788bb400cdeb34f6e5174b5edfa8002 Mon Sep 17 00:00:00 2001 From: Mathias Vorreiter Pedersen Date: Thu, 19 Aug 2021 13:38:32 +0200 Subject: [PATCH] C++: Make it clear that 'getAnAssignment' also gets the expression from the initializer. --- cpp/ql/lib/semmle/code/cpp/Variable.qll | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cpp/ql/lib/semmle/code/cpp/Variable.qll b/cpp/ql/lib/semmle/code/cpp/Variable.qll index 3dc9e230026..12e25f33afe 100644 --- a/cpp/ql/lib/semmle/code/cpp/Variable.qll +++ b/cpp/ql/lib/semmle/code/cpp/Variable.qll @@ -140,7 +140,8 @@ class Variable extends Declaration, @variable { * This does _not_ include the initialization of the variable. Use * `Variable.getInitializer()` to get the variable's initializer, * or use `Variable.getAnAssignedValue()` to get an expression that - * is assigned to this variable somewhere in the program. + * is the right-hand side of an assignment or an initialization of + * the varible. */ Assignment getAnAssignment() { result.getLValue() = this.getAnAccess() }