44 references to ERR_EscapeStackAlloc
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.ValueChecks.cs (1)
4956
Error(diagnostics, inUnsafeRegion ? ErrorCode.WRN_EscapeStackAlloc : ErrorCode.
ERR_EscapeStackAlloc
, node, expr.Type);
Errors\ErrorFacts.cs (1)
1868
or ErrorCode.
ERR_EscapeStackAlloc
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (2)
Semantics\PrimaryConstructorTests.cs (2)
7115
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[512]").WithArguments("System.Span<byte>").WithLocation(4, 31),
7121
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[512]").WithArguments("System.Span<int>").WithLocation(5, 50));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (40)
Semantics\RefEscapingTests.cs (20)
953
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(23, 13),
956
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(32, 35)
961
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(23, 13),
964
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(32, 35),
1128
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(7, 15),
1131
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(14, 15),
1134
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(19, 31),
1137
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(24, 31));
1422
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(13, 14),
1425
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(19, 13));
1729
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(23, 13),
1732
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(31, 34),
1735
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(49, 13),
1738
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(60, 30)
1743
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(23, 13),
1746
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(31, 34),
1749
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(49, 13),
1752
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(60, 30),
4796
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[10]").WithArguments("System.Span<int>").WithLocation(24, 19),
4799
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[10]").WithArguments("System.Span<int>").WithLocation(31, 21)
Semantics\RefFieldTests.cs (2)
30387
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(6, 45),
30393
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[2]").WithArguments("System.Span<int>").WithLocation(11, 45));
Semantics\RefLocalsAndReturnsTests.cs (1)
592
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[10]").WithArguments("System.Span<int>").WithLocation(10, 14),
Semantics\SpanStackSafetyTests.cs (2)
2589
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[10]").WithArguments("System.Span<byte>").WithLocation(10, 18),
2592
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[10]").WithArguments("System.Span<byte>").WithLocation(21, 18),
Semantics\StackAllocInitializerTests.cs (3)
665
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[3] { 1, 2, 3 }").WithArguments("System.Span<int>").WithLocation(7, 44),
671
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[ ] { 1, 2, 3 }").WithArguments("System.Span<int>").WithLocation(8, 44),
677
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc [ ] { 1, 2, 3 }").WithArguments("System.Span<int>").WithLocation(9, 44)
Semantics\StructConstructorTests.cs (12)
3700
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[512]").WithArguments("System.Span<byte>").WithLocation(5, 31),
3703
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[512]").WithArguments("System.Span<byte>").WithLocation(6, 43));
3723
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[512]").WithArguments("System.Span<int>").WithLocation(5, 38),
3726
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[512]").WithArguments("System.Span<int>").WithLocation(6, 50));
3774
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[512]").WithArguments("System.Span<byte>").WithLocation(5, 39),
3777
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[512]").WithArguments("System.Span<byte>").WithLocation(6, 51));
3799
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[512]").WithArguments("System.Span<byte>").WithLocation(4, 31),
3805
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[512]").WithArguments("System.Span<int>").WithLocation(5, 50));
3826
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[512]").WithArguments("System.Span<byte>").WithLocation(4, 31),
3832
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[512]").WithArguments("System.Span<int>").WithLocation(5, 50));
3853
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[512]").WithArguments("System.Span<byte>").WithLocation(4, 31),
3859
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[512]").WithArguments("System.Span<int>").WithLocation(5, 50));