mirror of
https://github.com/github/codeql.git
synced 2026-05-05 05:35:13 +02:00
C++: QLDoc for FileClosed, LoopBounds and MemoryFreed
This commit is contained in:
@@ -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() }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user