public override void VisitForEachStatement(ForEachStatementSyntax node) { Visit(node.Expression); if (_graph.UsedVariableNodes.Contains(node.Identifier)) { // This is a special case required because ForEachStatements require a raw identifier // token (but matches what HandleConditionalBlock does): _blockGuardInformation = new BlockGuardInformation(_graph, enclosingBlockInfo: _blockGuardInformation, validatedGuard: node.Expression, invalidatedGuard: null); var variableName = node.ToString(); VisitVariable(variableName, node.Identifier); _blockGuardInformation = _blockGuardInformation.EnclosingBlockInformation; } HandleConditionalBlock(new SyntaxNode[] { node.Statement }, validatedGuard: node.Expression); }