C++: QLDoc for FileClosed, LoopBounds and MemoryFreed

This commit is contained in:
Mathias Vorreiter Pedersen
2020-04-14 10:20:35 +02:00
parent 7c5c9ea8ea
commit d8dcbe3cbd
3 changed files with 30 additions and 0 deletions

View File

@@ -2,12 +2,23 @@
import cpp
/** An assignment to a variable with the value `0`. For example:
* ```
* int x;
* x = 0;
* ```
* but not:
* ```
* int x = 0;
* ```
*/
class ZeroAssignment extends AssignExpr {
ZeroAssignment() {
this.getAnOperand() instanceof VariableAccess and
this.getAnOperand() instanceof Zero
}
/** Gets a variable that is assigned the value `0`. */
Variable assignedVariable() { result.getAnAccess() = this.getAnOperand() }
}