slang
slang copied to clipboard
Fix#6784 - Add diagnostic for for-loop update expressions with no effect
This commit introduces a new warning diagnostic (30506) for cases where the update expression in a for-loop does not modify any variables, potentially leading to infinite loops. The implementation includes checks in the SemanticsStmtVisitor to identify such expressions and provide appropriate warnings. Additionally, tests have been added to verify the new diagnostic behavior.