94 references to ReturnStatement
Microsoft.CodeAnalysis.CSharp (11)
Binder\Binder_Statements.cs (2)
100case SyntaxKind.ReturnStatement: 336case SyntaxKind.ReturnStatement:
Binder\ExpressionVariableFinder.cs (1)
42case SyntaxKind.ReturnStatement:
Binder\LocalBinderFactory.cs (1)
1051case SyntaxKind.ReturnStatement:
Binder\LocalScopeBinder.cs (1)
263case SyntaxKind.ReturnStatement:
Compilation\CSharpCompilation.cs (1)
787if (root.DescendantNodes(n => n is GlobalStatementSyntax || n is StatementSyntax || n is CompilationUnitSyntax).Any(n => n.IsKind(SyntaxKind.ReturnStatement)))
FlowAnalysis\ControlFlowAnalysis.cs (1)
131return ExitPoints.WhereAsArray(s => s.IsKind(SyntaxKind.ReturnStatement) || s.IsKind(SyntaxKind.YieldBreakStatement));
Symbols\Source\SourceMemberContainerSymbol.cs (1)
5230case SyntaxKind.ReturnStatement:
Syntax\LambdaUtilities.cs (1)
412case SyntaxKind.ReturnStatement:
Syntax\LookupPosition.cs (2)
348case SyntaxKind.ReturnStatement: 411case SyntaxKind.ReturnStatement:
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (2)
214return nextStatement is (kind: SyntaxKind.ThrowStatement or SyntaxKind.ReturnStatement) 280: SyntaxKind.ReturnStatement;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
572case SyntaxKind.ReturnStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
152public int ReturnStatement => (int)SyntaxKind.ReturnStatement;
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (5)
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
110Debug.Assert(nextStatement.Kind() is SyntaxKind.ThrowStatement or SyntaxKind.ReturnStatement);
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (2)
73case SyntaxKind.ReturnStatement: 234if (nextStatement is (kind: SyntaxKind.ThrowStatement or SyntaxKind.ReturnStatement))
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
219node = ancestors.FirstOrDefault(n => n.Span.Contains(span) && n != root && n.IsKind(SyntaxKind.ReturnStatement));
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
117if (node.Parent is (kind: SyntaxKind.ReturnStatement or SyntaxKind.YieldReturnStatement))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
CompleteStatement\CompleteStatementCommandHandler.cs (1)
382case SyntaxKind.ReturnStatement:
Microsoft.CodeAnalysis.CSharp.Features (16)
ConvertLinq\CSharpConvertLinqQueryToForEachProvider.cs (2)
228case SyntaxKind.ReturnStatement: 496case SyntaxKind.ReturnStatement:
EditAndContinue\BreakpointSpans.cs (1)
754case SyntaxKind.ReturnStatement:
EditAndContinue\SyntaxComparer.cs (1)
359case SyntaxKind.ReturnStatement:
ExtractMethod\CSharpMethodExtractor.CSharpCodeGenerator.cs (1)
555return statements[index + 1].Kind() == SyntaxKind.ReturnStatement;
InvertIf\CSharpInvertIfCodeRefactoringProvider.cs (3)
99=> node.ContainsYield() ? SyntaxKind.YieldBreakStatement : SyntaxKind.ReturnStatement, 101=> SyntaxKind.ReturnStatement, 112SyntaxKind.ReturnStatement => ReturnStatement(),
src\Analyzers\CSharp\Analyzers\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionDiagnosticAnalyzer.Analyzer.cs (2)
214return nextStatement is (kind: SyntaxKind.ThrowStatement or SyntaxKind.ReturnStatement) 280: SyntaxKind.ReturnStatement;
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.cs (1)
110Debug.Assert(nextStatement.Kind() is SyntaxKind.ThrowStatement or SyntaxKind.ReturnStatement);
src\Analyzers\CSharp\CodeFixes\ConvertSwitchStatementToExpression\ConvertSwitchStatementToExpressionCodeFixProvider.Rewriter.cs (2)
73case SyntaxKind.ReturnStatement: 234if (nextStatement is (kind: SyntaxKind.ThrowStatement or SyntaxKind.ReturnStatement))
src\Analyzers\CSharp\CodeFixes\Iterator\CSharpAddYieldCodeFixProvider.cs (1)
219node = ancestors.FirstOrDefault(n => n.Span.Contains(span) && n != root && n.IsKind(SyntaxKind.ReturnStatement));
src\Analyzers\CSharp\CodeFixes\Nullable\CSharpDeclareAsNullableCodeFixProvider.cs (1)
117if (node.Parent is (kind: SyntaxKind.ReturnStatement or SyntaxKind.YieldReturnStatement))
src\Compilers\CSharp\Portable\Syntax\LambdaUtilities.cs (1)
412case SyntaxKind.ReturnStatement:
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (52)
Parsing\CollectionExpressionParsingTests.cs (2)
276N(SyntaxKind.ReturnStatement); 541N(SyntaxKind.ReturnStatement);
Parsing\DeclarationParsingTests.cs (2)
6302N(SyntaxKind.ReturnStatement); 8245N(SyntaxKind.ReturnStatement);
Parsing\FieldKeywordParsingTests.cs (3)
241N(SyntaxKind.ReturnStatement); 496N(SyntaxKind.ReturnStatement); 2178N(SyntaxKind.ReturnStatement);
Parsing\LambdaParameterParsingTests.cs (7)
2401N(SyntaxKind.ReturnStatement); 2814N(SyntaxKind.ReturnStatement); 2929N(SyntaxKind.ReturnStatement); 3255N(SyntaxKind.ReturnStatement); 3376N(SyntaxKind.ReturnStatement); 3549N(SyntaxKind.ReturnStatement); 4009N(SyntaxKind.ReturnStatement);
Parsing\LambdaReturnTypeParsingTests.cs (3)
106N(SyntaxKind.ReturnStatement); 3060N(SyntaxKind.ReturnStatement); 3100N(SyntaxKind.ReturnStatement);
Parsing\LocalFunctionParsingTests.cs (1)
2783N(SyntaxKind.ReturnStatement);
Parsing\MemberDeclarationParsingTests.cs (2)
8142N(SyntaxKind.ReturnStatement); 12530N(SyntaxKind.ReturnStatement);
Parsing\ParsingErrorRecoveryTests.cs (3)
5529N(SyntaxKind.ReturnStatement); 5642N(SyntaxKind.ReturnStatement); 5770N(SyntaxKind.ReturnStatement);
Parsing\StatementAttributeParsingTests.cs (5)
535N(SyntaxKind.ReturnStatement); 2365N(SyntaxKind.ReturnStatement); 2490N(SyntaxKind.ReturnStatement); 2605N(SyntaxKind.ReturnStatement); 3220N(SyntaxKind.ReturnStatement);
Parsing\StatementParsingTests.cs (3)
1100Assert.Equal(SyntaxKind.ReturnStatement, statement.Kind()); 1120Assert.Equal(SyntaxKind.ReturnStatement, statement.Kind()); 5891N(SyntaxKind.ReturnStatement);
Parsing\SwitchExpressionParsingTests.cs (1)
377N(SyntaxKind.ReturnStatement);
Parsing\TopLevelStatementsParsingTests.cs (3)
762N(SyntaxKind.ReturnStatement); 1302N(SyntaxKind.ReturnStatement); 1436N(SyntaxKind.ReturnStatement);
Parsing\ValueTupleTests.cs (6)
74N(SyntaxKind.ReturnStatement); 732N(SyntaxKind.ReturnStatement); 793N(SyntaxKind.ReturnStatement); 854N(SyntaxKind.ReturnStatement); 907N(SyntaxKind.ReturnStatement); 971N(SyntaxKind.ReturnStatement);
Syntax\SyntaxNodeTests.cs (11)
183Assert.Equal(SyntaxKind.ReturnStatement, nodes[0].Kind()); 188Assert.Equal(SyntaxKind.ReturnStatement, nodes[0].Kind()); 195Assert.Equal(SyntaxKind.ReturnStatement, nodes[0].Kind()); 200Assert.Equal(SyntaxKind.ReturnStatement, nodes[0].Kind()); 207Assert.Equal(SyntaxKind.ReturnStatement, nodes[0].Kind()); 212Assert.Equal(SyntaxKind.ReturnStatement, nodes[0].Kind()); 219Assert.Equal(SyntaxKind.ReturnStatement, nodes[0].Kind()); 224Assert.Equal(SyntaxKind.ReturnStatement, nodes[0].Kind()); 272Assert.Equal(SyntaxKind.ReturnStatement, nodesAndTokens[0].Kind()); 280Assert.Equal(SyntaxKind.ReturnStatement, nodesAndTokens[0].Kind()); 295Assert.Equal(SyntaxKind.ReturnStatement, nodesAndTokens[0].Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
Classification\ClassificationHelpers.cs (1)
111case SyntaxKind.ReturnStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ExpressionSyntaxExtensions.cs (1)
572case SyntaxKind.ReturnStatement:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
152public int ReturnStatement => (int)SyntaxKind.ReturnStatement;
Microsoft.CodeAnalysis.UnitTests (1)
Diagnostics\AnalysisContextInfoTests.cs (1)
80c.RegisterSyntaxNodeAction(b => ThrowIfMatch(nameof(c.RegisterSyntaxNodeAction), new AnalysisContextInfo(b.SemanticModel.Compilation, b.Node)), SyntaxKind.ReturnStatement);
Microsoft.VisualStudio.LanguageServices.CSharp (1)
CodeModel\CSharpCodeModelService.cs (1)
2321(accessor.Body.Statements.Count == 1 && !accessor.Body.Statements[0].IsKind(SyntaxKind.ReturnStatement)))