1 write to Kind
Microsoft.CodeAnalysis (1)
Operations\ControlFlowRegion.cs (1)
74
Kind
= kind;
230 references to Kind
GenerateDocumentationAndConfigFiles (23)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316
switch (currentRegion.
Kind
)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175
if (current.EnclosingRegion.
Kind
== ControlFlowRegionKind.Finally &&
258
Debug.Assert(region.
Kind
!= ControlFlowRegionKind.Root);
260
if (region.
Kind
== ControlFlowRegionKind.Try && enclosing.
Kind
== ControlFlowRegionKind.TryAndFinally)
263
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
280
Debug.Assert(@finally.
Kind
== ControlFlowRegionKind.Finally);
319
var enclosing = fromRegion.
Kind
== ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion;
320
if (fromRegion.
Kind
== ControlFlowRegionKind.Try)
322
switch (enclosing.
Kind
)
326
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
342
throw ExceptionUtilities.UnexpectedValue(enclosing.
Kind
);
345
else if (fromRegion.
Kind
== ControlFlowRegionKind.Filter)
348
Debug.Assert(enclosing.
Kind
== ControlFlowRegionKind.FilterAndHandler);
350
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
374
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
382
switch (@catch.
Kind
)
390
Debug.Assert(@catch.NestedRegions[0].
Kind
== ControlFlowRegionKind.Filter);
397
throw ExceptionUtilities.UnexpectedValue(@catch.
Kind
);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169
if (basicBlock.EnclosingRegion.
Kind
== ControlFlowRegionKind.Catch &&
189
if (region.
Kind
== ControlFlowRegionKind.TryAndFinally)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
383
switch (outermostEnclosingRegionStartingBlock.
Kind
)
400
switch (currentRegion.
Kind
)
ILLink.RoslynAnalyzer (17)
DataFlow\ControlFlowGraphProxy.cs (17)
38
public RegionKind Kind => Region.
Kind
switch
131
while (region != null && region.
Kind
!= ControlFlowRegionKind.Root)
133
if (region.
Kind
is ControlFlowRegionKind.Try or ControlFlowRegionKind.Catch or ControlFlowRegionKind.Filter)
149
while (region != null && region.
Kind
!= ControlFlowRegionKind.Root)
151
if (region.
Kind
== ControlFlowRegionKind.Finally)
163
if (catchOrFilterOrFinallyRegion.Region.
Kind
is not (ControlFlowRegionKind.Catch or ControlFlowRegionKind.Filter or ControlFlowRegionKind.Finally))
171
if (enclosingRegion.
Kind
== ControlFlowRegionKind.FilterAndHandler)
174
Debug.Assert(enclosingRegion.
Kind
== ControlFlowRegionKind.TryAndCatch);
183
if (nested.
Kind
== ControlFlowRegionKind.Try)
192
if (region.
Kind
is not (ControlFlowRegionKind.Catch or ControlFlowRegionKind.Filter))
196
if (region.
Kind
is ControlFlowRegionKind.Catch && region.EnclosingRegion!.
Kind
is ControlFlowRegionKind.FilterAndHandler)
205
switch (nested.
Kind
)
214
if (filter.
Kind
== ControlFlowRegionKind.Filter)
233
if (catchOrFilter.
Kind
== ControlFlowRegionKind.Filter)
241
if (catchRegion.Region.
Kind
is not ControlFlowRegionKind.Catch)
244
return catchRegion.Region.EnclosingRegion!.
Kind
== ControlFlowRegionKind.FilterAndHandler;
Microsoft.CodeAnalysis (28)
Operations\ControlFlowBranch.cs (4)
88
Debug.Assert(source.
Kind
!= ControlFlowRegionKind.Root);
142
if (leavingRegions[i].
Kind
== ControlFlowRegionKind.Try && leavingRegions[i + 1].
Kind
== ControlFlowRegionKind.TryAndFinally)
150
Debug.Assert(builder.Last().
Kind
== ControlFlowRegionKind.Finally);
Operations\ControlFlowGraph.cs (1)
46
Debug.Assert(root.
Kind
== ControlFlowRegionKind.Root);
Operations\ControlFlowGraphBuilder.cs (17)
357
Debug.Assert(region.
Kind
!= ControlFlowRegionKind.Root);
360
if (region.
Kind
== ControlFlowRegionKind.Try && enclosing.
Kind
== ControlFlowRegionKind.TryAndFinally)
363
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
380
Debug.Assert(@finally.
Kind
== ControlFlowRegionKind.Finally);
415
ControlFlowRegion? enclosing = fromRegion.
Kind
== ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion;
416
if (fromRegion.
Kind
== ControlFlowRegionKind.Try)
418
switch (enclosing!.
Kind
)
422
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
436
throw ExceptionUtilities.UnexpectedValue(enclosing.
Kind
);
439
else if (fromRegion.
Kind
== ControlFlowRegionKind.Filter)
442
Debug.Assert(enclosing!.
Kind
== ControlFlowRegionKind.FilterAndHandler);
445
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
469
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
477
switch (@catch.
Kind
)
485
Debug.Assert(@catch.NestedRegions[0].
Kind
== ControlFlowRegionKind.Filter);
492
throw ExceptionUtilities.UnexpectedValue(@catch.
Kind
);
Operations\ControlFlowRegion.cs (6)
86
Debug.Assert(r.EnclosingRegion == null && r.
Kind
!= ControlFlowRegionKind.Root);
97
Debug.Assert(NestedRegions[0].
Kind
== (kind == ControlFlowRegionKind.TryAndFinally ? ControlFlowRegionKind.Try : ControlFlowRegionKind.Filter));
98
Debug.Assert(NestedRegions[1].
Kind
== (kind == ControlFlowRegionKind.TryAndFinally ? ControlFlowRegionKind.Finally : ControlFlowRegionKind.Catch));
106
Debug.Assert(NestedRegions[0].
Kind
== ControlFlowRegionKind.Try);
116
Debug.Assert(r.
Kind
== ControlFlowRegionKind.FilterAndHandler || r.
Kind
== ControlFlowRegionKind.Catch);
Microsoft.CodeAnalysis.Analyzers (23)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316
switch (currentRegion.
Kind
)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175
if (current.EnclosingRegion.
Kind
== ControlFlowRegionKind.Finally &&
258
Debug.Assert(region.
Kind
!= ControlFlowRegionKind.Root);
260
if (region.
Kind
== ControlFlowRegionKind.Try && enclosing.
Kind
== ControlFlowRegionKind.TryAndFinally)
263
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
280
Debug.Assert(@finally.
Kind
== ControlFlowRegionKind.Finally);
319
var enclosing = fromRegion.
Kind
== ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion;
320
if (fromRegion.
Kind
== ControlFlowRegionKind.Try)
322
switch (enclosing.
Kind
)
326
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
342
throw ExceptionUtilities.UnexpectedValue(enclosing.
Kind
);
345
else if (fromRegion.
Kind
== ControlFlowRegionKind.Filter)
348
Debug.Assert(enclosing.
Kind
== ControlFlowRegionKind.FilterAndHandler);
350
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
374
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
382
switch (@catch.
Kind
)
390
Debug.Assert(@catch.NestedRegions[0].
Kind
== ControlFlowRegionKind.Filter);
397
throw ExceptionUtilities.UnexpectedValue(@catch.
Kind
);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169
if (basicBlock.EnclosingRegion.
Kind
== ControlFlowRegionKind.Catch &&
189
if (region.
Kind
== ControlFlowRegionKind.TryAndFinally)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
383
switch (outermostEnclosingRegionStartingBlock.
Kind
)
400
switch (currentRegion.
Kind
)
Microsoft.CodeAnalysis.AnalyzerUtilities (47)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\Extensions\BasicBlockExtensions.cs (3)
63
if (enclosingRegion.
Kind
== regionKind)
111
if (enclosingRegion.
Kind
== regionKind)
152
while (enclosingRegion.
Kind
!= regionKind)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\Extensions\IOperationExtensions_FlowAnalysis.cs (1)
27
switch (currentRegion.
Kind
)
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\DataFlowAnalysis.cs (17)
229
if (finallyRegion?.EnclosingRegion!.
Kind
== ControlFlowRegionKind.TryAndFinally)
233
Debug.Assert(tryRegion.
Kind
== ControlFlowRegionKind.Try);
278
Debug.Assert(enclosingTryAndCatchRegion.
Kind
== ControlFlowRegionKind.TryAndCatch);
279
Debug.Assert(block.EnclosingRegion.
Kind
is ControlFlowRegionKind.Catch or ControlFlowRegionKind.Filter);
298
if (block.EnclosingRegion?.
Kind
== ControlFlowRegionKind.Try &&
299
block.EnclosingRegion.EnclosingRegion?.
Kind
== ControlFlowRegionKind.TryAndCatch &&
352
Debug.Assert(finallyRegion.
Kind
== ControlFlowRegionKind.Finally);
492
Debug.Assert(tryAndCatchRegion.
Kind
== ControlFlowRegionKind.TryAndCatch);
497
var catchRegion = tryAndCatchRegion.NestedRegions.FirstOrDefault(region => region.
Kind
is ControlFlowRegionKind.Catch or ControlFlowRegionKind.FilterAndHandler);
596
switch (block.EnclosingRegion.
Kind
)
599
if (block.EnclosingRegion!.EnclosingRegion!.
Kind
== ControlFlowRegionKind.TryAndCatch)
607
if (block.EnclosingRegion!.EnclosingRegion!.
Kind
== ControlFlowRegionKind.FilterAndHandler &&
608
block.EnclosingRegion.EnclosingRegion.EnclosingRegion?.
Kind
== ControlFlowRegionKind.TryAndCatch)
627
Debug.Assert(basicBlock.EnclosingRegion.
Kind
== ControlFlowRegionKind.Finally);
689
if (region.
Kind
== ControlFlowRegionKind.TryAndCatch)
729
Debug.Assert(finallyRegion.
Kind
== ControlFlowRegionKind.Finally);
810
hasAnyTryBlock |= block.EnclosingRegion.
Kind
== ControlFlowRegionKind.Try;
src\roslyn\src\RoslynAnalyzers\Utilities\FlowAnalysis\FlowAnalysis\Framework\DataFlow\ThrownExceptionInfo.cs (3)
48
if (enclosingRegion.
Kind
== ControlFlowRegionKind.TryAndCatch)
50
Debug.Assert(enclosingRegion.NestedRegions[0].
Kind
== ControlFlowRegionKind.Try);
53
if (nestedRegion.
Kind
== ControlFlowRegionKind.Catch &&
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316
switch (currentRegion.
Kind
)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175
if (current.EnclosingRegion.
Kind
== ControlFlowRegionKind.Finally &&
258
Debug.Assert(region.
Kind
!= ControlFlowRegionKind.Root);
260
if (region.
Kind
== ControlFlowRegionKind.Try && enclosing.
Kind
== ControlFlowRegionKind.TryAndFinally)
263
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
280
Debug.Assert(@finally.
Kind
== ControlFlowRegionKind.Finally);
319
var enclosing = fromRegion.
Kind
== ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion;
320
if (fromRegion.
Kind
== ControlFlowRegionKind.Try)
322
switch (enclosing.
Kind
)
326
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
342
throw ExceptionUtilities.UnexpectedValue(enclosing.
Kind
);
345
else if (fromRegion.
Kind
== ControlFlowRegionKind.Filter)
348
Debug.Assert(enclosing.
Kind
== ControlFlowRegionKind.FilterAndHandler);
350
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
374
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
382
switch (@catch.
Kind
)
390
Debug.Assert(@catch.NestedRegions[0].
Kind
== ControlFlowRegionKind.Filter);
397
throw ExceptionUtilities.UnexpectedValue(@catch.
Kind
);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169
if (basicBlock.EnclosingRegion.
Kind
== ControlFlowRegionKind.Catch &&
189
if (region.
Kind
== ControlFlowRegionKind.TryAndFinally)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
383
switch (outermostEnclosingRegionStartingBlock.
Kind
)
400
switch (currentRegion.
Kind
)
Microsoft.CodeAnalysis.CodeStyle (23)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316
switch (currentRegion.
Kind
)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175
if (current.EnclosingRegion.
Kind
== ControlFlowRegionKind.Finally &&
258
Debug.Assert(region.
Kind
!= ControlFlowRegionKind.Root);
260
if (region.
Kind
== ControlFlowRegionKind.Try && enclosing.
Kind
== ControlFlowRegionKind.TryAndFinally)
263
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
280
Debug.Assert(@finally.
Kind
== ControlFlowRegionKind.Finally);
319
var enclosing = fromRegion.
Kind
== ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion;
320
if (fromRegion.
Kind
== ControlFlowRegionKind.Try)
322
switch (enclosing.
Kind
)
326
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
342
throw ExceptionUtilities.UnexpectedValue(enclosing.
Kind
);
345
else if (fromRegion.
Kind
== ControlFlowRegionKind.Filter)
348
Debug.Assert(enclosing.
Kind
== ControlFlowRegionKind.FilterAndHandler);
350
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
374
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
382
switch (@catch.
Kind
)
390
Debug.Assert(@catch.NestedRegions[0].
Kind
== ControlFlowRegionKind.Filter);
397
throw ExceptionUtilities.UnexpectedValue(@catch.
Kind
);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169
if (basicBlock.EnclosingRegion.
Kind
== ControlFlowRegionKind.Catch &&
189
if (region.
Kind
== ControlFlowRegionKind.TryAndFinally)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
383
switch (outermostEnclosingRegionStartingBlock.
Kind
)
400
switch (currentRegion.
Kind
)
Microsoft.CodeAnalysis.ResxSourceGenerator (23)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316
switch (currentRegion.
Kind
)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175
if (current.EnclosingRegion.
Kind
== ControlFlowRegionKind.Finally &&
258
Debug.Assert(region.
Kind
!= ControlFlowRegionKind.Root);
260
if (region.
Kind
== ControlFlowRegionKind.Try && enclosing.
Kind
== ControlFlowRegionKind.TryAndFinally)
263
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
280
Debug.Assert(@finally.
Kind
== ControlFlowRegionKind.Finally);
319
var enclosing = fromRegion.
Kind
== ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion;
320
if (fromRegion.
Kind
== ControlFlowRegionKind.Try)
322
switch (enclosing.
Kind
)
326
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
342
throw ExceptionUtilities.UnexpectedValue(enclosing.
Kind
);
345
else if (fromRegion.
Kind
== ControlFlowRegionKind.Filter)
348
Debug.Assert(enclosing.
Kind
== ControlFlowRegionKind.FilterAndHandler);
350
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
374
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
382
switch (@catch.
Kind
)
390
Debug.Assert(@catch.NestedRegions[0].
Kind
== ControlFlowRegionKind.Filter);
397
throw ExceptionUtilities.UnexpectedValue(@catch.
Kind
);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169
if (basicBlock.EnclosingRegion.
Kind
== ControlFlowRegionKind.Catch &&
189
if (region.
Kind
== ControlFlowRegionKind.TryAndFinally)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
383
switch (outermostEnclosingRegionStartingBlock.
Kind
)
400
switch (currentRegion.
Kind
)
Microsoft.CodeAnalysis.Workspaces (23)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316
switch (currentRegion.
Kind
)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175
if (current.EnclosingRegion.
Kind
== ControlFlowRegionKind.Finally &&
258
Debug.Assert(region.
Kind
!= ControlFlowRegionKind.Root);
260
if (region.
Kind
== ControlFlowRegionKind.Try && enclosing.
Kind
== ControlFlowRegionKind.TryAndFinally)
263
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
280
Debug.Assert(@finally.
Kind
== ControlFlowRegionKind.Finally);
319
var enclosing = fromRegion.
Kind
== ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion;
320
if (fromRegion.
Kind
== ControlFlowRegionKind.Try)
322
switch (enclosing.
Kind
)
326
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
342
throw ExceptionUtilities.UnexpectedValue(enclosing.
Kind
);
345
else if (fromRegion.
Kind
== ControlFlowRegionKind.Filter)
348
Debug.Assert(enclosing.
Kind
== ControlFlowRegionKind.FilterAndHandler);
350
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
374
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
382
switch (@catch.
Kind
)
390
Debug.Assert(@catch.NestedRegions[0].
Kind
== ControlFlowRegionKind.Filter);
397
throw ExceptionUtilities.UnexpectedValue(@catch.
Kind
);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169
if (basicBlock.EnclosingRegion.
Kind
== ControlFlowRegionKind.Catch &&
189
if (region.
Kind
== ControlFlowRegionKind.TryAndFinally)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
383
switch (outermostEnclosingRegionStartingBlock.
Kind
)
400
switch (currentRegion.
Kind
)
Roslyn.Diagnostics.Analyzers (23)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\OperationExtensions.cs (1)
316
switch (currentRegion.
Kind
)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\CustomDataFlowAnalysis.cs (18)
175
if (current.EnclosingRegion.
Kind
== ControlFlowRegionKind.Finally &&
258
Debug.Assert(region.
Kind
!= ControlFlowRegionKind.Root);
260
if (region.
Kind
== ControlFlowRegionKind.Try && enclosing.
Kind
== ControlFlowRegionKind.TryAndFinally)
263
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
280
Debug.Assert(@finally.
Kind
== ControlFlowRegionKind.Finally);
319
var enclosing = fromRegion.
Kind
== ControlFlowRegionKind.Root ? null : fromRegion.EnclosingRegion;
320
if (fromRegion.
Kind
== ControlFlowRegionKind.Try)
322
switch (enclosing.
Kind
)
326
Debug.Assert(enclosing.NestedRegions[1].
Kind
== ControlFlowRegionKind.Finally);
342
throw ExceptionUtilities.UnexpectedValue(enclosing.
Kind
);
345
else if (fromRegion.
Kind
== ControlFlowRegionKind.Filter)
348
Debug.Assert(enclosing.
Kind
== ControlFlowRegionKind.FilterAndHandler);
350
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
374
Debug.Assert(tryAndCatch.
Kind
== ControlFlowRegionKind.TryAndCatch);
382
switch (@catch.
Kind
)
390
Debug.Assert(@catch.NestedRegions[0].
Kind
== ControlFlowRegionKind.Filter);
397
throw ExceptionUtilities.UnexpectedValue(@catch.
Kind
);
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.cs (2)
169
if (basicBlock.EnclosingRegion.
Kind
== ControlFlowRegionKind.Catch &&
189
if (region.
Kind
== ControlFlowRegionKind.TryAndFinally)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\FlowAnalysis\SymbolUsageAnalysis\SymbolUsageAnalysis.DataFlowAnalyzer.FlowGraphAnalysisData.cs (2)
383
switch (outermostEnclosingRegionStartingBlock.
Kind
)
400
switch (currentRegion.
Kind
)