Boxed variable query: account for implicit-init variables

This commit is contained in:
Chris Smowton
2023-11-06 17:55:31 +00:00
parent 0e3f6f7873
commit bb6e04456a

View File

@@ -63,7 +63,7 @@ from LocalBoxedVar v
where
forall(Expr e | e = v.getAnAssignedValue() | e.getType() = v.getPrimitiveType()) and
(
not v.getDeclExpr().getParent() instanceof EnhancedForStmt or
not v.getDeclExpr().hasImplicitInit() or
v.getDeclExpr().getParent().(EnhancedForStmt).getExpr().getType().(Array).getComponentType() =
v.getPrimitiveType()
) and