2 instantiations of BoundSwitchSection
Microsoft.CodeAnalysis.CSharp (2)
Binder\SwitchBinder_Patterns.cs (1)
221
return new
BoundSwitchSection
(node, sectionBinder.GetDeclaredLocalsForScope(node), boundLabelsBuilder.ToImmutableAndFree(), boundStatementsBuilder.ToImmutableAndFree());
Generated\BoundNodes.xml.Generated.cs (1)
5749
var result = new
BoundSwitchSection
(this.Syntax, locals, switchLabels, statements, this.HasErrors);
51 references to BoundSwitchSection
Microsoft.CodeAnalysis.CSharp (51)
Binder\DecisionDagBuilder_CheckOrReachability.cs (6)
198
ImmutableArray<
BoundSwitchSection
> switchSections,
214
static bool shouldAnalyzeAny(CSharpCompilation compilation, ImmutableArray<
BoundSwitchSection
> switchSections)
216
foreach (
var
switchSection in switchSections)
234
ImmutableArray<
BoundSwitchSection
> switchSections,
243
foreach (
BoundSwitchSection
section in switchSections)
260
foreach (
BoundSwitchSection
section in switchSections)
Binder\DecisionDagBuilder.cs (3)
85
ImmutableArray<
BoundSwitchSection
> switchSections,
146
ImmutableArray<
BoundSwitchSection
> switchSections)
151
foreach (
BoundSwitchSection
section in switchSections)
Binder\RefSafetyAnalysis.cs (1)
476
public override BoundNode? VisitSwitchSection(
BoundSwitchSection
node)
Binder\SwitchBinder_Patterns.cs (8)
42
ImmutableArray<
BoundSwitchSection
> switchSections = BindSwitchSections(originalBinder, diagnostics, out BoundSwitchLabel defaultLabel);
78
ref ImmutableArray<
BoundSwitchSection
> switchSections,
96
var sectionBuilder = ArrayBuilder<
BoundSwitchSection
>.GetInstance(switchSections.Length);
98
foreach (
var
oldSection in switchSections)
170
private ImmutableArray<
BoundSwitchSection
> BindSwitchSections(
176
var boundSwitchSectionsBuilder = ArrayBuilder<
BoundSwitchSection
>.GetInstance(SwitchSyntax.Sections.Count);
180
BoundSwitchSection
section = BindSwitchSection(sectionSyntax, originalBinder, ref defaultLabel, diagnostics);
190
private
BoundSwitchSection
BindSwitchSection(
BoundTree\BoundNode_Source.cs (1)
274
foreach (
BoundSwitchSection
section in switchStatement.SwitchSections)
BoundTree\BoundNode.cs (1)
681
public override BoundNode? VisitSwitchSection(
BoundSwitchSection
node)
BoundTree\BoundStatementExtensions.cs (1)
43
foreach (var boundSwitchLabel in ((
BoundSwitchSection
)node).SwitchLabels)
FlowAnalysis\AbstractFlowPass_Switch.cs (2)
47
foreach (
var
section in node.SwitchSections)
120
protected virtual void VisitSwitchSection(
BoundSwitchSection
node, bool isLastSection)
FlowAnalysis\AbstractFlowPass.cs (2)
863
var
sec = (
BoundSwitchSection
)node;
FlowAnalysis\ControlFlowPass.cs (2)
391
protected override void VisitSwitchSection(
BoundSwitchSection
node, bool isLastSection)
406
foreach (
var
section in node.SwitchSections)
FlowAnalysis\DefiniteAssignment.cs (1)
2182
protected override void VisitSwitchSection(
BoundSwitchSection
node, bool isLastSection)
FlowAnalysis\NullableWalker_Patterns.cs (4)
283
foreach (
var
section in node.SwitchSections)
293
foreach (
var
section in node.SwitchSections)
304
foreach (
var
section in node.SwitchSections)
319
protected override void VisitSwitchSection(
BoundSwitchSection
node, bool isLastSection)
FlowAnalysis\VariablesDeclaredWalker.cs (1)
56
protected override void VisitSwitchSection(
BoundSwitchSection
node, bool isLastSection)
Generated\BoundNodes.xml.Generated.cs (14)
3811
public BoundSwitchStatement(SyntaxNode syntax, BoundExpression expression, ImmutableArray<LocalSymbol> innerLocals, ImmutableArray<MethodSymbol> innerLocalFunctions, ImmutableArray<
BoundSwitchSection
> switchSections, BoundDecisionDag reachabilityDecisionDag, BoundSwitchLabel? defaultLabel, LabelSymbol breakLabel, bool hasErrors = false)
3834
public ImmutableArray<
BoundSwitchSection
> SwitchSections { get; }
3842
public BoundSwitchStatement Update(BoundExpression expression, ImmutableArray<LocalSymbol> innerLocals, ImmutableArray<MethodSymbol> innerLocalFunctions, ImmutableArray<
BoundSwitchSection
> switchSections, BoundDecisionDag reachabilityDecisionDag, BoundSwitchLabel? defaultLabel, LabelSymbol breakLabel)
5745
public
BoundSwitchSection
Update(ImmutableArray<LocalSymbol> locals, ImmutableArray<BoundSwitchLabel> switchLabels, ImmutableArray<BoundStatement> statements)
5749
var
result = new BoundSwitchSection(this.Syntax, locals, switchLabels, statements, this.HasErrors);
9383
return VisitSwitchSection((
BoundSwitchSection
)node, arg);
9713
public virtual R VisitSwitchSection(
BoundSwitchSection
node, A arg) => this.DefaultVisit(node, arg);
9954
public virtual BoundNode? VisitSwitchSection(
BoundSwitchSection
node) => this.DefaultVisit(node);
10675
public override BoundNode? VisitSwitchSection(
BoundSwitchSection
node)
11727
ImmutableArray<
BoundSwitchSection
> switchSections = this.VisitList(node.SwitchSections);
12076
public override BoundNode? VisitSwitchSection(
BoundSwitchSection
node)
13899
ImmutableArray<
BoundSwitchSection
> switchSections = this.VisitList(node.SwitchSections);
14225
public override BoundNode? VisitSwitchSection(
BoundSwitchSection
node)
16794
public override TreeDumperNode VisitSwitchSection(
BoundSwitchSection
node, object? arg) => new TreeDumperNode("switchSection", null, new TreeDumperNode[]
Lowering\LocalRewriter\LocalRewriter_PatternSwitchStatement.cs (1)
136
foreach (
BoundSwitchSection
section in node.SwitchSections)
Operations\CSharpOperationFactory.cs (3)
270
return CreateBoundSwitchSectionOperation((
BoundSwitchSection
)boundNode);
2753
ImmutableArray<ISwitchCaseOperation> cases = CreateFromArray<
BoundSwitchSection
, ISwitchCaseOperation>(boundSwitchStatement.SwitchSections);
2761
private ISwitchCaseOperation CreateBoundSwitchSectionOperation(
BoundSwitchSection
boundSwitchSection)