2 instantiations of BoundSwitchLabel
Microsoft.CodeAnalysis.CSharp (2)
Binder\SwitchBinder_Patterns.cs (1)
124newLabel = new BoundSwitchLabel(label.Syntax, label.Label, label.Pattern, label.WhenClause, hasErrors: true);
Generated\BoundNodes.xml.Generated.cs (1)
5713var result = new BoundSwitchLabel(this.Syntax, label, pattern, whenClause, this.HasErrors);
48 references to BoundSwitchLabel
Microsoft.CodeAnalysis.CSharp (48)
Binder\DecisionDagBuilder.cs (1)
151foreach (BoundSwitchLabel label in section.SwitchLabels)
Binder\SwitchBinder_Patterns.cs (12)
42ImmutableArray<BoundSwitchSection> switchSections = BindSwitchSections(originalBinder, diagnostics, out BoundSwitchLabel defaultLabel); 78static bool isSubsumed(BoundSwitchLabel switchLabel, ImmutableHashSet<LabelSymbol> reachableLabels) 93var labelBuilder = ArrayBuilder<BoundSwitchLabel>.GetInstance(oldSection.SwitchLabels.Length); 94foreach (var label in oldSection.SwitchLabels) 96var newLabel = label; 148BoundSwitchLabel defaultLabel = null; 163out BoundSwitchLabel defaultLabel) 183ref BoundSwitchLabel defaultLabel, 187var boundLabelsBuilder = ArrayBuilder<BoundSwitchLabel>.GetInstance(node.Labels.Count); 195BoundSwitchLabel boundLabel = BindSwitchSectionLabel(sectionBinder, labelSyntax, label, ref defaultLabel, diagnostics); 227private BoundSwitchLabel BindSwitchSectionLabel( 231ref BoundSwitchLabel defaultLabel,
BoundTree\BoundNode_Source.cs (2)
288foreach (var label in section.SwitchLabels) 309case BoundSwitchLabel label:
BoundTree\BoundStatementExtensions.cs (1)
43foreach (var boundSwitchLabel in ((BoundSwitchSection)node).SwitchLabels)
FlowAnalysis\AbstractFlowPass.cs (1)
864foreach (var label in sec.SwitchLabels)
FlowAnalysis\AbstractFlowPass_Switch.cs (2)
49foreach (var label in section.SwitchLabels) 123foreach (var label in node.SwitchLabels)
FlowAnalysis\ControlFlowPass.cs (1)
389foreach (var label in section.SwitchLabels)
FlowAnalysis\NullableWalker_Patterns.cs (3)
282foreach (var label in section.SwitchLabels) 303foreach (var label in section.SwitchLabels) 320foreach (var label in node.SwitchLabels)
FlowAnalysis\VariablesDeclaredWalker.cs (1)
58foreach (var label in node.SwitchLabels)
Generated\BoundNodes.xml.Generated.cs (20)
3770public BoundSwitchStatement(SyntaxNode syntax, BoundExpression expression, ImmutableArray<LocalSymbol> innerLocals, ImmutableArray<LocalFunctionSymbol> innerLocalFunctions, ImmutableArray<BoundSwitchSection> switchSections, BoundDecisionDag reachabilityDecisionDag, BoundSwitchLabel? defaultLabel, GeneratedLabelSymbol breakLabel, bool hasErrors = false) 3795public BoundSwitchLabel? DefaultLabel { get; } 3801public BoundSwitchStatement Update(BoundExpression expression, ImmutableArray<LocalSymbol> innerLocals, ImmutableArray<LocalFunctionSymbol> innerLocalFunctions, ImmutableArray<BoundSwitchSection> switchSections, BoundDecisionDag reachabilityDecisionDag, BoundSwitchLabel? defaultLabel, GeneratedLabelSymbol breakLabel) 5658public BoundSwitchSection(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundSwitchLabel> switchLabels, ImmutableArray<BoundStatement> statements, bool hasErrors = false) 5671public ImmutableArray<BoundSwitchLabel> SwitchLabels { get; } 5676public BoundSwitchSection Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundSwitchLabel> switchLabels, ImmutableArray<BoundStatement> statements) 5709public BoundSwitchLabel Update(LabelSymbol label, BoundPattern pattern, BoundExpression? whenClause) 5713var result = new BoundSwitchLabel(this.Syntax, label, pattern, whenClause, this.HasErrors); 9133return VisitSwitchLabel((BoundSwitchLabel)node, arg); 9454public virtual R VisitSwitchLabel(BoundSwitchLabel node, A arg) => this.DefaultVisit(node, arg); 9690public virtual BoundNode? VisitSwitchLabel(BoundSwitchLabel node) => this.DefaultVisit(node); 10394public override BoundNode? VisitSwitchLabel(BoundSwitchLabel node) 11352BoundSwitchLabel? defaultLabel = (BoundSwitchLabel?)this.Visit(node.DefaultLabel); 11655ImmutableArray<BoundSwitchLabel> switchLabels = this.VisitList(node.SwitchLabels); 11659public override BoundNode? VisitSwitchLabel(BoundSwitchLabel node) 13398BoundSwitchLabel? defaultLabel = (BoundSwitchLabel?)this.Visit(node.DefaultLabel); 13726ImmutableArray<BoundSwitchLabel> switchLabels = this.VisitList(node.SwitchLabels); 16258public override TreeDumperNode VisitSwitchLabel(BoundSwitchLabel node, object? arg) => new TreeDumperNode("switchLabel", null, new TreeDumperNode[]
Lowering\LocalRewriter\LocalRewriter_PatternSwitchStatement.cs (1)
135foreach (BoundSwitchLabel switchLabel in section.SwitchLabels)
Operations\CSharpOperationFactory.cs (3)
249return CreateBoundSwitchLabelOperation((BoundSwitchLabel)boundNode); 2697ImmutableArray<ICaseClauseOperation> clauses = CreateFromArray<BoundSwitchLabel, ICaseClauseOperation>(boundSwitchSection.SwitchLabels); 2745private ICaseClauseOperation CreateBoundSwitchLabelOperation(BoundSwitchLabel boundSwitchLabel)