50 references to ERR_EscapeStackAlloc
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder.ValueChecks.cs (1)
3957
Error(diagnostics, inUnsafeRegion ? ErrorCode.WRN_EscapeStackAlloc : ErrorCode.
ERR_EscapeStackAlloc
, node, expr.Type);
Errors\ErrorFacts.cs (1)
1809
case ErrorCode.
ERR_EscapeStackAlloc
:
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (48)
Semantics\PrimaryConstructorTests.cs (2)
6499
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[512]").WithArguments("System.Span<byte>").WithLocation(4, 31),
6505
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[512]").WithArguments("System.Span<int>").WithLocation(5, 50));
Semantics\RefEscapingTests.cs (20)
947
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(23, 13),
950
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(32, 35)
955
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(23, 13),
958
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(32, 35),
1122
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(7, 15),
1125
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(14, 15),
1128
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(19, 31),
1131
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(24, 31));
1416
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(13, 14),
1419
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(19, 13));
1723
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(23, 13),
1726
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(31, 34),
1729
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(49, 13),
1732
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(60, 30)
1737
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(23, 13),
1740
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(31, 34),
1743
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(49, 13),
1746
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(60, 30),
3434
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[10]").WithArguments("System.Span<int>").WithLocation(24, 19),
3437
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[10]").WithArguments("System.Span<int>").WithLocation(31, 21)
Semantics\RefFieldTests.cs (6)
27834
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[1]").WithArguments("System.Span<byte>").WithLocation(4, 33),
27840
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[1]").WithArguments("System.Span<byte>").WithLocation(5, 42));
27954
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[1]").WithArguments("System.Span<byte>").WithLocation(4, 22),
27963
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[1]").WithArguments("System.Span<byte>").WithLocation(5, 31));
29020
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc int[1]").WithArguments("System.Span<int>").WithLocation(6, 45),
29026
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)
2097
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "stackalloc byte[10]").WithArguments("System.Span<byte>").WithLocation(10, 18),
2100
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 (14)
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));
3749
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "Field = stackalloc byte[512]").WithArguments("System.Span<byte>").WithLocation(8, 45),
3752
Diagnostic(ErrorCode.
ERR_EscapeStackAlloc
, "Field = stackalloc byte[512]").WithArguments("System.Span<byte>").WithLocation(9, 57));
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));