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