slang icon indicating copy to clipboard operation
slang copied to clipboard

Fix#6784 - Add diagnostic for for-loop update expressions with no effect

Open szihs opened this issue 6 months ago • 8 comments

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.

szihs avatar Apr 16 '25 15:04 szihs