1 write to Branch
Microsoft.CodeAnalysis.CSharp (1)
FlowAnalysis\AbstractFlowPass.cs (1)
406this.Branch = branch;
33 references to Branch
Microsoft.CodeAnalysis.CSharp (33)
FlowAnalysis\AbstractFlowPass.cs (3)
790NoteBranch(pending, pending.Branch, target); 1718if (pend.Branch == null) 1723if (pend.Branch.Kind != BoundKind.YieldReturnStatement)
FlowAnalysis\AbstractFlowPass_LocalFunctions.cs (1)
123BoundNode branch = pending.Branch;
FlowAnalysis\AlwaysAssignedWalker.cs (4)
84if (IsInside && pending.Branch != null && !RegionContains(pending.Branch.Syntax.Span)) 136if (branch.Branch != null && RegionContains(branch.Branch.Syntax.Span) && !_labelsInside.Contains(branch.Label))
FlowAnalysis\ControlFlowPass.cs (8)
209if (pending.Branch is null) 214switch (pending.Branch.Kind) 218var leave = pending.Branch; 220Diagnostics.Add(ErrorCode.ERR_LabelNotFound, loc, ((BoundGotoStatement)pending.Branch).Label.Name); 226var leave = pending.Branch; 302if (branch.Branch == null) continue; // a tracked exception 303var location = new SourceLocation(branch.Branch.Syntax.GetFirstToken()); 304switch (branch.Branch.Kind)
FlowAnalysis\DefiniteAssignment.cs (5)
387LeaveParameters(methodParameters, returnBranch.Branch.Syntax, null); 388if ((object)methodThisParameter != null) LeaveParameter(methodThisParameter, returnBranch.Branch.Syntax, null); 422var pendingBranch = pending.Branch; 2285if (pending.Branch.Kind == BoundKind.ReturnStatement) 2288LeaveParameters(node.Symbol.Parameters, pending.Branch.Syntax, null);
FlowAnalysis\ExitPointsWalker.cs (9)
124if (pending.Branch == null || !RegionContains(pending.Branch.Syntax.Span)) continue; 125switch (pending.Branch.Kind) 128if (_labelsInside.Contains(((BoundGotoStatement)pending.Branch).Label)) continue; 131if (_labelsInside.Contains(((BoundBreakStatement)pending.Branch).Label)) continue; 134if (_labelsInside.Contains(((BoundContinueStatement)pending.Branch).Label)) continue; 143case BoundKind.ForEachStatement when ((BoundForEachStatement)pending.Branch).AwaitOpt != null: 148throw ExceptionUtilities.UnexpectedValue(pending.Branch.Kind); 150_branchesOutOf.Add((StatementSyntax)pending.Branch.Syntax);
FlowAnalysis\NullableWalker.cs (3)
576enforceMemberNotNull(syntaxOpt: pendingReturn.Branch.Syntax, pendingReturn.State); 578if (pendingReturn.Branch is BoundReturnStatement returnStatement) 3121if (pendingReturn.Branch is BoundReturnStatement returnStatement)