2 writes to EnclosingRegion
Microsoft.CodeAnalysis (2)
Operations\ControlFlowRegion.cs (2)
82EnclosingRegion = enclosingRegion; 87r.EnclosingRegion = this;
60 references to EnclosingRegion
ILLink.RoslynAnalyzer (8)
DataFlow\ControlFlowGraphProxy.cs (8)
117 return TryGetTryOrCatchOrFilter (regionProxy.Region.EnclosingRegion, out tryOrCatchOrFilterRegion); 130 region = region.EnclosingRegion; 146 region = region.EnclosingRegion; 159 var enclosingRegion = catchOrFilterOrFinallyRegion.Region.EnclosingRegion!; 162 enclosingRegion = enclosingRegion.EnclosingRegion!; 184 if (region.Kind is ControlFlowRegionKind.Catch && region.EnclosingRegion!.Kind is ControlFlowRegionKind.FilterAndHandler) 190 foreach (var nested in tryRegion.Region.EnclosingRegion!.NestedRegions) { 228 return catchRegion.Region.EnclosingRegion!.Kind == ControlFlowRegionKind.FilterAndHandler;
Microsoft.CodeAnalysis (8)
Operations\ControlFlowBranch.cs (2)
89Debug.Assert(source.EnclosingRegion != null); 91source = source.EnclosingRegion;
Operations\ControlFlowGraphBuilder.cs (5)
350Debug.Assert(region.EnclosingRegion != null); 351ControlFlowRegion enclosing = region.EnclosingRegion; 407ControlFlowRegion? enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 435Debug.Assert(enclosing.EnclosingRegion != null); 436ControlFlowRegion tryAndCatch = enclosing.EnclosingRegion;
Operations\ControlFlowRegion.cs (1)
86Debug.Assert(r.EnclosingRegion == null && r.Kind != ControlFlowRegionKind.Root);
Microsoft.CodeAnalysis.CodeStyle (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
320currentRegion = currentRegion.EnclosingRegion;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (3)
259var enclosing = region.EnclosingRegion; 319var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 349var tryAndCatch = enclosing.EnclosingRegion;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (3)
362while (outermostEnclosingRegionStartingBlock.EnclosingRegion?.FirstBlockOrdinal == basicBlock.Ordinal) 364outermostEnclosingRegionStartingBlock = outermostEnclosingRegionStartingBlock.EnclosingRegion; 393currentRegion = currentRegion.EnclosingRegion;
Microsoft.CodeAnalysis.Test.Utilities (30)
Compilation\ControlFlowGraphVerifier.cs (27)
146Assert.Same(enclosing, currentRegion.EnclosingRegion); 467region = region.EnclosingRegion; 736if (region.Kind == ControlFlowRegionKind.Try && region.EnclosingRegion.Kind == ControlFlowRegionKind.TryAndFinally) 738Debug.Assert(region.EnclosingRegion.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 739adjustAndGetEntryState(entryStates, blocks[region.EnclosingRegion.NestedRegions[1].FirstBlockOrdinal], state); 742region = region.EnclosingRegion; 801if (block.EnclosingRegion.EnclosingRegion.CaptureIds.Contains(id)) 813else if (block.EnclosingRegion.EnclosingRegion?.EnclosingRegion.CaptureIds.Contains(id) ?? false) 1023ControlFlowRegion region = graph.Root.EnclosingRegion; 1032region = region.EnclosingRegion; 1427enterRegions(region.EnclosingRegion, firstBlockOrdinal); 1436Assert.Equal(firstBlockOrdinal, region.EnclosingRegion.FirstBlockOrdinal); 1437Assert.Same(region.ExceptionType, region.EnclosingRegion.ExceptionType); 1442Assert.Equal(firstBlockOrdinal, region.EnclosingRegion.FirstBlockOrdinal); 1443enterRegion($".try {{{getRegionId(region.EnclosingRegion)}, {getRegionId(region)}}}"); 1453switch (region.EnclosingRegion.Kind) 1456Assert.Same(region.ExceptionType, region.EnclosingRegion.ExceptionType); 1463Assert.False(true, $"Unexpected region kind {region.EnclosingRegion.Kind}"); 1542switch (region.EnclosingRegion.Kind) 1549Assert.False(true, $"Unexpected region kind {region.EnclosingRegion.Kind}"); 1566leaveRegions(region.EnclosingRegion, lastBlockOrdinal); 1597remainedIn1 = r.EnclosingRegion; 1609remainedIn2 = r.EnclosingRegion; 1613Assert.Same(remainedIn1.EnclosingRegion, remainedIn2.EnclosingRegion); 1680region = region.EnclosingRegion;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (3)
259var enclosing = region.EnclosingRegion; 319var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 349var tryAndCatch = enclosing.EnclosingRegion;
Microsoft.CodeAnalysis.Workspaces (7)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
320currentRegion = currentRegion.EnclosingRegion;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (3)
259var enclosing = region.EnclosingRegion; 319var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 349var tryAndCatch = enclosing.EnclosingRegion;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (3)
362while (outermostEnclosingRegionStartingBlock.EnclosingRegion?.FirstBlockOrdinal == basicBlock.Ordinal) 364outermostEnclosingRegionStartingBlock = outermostEnclosingRegionStartingBlock.EnclosingRegion; 393currentRegion = currentRegion.EnclosingRegion;