2 instantiations of BoundSwitchLabel
Microsoft.CodeAnalysis.CSharp (2)
Binder\SwitchBinder_Patterns.cs (1)
134
newLabel = new
BoundSwitchLabel
(label.Syntax, label.Label, label.Pattern, label.HasUnionMatching, label.WhenClause, hasErrors: true);
Generated\BoundNodes.xml.Generated.cs (1)
5803
var result = new
BoundSwitchLabel
(this.Syntax, label, pattern, hasUnionMatching, whenClause, this.HasErrors);
50 references to BoundSwitchLabel
Microsoft.CodeAnalysis.CSharp (50)
Binder\DecisionDagBuilder.cs (1)
153
foreach (
BoundSwitchLabel
label in section.SwitchLabels)
Binder\DecisionDagBuilder_CheckOrReachability.cs (2)
176
foreach (
BoundSwitchLabel
label in section.SwitchLabels)
193
foreach (
BoundSwitchLabel
label in section.SwitchLabels)
Binder\SwitchBinder_Patterns.cs (12)
42
ImmutableArray<BoundSwitchSection> switchSections = BindSwitchSections(originalBinder, diagnostics, out
BoundSwitchLabel
defaultLabel);
85
static bool isSubsumed(
BoundSwitchLabel
switchLabel, ImmutableHashSet<LabelSymbol> reachableLabels)
100
var labelBuilder = ArrayBuilder<
BoundSwitchLabel
>.GetInstance(oldSection.SwitchLabels.Length);
101
foreach (
var
label in oldSection.SwitchLabels)
103
var
newLabel = label;
158
BoundSwitchLabel
defaultLabel = null;
173
out
BoundSwitchLabel
defaultLabel)
193
ref
BoundSwitchLabel
defaultLabel,
197
var boundLabelsBuilder = ArrayBuilder<
BoundSwitchLabel
>.GetInstance(node.Labels.Count);
205
BoundSwitchLabel
boundLabel = BindSwitchSectionLabel(sectionBinder, labelSyntax, label, ref defaultLabel, diagnostics);
237
private
BoundSwitchLabel
BindSwitchSectionLabel(
241
ref
BoundSwitchLabel
defaultLabel,
BoundTree\BoundNode_Source.cs (2)
276
foreach (
var
label in section.SwitchLabels)
297
case
BoundSwitchLabel
label:
BoundTree\BoundStatementExtensions.cs (1)
43
foreach (
var
boundSwitchLabel in ((BoundSwitchSection)node).SwitchLabels)
FlowAnalysis\AbstractFlowPass.cs (1)
864
foreach (
var
label in sec.SwitchLabels)
FlowAnalysis\AbstractFlowPass_Switch.cs (2)
49
foreach (
var
label in section.SwitchLabels)
123
foreach (
var
label in node.SwitchLabels)
FlowAnalysis\ControlFlowPass.cs (1)
389
foreach (
var
label in section.SwitchLabels)
FlowAnalysis\NullableWalker_Patterns.cs (3)
282
foreach (
var
label in section.SwitchLabels)
303
foreach (
var
label in section.SwitchLabels)
320
foreach (
var
label in node.SwitchLabels)
FlowAnalysis\VariablesDeclaredWalker.cs (1)
58
foreach (
var
label in node.SwitchLabels)
Generated\BoundNodes.xml.Generated.cs (20)
3830
public BoundSwitchStatement(SyntaxNode syntax, BoundExpression expression, ImmutableArray<LocalSymbol> innerLocals, ImmutableArray<MethodSymbol> innerLocalFunctions, ImmutableArray<BoundSwitchSection> switchSections, BoundDecisionDag reachabilityDecisionDag,
BoundSwitchLabel
? defaultLabel, LabelSymbol breakLabel, bool hasErrors = false)
3855
public
BoundSwitchLabel
? DefaultLabel { get; }
3861
public BoundSwitchStatement Update(BoundExpression expression, ImmutableArray<LocalSymbol> innerLocals, ImmutableArray<MethodSymbol> innerLocalFunctions, ImmutableArray<BoundSwitchSection> switchSections, BoundDecisionDag reachabilityDecisionDag,
BoundSwitchLabel
? defaultLabel, LabelSymbol breakLabel)
5746
public BoundSwitchSection(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<
BoundSwitchLabel
> switchLabels, ImmutableArray<BoundStatement> statements, bool hasErrors = false)
5759
public ImmutableArray<
BoundSwitchLabel
> SwitchLabels { get; }
5764
public BoundSwitchSection Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<
BoundSwitchLabel
> switchLabels, ImmutableArray<BoundStatement> statements)
5799
public
BoundSwitchLabel
Update(LabelSymbol label, BoundPattern pattern, bool hasUnionMatching, BoundExpression? whenClause)
5803
var
result = new BoundSwitchLabel(this.Syntax, label, pattern, hasUnionMatching, whenClause, this.HasErrors);
9402
return VisitSwitchLabel((
BoundSwitchLabel
)node, arg);
9731
public virtual R VisitSwitchLabel(
BoundSwitchLabel
node, A arg) => this.DefaultVisit(node, arg);
9972
public virtual BoundNode? VisitSwitchLabel(
BoundSwitchLabel
node) => this.DefaultVisit(node);
10686
public override BoundNode? VisitSwitchLabel(
BoundSwitchLabel
node)
11729
BoundSwitchLabel
? defaultLabel = (
BoundSwitchLabel
?)this.Visit(node.DefaultLabel);
12079
ImmutableArray<
BoundSwitchLabel
> switchLabels = this.VisitList(node.SwitchLabels);
12083
public override BoundNode? VisitSwitchLabel(
BoundSwitchLabel
node)
13894
BoundSwitchLabel
? defaultLabel = (
BoundSwitchLabel
?)this.Visit(node.DefaultLabel);
14221
ImmutableArray<
BoundSwitchLabel
> switchLabels = this.VisitList(node.SwitchLabels);
16790
public override TreeDumperNode VisitSwitchLabel(
BoundSwitchLabel
node, object? arg) => new TreeDumperNode("switchLabel", null, new TreeDumperNode[]
Lowering\LocalRewriter\LocalRewriter_PatternSwitchStatement.cs (1)
135
foreach (
BoundSwitchLabel
switchLabel in section.SwitchLabels)
Operations\CSharpOperationFactory.cs (3)
248
return CreateBoundSwitchLabelOperation((
BoundSwitchLabel
)boundNode);
2763
ImmutableArray<ICaseClauseOperation> clauses = CreateFromArray<
BoundSwitchLabel
, ICaseClauseOperation>(boundSwitchSection.SwitchLabels);
2811
private ICaseClauseOperation CreateBoundSwitchLabelOperation(
BoundSwitchLabel
boundSwitchLabel)