73 references to StackAllocArrayCreationExpressionSyntax
Microsoft.CodeAnalysis.CSharp (8)
Binder\Binder_Expressions.cs (4)
612return BindStackAllocArrayCreationExpression((StackAllocArrayCreationExpressionSyntax)node, diagnostics); 4440StackAllocArrayCreationExpressionSyntax node, BindingDiagnosticBag diagnostics) 4521Debug.Assert(node is StackAllocArrayCreationExpressionSyntax || node is ImplicitStackAllocArrayCreationExpressionSyntax); 4556? ((StackAllocArrayCreationExpressionSyntax)node).Type
Syntax\StackAllocArrayCreationExpressionSyntax.cs (2)
11public StackAllocArrayCreationExpressionSyntax Update(SyntaxToken stackAllocKeyword, TypeSyntax type) 20public static StackAllocArrayCreationExpressionSyntax StackAllocArrayCreationExpression(SyntaxToken stackAllocKeyword, TypeSyntax type)
Syntax\SyntaxFactory.cs (1)
2221if (((StackAllocArrayCreationExpressionSyntax)parent).Type == node)
Syntax\SyntaxFacts.cs (1)
120return ((StackAllocArrayCreationExpressionSyntax)parent).Type == node;
Microsoft.CodeAnalysis.CSharp.CodeStyle (11)
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (3)
87var expression = (StackAllocArrayCreationExpressionSyntax)context.Node; 125StackAllocArrayCreationExpressionSyntax expression,
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (5)
692if (initializerExpression.Parent is StackAllocArrayCreationExpressionSyntax or ImplicitStackAllocArrayCreationExpressionSyntax) 746or StackAllocArrayCreationExpressionSyntax 831Contract.ThrowIfFalse(expression is ArrayCreationExpressionSyntax or StackAllocArrayCreationExpressionSyntax); 1091is StackAllocArrayCreationExpressionSyntax { Initializer: not null } 1228StackAllocArrayCreationExpressionSyntax stackAllocCreation => stackAllocCreation.Initializer,
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
65if (expression is StackAllocArrayCreationExpressionSyntax or ImplicitStackAllocArrayCreationExpressionSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (1)
430parent is StackAllocArrayCreationExpressionSyntax ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
175case StackAllocArrayCreationExpressionSyntax arrayCreation when arrayCreation.Initializer != null:
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocCodeFixProvider.cs (4)
38if (stackAllocExpression is not StackAllocArrayCreationExpressionSyntax and not ImplicitStackAllocArrayCreationExpressionSyntax) 54StackAllocArrayCreationExpressionSyntax arrayCreation => arrayCreation.Initializer, 60StackAllocArrayCreationExpressionSyntax arrayCreation => arrayCreation.WithInitializer(i), 83StackAllocArrayCreationExpressionSyntax arrayCreation
Microsoft.CodeAnalysis.CSharp.Features (14)
EditAndContinue\CSharpEditAndContinueAnalyzer.cs (1)
1779return ((StackAllocArrayCreationExpressionSyntax)node).StackAllocKeyword.Span;
ExtractMethod\CSharpMethodExtractor.PostProcessor.cs (1)
243declaration.Declaration.Variables[0].Initializer.Value is StackAllocArrayCreationExpressionSyntax ||
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocDiagnosticAnalyzer.cs (3)
87var expression = (StackAllocArrayCreationExpressionSyntax)context.Node; 125StackAllocArrayCreationExpressionSyntax expression,
src\Analyzers\CSharp\Analyzers\UseCollectionExpression\UseCollectionExpressionHelpers.cs (5)
692if (initializerExpression.Parent is StackAllocArrayCreationExpressionSyntax or ImplicitStackAllocArrayCreationExpressionSyntax) 746or StackAllocArrayCreationExpressionSyntax 831Contract.ThrowIfFalse(expression is ArrayCreationExpressionSyntax or StackAllocArrayCreationExpressionSyntax); 1091is StackAllocArrayCreationExpressionSyntax { Initializer: not null } 1228StackAllocArrayCreationExpressionSyntax stackAllocCreation => stackAllocCreation.Initializer,
src\Analyzers\CSharp\CodeFixes\UseCollectionExpression\CSharpUseCollectionExpressionForStackAllocCodeFixProvider.cs (4)
38if (stackAllocExpression is not StackAllocArrayCreationExpressionSyntax and not ImplicitStackAllocArrayCreationExpressionSyntax) 54StackAllocArrayCreationExpressionSyntax arrayCreation => arrayCreation.Initializer, 60StackAllocArrayCreationExpressionSyntax arrayCreation => arrayCreation.WithInitializer(i), 83StackAllocArrayCreationExpressionSyntax arrayCreation
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (20)
IOperation\IOperationTests_IParameterReferenceExpression.cs (1)
743VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics);
IOperation\IOperationTests_StackAllocArrayCreationAndInitializer.cs (19)
39VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 67VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 96VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 124VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 155VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 186VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 213VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 240VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 267VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 294VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 326VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 485VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 512VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 544VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 575VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 609VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 641VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 675VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics); 707VerifyOperationTreeAndDiagnosticsForTest<StackAllocArrayCreationExpressionSyntax>(source, expectedOperationTree, expectedDiagnostics);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (6)
Semantics\StackAllocInitializerTests.cs (4)
2359var expressions = tree.GetCompilationUnitRoot().DescendantNodes().OfType<StackAllocArrayCreationExpressionSyntax>().ToArray(); 2362var @stackalloc = expressions[0]; 2565var expressions = tree.GetCompilationUnitRoot().DescendantNodes().OfType<StackAllocArrayCreationExpressionSyntax>().ToArray(); 2568var @stackalloc = expressions[0];
Semantics\UnsafeTests.cs (2)
11305var stackAllocSyntax = tree.GetCompilationUnitRoot().DescendantNodes().OfType<StackAllocArrayCreationExpressionSyntax>().Single();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (7)
Generated\Syntax.Test.xml.Generated.cs (5)
10427private static StackAllocArrayCreationExpressionSyntax GenerateStackAllocArrayCreationExpression() 11746var node = GenerateStackAllocArrayCreationExpression(); 11751var newNode = node.WithStackAllocKeyword(node.StackAllocKeyword).WithType(node.Type).WithInitializer(node.Initializer); 15815var oldNode = GenerateStackAllocArrayCreationExpression(); 15831var oldNode = GenerateStackAllocArrayCreationExpression();
Syntax\SyntaxNodeTests.cs (2)
3978var expression = (StackAllocArrayCreationExpressionSyntax)SyntaxFactory.ParseExpression(text);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\ParenthesizedExpressionSyntaxExtensions.cs (1)
65if (expression is StackAllocArrayCreationExpressionSyntax or ImplicitStackAllocArrayCreationExpressionSyntax)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\FormattingHelpers.cs (1)
430parent is StackAllocArrayCreationExpressionSyntax ||
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\Rules\IndentBlockFormattingRule.cs (1)
175case StackAllocArrayCreationExpressionSyntax arrayCreation when arrayCreation.Initializer != null: