Update cpp/ql/src/Likely Bugs/Memory Management/UninitializedLocal.ql

Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com>
This commit is contained in:
Mingjie Shen
2023-07-07 12:25:42 -04:00
committed by GitHub
parent 4b4c0cd563
commit d8e0ffa52d

View File

@@ -72,12 +72,10 @@ VariableAccess commonException() {
or
result.getParent() instanceof BuiltInOperation
or
// Ignore the uninitialized use that is explicitly cast to void and
// is also an expression statement.
(
result.getActualType() instanceof VoidType and
result.getParent() instanceof ExprStmt
)
// Ignore any uninitialized use that is explicitly cast to void and
// is an expression statement.
result.getActualType() instanceof VoidType and
result.getParent() instanceof ExprStmt
or
// Finally, exclude functions that contain assembly blocks. It's
// anyone's guess what happens in those.