1 write to Branch
Microsoft.CodeAnalysis.CSharp (1)
FlowAnalysis\AbstractFlowPass.cs (1)
405this.Branch = branch;
34 references to Branch
Microsoft.CodeAnalysis.CSharp (34)
FlowAnalysis\AbstractFlowPass.cs (3)
797NoteBranch(pending, pending.Branch, target); 1859if (pend.Branch == null) 1864if (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)
386LeaveParameters(methodParameters, returnBranch.Branch.Syntax, null); 387if ((object)methodThisParameter != null) LeaveParameter(methodThisParameter, returnBranch.Branch.Syntax, null); 421var pendingBranch = pending.Branch; 2449if (pending.Branch.Kind == BoundKind.ReturnStatement) 2452LeaveParameters(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 (4)
609enforceMemberNotNull(syntaxOpt: pendingReturn.Branch.Syntax, pendingReturn.State); 611if (pendingReturn.Branch is BoundReturnStatement returnStatement) 3300enforceMemberNotNull(syntax: pendingReturn.Branch?.Syntax, pendingReturn.State); 3303if (pendingReturn.Branch is BoundReturnStatement returnStatement)