1 write to Kind
Microsoft.CodeAnalysis (1)
Operations\ControlFlowRegion.cs (1)
74Kind = kind;
424 references to Kind
GenerateDocumentationAndConfigFiles (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316switch (currentRegion.Kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
367switch (outermostEnclosingRegionStartingBlock.Kind) 384switch (currentRegion.Kind)
ILLink.RoslynAnalyzer (17)
DataFlow\ControlFlowGraphProxy.cs (17)
38public RegionKind Kind => Region.Kind switch 131while (region != null && region.Kind != ControlFlowRegionKind.Root) 133if (region.Kind is ControlFlowRegionKind.Try or ControlFlowRegionKind.Catch or ControlFlowRegionKind.Filter) 149while (region != null && region.Kind != ControlFlowRegionKind.Root) 151if (region.Kind == ControlFlowRegionKind.Finally) 163if (catchOrFilterOrFinallyRegion.Region.Kind is not (ControlFlowRegionKind.Catch or ControlFlowRegionKind.Filter or ControlFlowRegionKind.Finally)) 171if (enclosingRegion.Kind == ControlFlowRegionKind.FilterAndHandler) 174Debug.Assert(enclosingRegion.Kind == ControlFlowRegionKind.TryAndCatch); 183if (nested.Kind == ControlFlowRegionKind.Try) 192if (region.Kind is not (ControlFlowRegionKind.Catch or ControlFlowRegionKind.Filter)) 196if (region.Kind is ControlFlowRegionKind.Catch && region.EnclosingRegion!.Kind is ControlFlowRegionKind.FilterAndHandler) 205switch (nested.Kind) 214if (filter.Kind == ControlFlowRegionKind.Filter) 233if (catchOrFilter.Kind == ControlFlowRegionKind.Filter) 241if (catchRegion.Region.Kind is not ControlFlowRegionKind.Catch) 244return catchRegion.Region.EnclosingRegion!.Kind == ControlFlowRegionKind.FilterAndHandler;
Metrics (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316switch (currentRegion.Kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
367switch (outermostEnclosingRegionStartingBlock.Kind) 384switch (currentRegion.Kind)
Metrics.Legacy (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316switch (currentRegion.Kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
367switch (outermostEnclosingRegionStartingBlock.Kind) 384switch (currentRegion.Kind)
Microsoft.CodeAnalysis (28)
Operations\ControlFlowBranch.cs (4)
88Debug.Assert(source.Kind != ControlFlowRegionKind.Root); 142if (leavingRegions[i].Kind == ControlFlowRegionKind.Try && leavingRegions[i + 1].Kind == ControlFlowRegionKind.TryAndFinally) 150Debug.Assert(builder.Last().Kind == ControlFlowRegionKind.Finally);
Operations\ControlFlowGraph.cs (1)
46Debug.Assert(root.Kind == ControlFlowRegionKind.Root);
Operations\ControlFlowGraphBuilder.cs (17)
349Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 352if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 355Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 372Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 407ControlFlowRegion? enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 408if (fromRegion.Kind == ControlFlowRegionKind.Try) 410switch (enclosing!.Kind) 414Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 428throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 431else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 434Debug.Assert(enclosing!.Kind == ControlFlowRegionKind.FilterAndHandler); 437Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 461Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 469switch (@catch.Kind) 477Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 484throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
Operations\ControlFlowRegion.cs (6)
86Debug.Assert(r.EnclosingRegion == null && r.Kind != ControlFlowRegionKind.Root); 97Debug.Assert(NestedRegions[0].Kind == (kind == ControlFlowRegionKind.TryAndFinally ? ControlFlowRegionKind.Try : ControlFlowRegionKind.Filter)); 98Debug.Assert(NestedRegions[1].Kind == (kind == ControlFlowRegionKind.TryAndFinally ? ControlFlowRegionKind.Finally : ControlFlowRegionKind.Catch)); 106Debug.Assert(NestedRegions[0].Kind == ControlFlowRegionKind.Try); 116Debug.Assert(r.Kind == ControlFlowRegionKind.FilterAndHandler || r.Kind == ControlFlowRegionKind.Catch);
Microsoft.CodeAnalysis.Analyzers (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316switch (currentRegion.Kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
367switch (outermostEnclosingRegionStartingBlock.Kind) 384switch (currentRegion.Kind)
Microsoft.CodeAnalysis.AnalyzerUtilities (47)
src\RoslynAnalyzers\Utilities\FlowAnalysis\Extensions\BasicBlockExtensions.cs (3)
63if (enclosingRegion.Kind == regionKind) 111if (enclosingRegion.Kind == regionKind) 152while (enclosingRegion.Kind != regionKind)
src\RoslynAnalyzers\Utilities\FlowAnalysis\Extensions\IOperationExtensions_FlowAnalysis.cs (1)
27switch (currentRegion.Kind)
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysis.cs (17)
230if (finallyRegion?.EnclosingRegion!.Kind == ControlFlowRegionKind.TryAndFinally) 234Debug.Assert(tryRegion.Kind == ControlFlowRegionKind.Try); 279Debug.Assert(enclosingTryAndCatchRegion.Kind == ControlFlowRegionKind.TryAndCatch); 280Debug.Assert(block.EnclosingRegion.Kind is ControlFlowRegionKind.Catch or ControlFlowRegionKind.Filter); 299if (block.EnclosingRegion?.Kind == ControlFlowRegionKind.Try && 300block.EnclosingRegion.EnclosingRegion?.Kind == ControlFlowRegionKind.TryAndCatch && 353Debug.Assert(finallyRegion.Kind == ControlFlowRegionKind.Finally); 493Debug.Assert(tryAndCatchRegion.Kind == ControlFlowRegionKind.TryAndCatch); 498var catchRegion = tryAndCatchRegion.NestedRegions.FirstOrDefault(region => region.Kind is ControlFlowRegionKind.Catch or ControlFlowRegionKind.FilterAndHandler); 597switch (block.EnclosingRegion.Kind) 600if (block.EnclosingRegion!.EnclosingRegion!.Kind == ControlFlowRegionKind.TryAndCatch) 608if (block.EnclosingRegion!.EnclosingRegion!.Kind == ControlFlowRegionKind.FilterAndHandler && 609block.EnclosingRegion.EnclosingRegion.EnclosingRegion?.Kind == ControlFlowRegionKind.TryAndCatch) 628Debug.Assert(basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Finally); 690if (region.Kind == ControlFlowRegionKind.TryAndCatch) 730Debug.Assert(finallyRegion.Kind == ControlFlowRegionKind.Finally); 811hasAnyTryBlock |= block.EnclosingRegion.Kind == ControlFlowRegionKind.Try;
src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\ThrownExceptionInfo.cs (3)
48if (enclosingRegion.Kind == ControlFlowRegionKind.TryAndCatch) 50Debug.Assert(enclosingRegion.NestedRegions[0].Kind == ControlFlowRegionKind.Try); 53if (nestedRegion.Kind == ControlFlowRegionKind.Catch &&
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316switch (currentRegion.Kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
367switch (outermostEnclosingRegionStartingBlock.Kind) 384switch (currentRegion.Kind)
Microsoft.CodeAnalysis.BannedApiAnalyzers (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316switch (currentRegion.Kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
367switch (outermostEnclosingRegionStartingBlock.Kind) 384switch (currentRegion.Kind)
Microsoft.CodeAnalysis.CodeStyle (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316switch (currentRegion.Kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
367switch (outermostEnclosingRegionStartingBlock.Kind) 384switch (currentRegion.Kind)
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316switch (currentRegion.Kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
367switch (outermostEnclosingRegionStartingBlock.Kind) 384switch (currentRegion.Kind)
Microsoft.CodeAnalysis.PublicApiAnalyzers (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316switch (currentRegion.Kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
367switch (outermostEnclosingRegionStartingBlock.Kind) 384switch (currentRegion.Kind)
Microsoft.CodeAnalysis.ResxSourceGenerator (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316switch (currentRegion.Kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
367switch (outermostEnclosingRegionStartingBlock.Kind) 384switch (currentRegion.Kind)
Microsoft.CodeAnalysis.Test.Utilities (33)
Compilation\ControlFlowGraphVerifier.cs (15)
151Assert.Equal(ControlFlowRegionKind.Root, currentRegion.Kind); 297Assert.True(block.EnclosingRegion.Kind == ControlFlowRegionKind.Filter || block.EnclosingRegion.Kind == ControlFlowRegionKind.Finally); 734while (region.Kind != ControlFlowRegionKind.Root) 736if (region.Kind == ControlFlowRegionKind.Try && region.EnclosingRegion.Kind == ControlFlowRegionKind.TryAndFinally) 738Debug.Assert(region.EnclosingRegion.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 1431switch (region.Kind) 1453switch (region.EnclosingRegion.Kind) 1463Assert.False(true, $"Unexpected region kind {region.EnclosingRegion.Kind}"); 1493Assert.False(true, $"Unexpected region kind {region.Kind}"); 1529switch (region.Kind) 1542switch (region.EnclosingRegion.Kind) 1549Assert.False(true, $"Unexpected region kind {region.EnclosingRegion.Kind}"); 1562Assert.False(true, $"Unexpected region kind {region.Kind}");
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
Microsoft.CodeAnalysis.Workspaces (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316switch (currentRegion.Kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
367switch (outermostEnclosingRegionStartingBlock.Kind) 384switch (currentRegion.Kind)
Roslyn.Diagnostics.Analyzers (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316switch (currentRegion.Kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
367switch (outermostEnclosingRegionStartingBlock.Kind) 384switch (currentRegion.Kind)
Test.Utilities (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316switch (currentRegion.Kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
367switch (outermostEnclosingRegionStartingBlock.Kind) 384switch (currentRegion.Kind)
Text.Analyzers (23)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316switch (currentRegion.Kind)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175if (current.EnclosingRegion.Kind == ControlFlowRegionKind.Finally && 257Debug.Assert(region.Kind != ControlFlowRegionKind.Root); 259if (region.Kind == ControlFlowRegionKind.Try && enclosing.Kind == ControlFlowRegionKind.TryAndFinally) 262Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 279Debug.Assert(@finally.Kind == ControlFlowRegionKind.Finally); 318var enclosing = fromRegion.Kind == ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion; 319if (fromRegion.Kind == ControlFlowRegionKind.Try) 321switch (enclosing.Kind) 325Debug.Assert(enclosing.NestedRegions[1].Kind == ControlFlowRegionKind.Finally); 341throw ExceptionUtilities.UnexpectedValue(enclosing.Kind); 344else if (fromRegion.Kind == ControlFlowRegionKind.Filter) 347Debug.Assert(enclosing.Kind == ControlFlowRegionKind.FilterAndHandler); 349Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 373Debug.Assert(tryAndCatch.Kind == ControlFlowRegionKind.TryAndCatch); 381switch (@catch.Kind) 389Debug.Assert(@catch.NestedRegions[0].Kind == ControlFlowRegionKind.Filter); 396throw ExceptionUtilities.UnexpectedValue(@catch.Kind);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169if (basicBlock.EnclosingRegion.Kind == ControlFlowRegionKind.Catch && 189if (region.Kind == ControlFlowRegionKind.TryAndFinally)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
367switch (outermostEnclosingRegionStartingBlock.Kind) 384switch (currentRegion.Kind)