2 instantiations of BoundSwitchLabel
Microsoft.CodeAnalysis.CSharp (2)
Binder\SwitchBinder_Patterns.cs (1)
124
newLabel = new
BoundSwitchLabel
(label.Syntax, label.Label, label.Pattern, label.WhenClause, hasErrors: true);
Generated\BoundNodes.xml.Generated.cs (1)
5714
var result = new
BoundSwitchLabel
(this.Syntax, label, pattern, whenClause, this.HasErrors);
48 references to BoundSwitchLabel
Microsoft.CodeAnalysis.CSharp (48)
Binder\DecisionDagBuilder.cs (1)
151
foreach (
BoundSwitchLabel
label in section.SwitchLabels)
Binder\SwitchBinder_Patterns.cs (12)
42
ImmutableArray<BoundSwitchSection> switchSections = BindSwitchSections(originalBinder, diagnostics, out
BoundSwitchLabel
defaultLabel);
78
static bool isSubsumed(
BoundSwitchLabel
switchLabel, ImmutableHashSet<LabelSymbol> reachableLabels)
93
var labelBuilder = ArrayBuilder<
BoundSwitchLabel
>.GetInstance(oldSection.SwitchLabels.Length);
94
foreach (
var
label in oldSection.SwitchLabels)
96
var
newLabel = label;
148
BoundSwitchLabel
defaultLabel = null;
163
out
BoundSwitchLabel
defaultLabel)
183
ref
BoundSwitchLabel
defaultLabel,
187
var boundLabelsBuilder = ArrayBuilder<
BoundSwitchLabel
>.GetInstance(node.Labels.Count);
195
BoundSwitchLabel
boundLabel = BindSwitchSectionLabel(sectionBinder, labelSyntax, label, ref defaultLabel, diagnostics);
227
private
BoundSwitchLabel
BindSwitchSectionLabel(
231
ref
BoundSwitchLabel
defaultLabel,
BoundTree\BoundNode_Source.cs (2)
288
foreach (
var
label in section.SwitchLabels)
309
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)
3771
public BoundSwitchStatement(SyntaxNode syntax, BoundExpression expression, ImmutableArray<LocalSymbol> innerLocals, ImmutableArray<LocalFunctionSymbol> innerLocalFunctions, ImmutableArray<BoundSwitchSection> switchSections, BoundDecisionDag reachabilityDecisionDag,
BoundSwitchLabel
? defaultLabel, GeneratedLabelSymbol breakLabel, bool hasErrors = false)
3796
public
BoundSwitchLabel
? DefaultLabel { get; }
3802
public BoundSwitchStatement Update(BoundExpression expression, ImmutableArray<LocalSymbol> innerLocals, ImmutableArray<LocalFunctionSymbol> innerLocalFunctions, ImmutableArray<BoundSwitchSection> switchSections, BoundDecisionDag reachabilityDecisionDag,
BoundSwitchLabel
? defaultLabel, GeneratedLabelSymbol breakLabel)
5659
public BoundSwitchSection(SyntaxNode syntax, ImmutableArray<LocalSymbol> locals, ImmutableArray<
BoundSwitchLabel
> switchLabels, ImmutableArray<BoundStatement> statements, bool hasErrors = false)
5672
public ImmutableArray<
BoundSwitchLabel
> SwitchLabels { get; }
5677
public BoundSwitchSection Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<
BoundSwitchLabel
> switchLabels, ImmutableArray<BoundStatement> statements)
5710
public
BoundSwitchLabel
Update(LabelSymbol label, BoundPattern pattern, BoundExpression? whenClause)
5714
var
result = new BoundSwitchLabel(this.Syntax, label, pattern, whenClause, this.HasErrors);
9134
return VisitSwitchLabel((
BoundSwitchLabel
)node, arg);
9455
public virtual R VisitSwitchLabel(
BoundSwitchLabel
node, A arg) => this.DefaultVisit(node, arg);
9691
public virtual BoundNode? VisitSwitchLabel(
BoundSwitchLabel
node) => this.DefaultVisit(node);
10395
public override BoundNode? VisitSwitchLabel(
BoundSwitchLabel
node)
11353
BoundSwitchLabel
? defaultLabel = (
BoundSwitchLabel
?)this.Visit(node.DefaultLabel);
11656
ImmutableArray<
BoundSwitchLabel
> switchLabels = this.VisitList(node.SwitchLabels);
11660
public override BoundNode? VisitSwitchLabel(
BoundSwitchLabel
node)
13399
BoundSwitchLabel
? defaultLabel = (
BoundSwitchLabel
?)this.Visit(node.DefaultLabel);
13727
ImmutableArray<
BoundSwitchLabel
> switchLabels = this.VisitList(node.SwitchLabels);
16259
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)
249
return CreateBoundSwitchLabelOperation((
BoundSwitchLabel
)boundNode);
2697
ImmutableArray<ICaseClauseOperation> clauses = CreateFromArray<
BoundSwitchLabel
, ICaseClauseOperation>(boundSwitchSection.SwitchLabels);
2745
private ICaseClauseOperation CreateBoundSwitchLabelOperation(
BoundSwitchLabel
boundSwitchLabel)