718 references to ERR_UnsafeNeeded
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Unsafe.cs (1)
271
? new CSDiagnosticInfo(ErrorCode.
ERR_UnsafeNeeded
)
Errors\ErrorFacts.cs (1)
802
or ErrorCode.
ERR_UnsafeNeeded
Microsoft.CodeAnalysis.CSharp.CSharp15.UnitTests (127)
UnsafeEvolutionTests.cs (127)
838
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
916
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 9));
1009
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 11),
1012
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(2, 1),
1097
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
1100
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(2, 10));
1165
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 9),
1168
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(7, 18));
1307
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
1310
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(2, 12));
1425
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
1428
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(2, 14));
1510
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
1513
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(2, 1),
1516
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(3, 9));
1582
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
1585
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(2, 1),
1591
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(3, 9),
1660
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
1663
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(2, 1),
1666
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[0]").WithLocation(2, 1),
1669
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[0] = null").WithLocation(2, 1),
1672
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(3, 5),
1675
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[1]").WithLocation(3, 5),
1678
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = x[1]").WithLocation(3, 1));
1736
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
1739
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(2, 1),
1745
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(3, 5),
1839
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
1911
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 11),
1914
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(2, 1),
2026
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
2029
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x()").WithLocation(2, 12));
2108
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 11),
2111
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(2, 1),
2114
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x()").WithLocation(3, 12));
2168
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 1),
2171
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "&x").WithLocation(2, 10),
2218
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 1),
2320
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "string*").WithLocation(2, 1),
2326
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "&s").WithLocation(2, 13),
2436
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "fixed (int* p = &x) { }").WithLocation(6, 9),
2439
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 16),
2442
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "&x").WithLocation(6, 25),
2500
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "fixed (int* p = new S()) { }").WithLocation(5, 9),
2503
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 16),
2550
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "fixed (int* p = &x) { }").WithLocation(2, 1),
2553
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 8),
2660
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "fixed (string* p1 = &x) { }").WithLocation(6, 9),
2663
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "string*").WithLocation(6, 16),
2672
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "&x").WithLocation(6, 29),
2774
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
2777
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(2, 1),
2780
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p++").WithLocation(2, 1),
2783
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 1),
2786
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(3, 11),
2789
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p + 2").WithLocation(3, 11),
2792
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(4, 10),
2795
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(4, 14),
2798
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(5, 10),
2801
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p2").WithLocation(5, 14),
2990
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 1),
2993
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "s.y").WithLocation(2, 10),
2996
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "s.x").WithLocation(3, 9),
2999
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[5]").WithLocation(7, 22));
3108
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
3111
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[3]").WithLocation(1, 10),
3395
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = new X<string*[]>()").WithLocation(1, 1),
3398
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new X<string*[]>()").WithLocation(1, 5),
3401
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "string*").WithLocation(1, 11),
3410
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "string*").WithLocation(6, 15),
3890
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
5566
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "fixed (int* p = new C1()) { }").WithLocation(1, 1),
5569
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 8),
5572
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "fixed (int* p = new C2()) { }").WithLocation(2, 1),
5575
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 8),
7996
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.F()").WithLocation(2, 12));
8068
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "default(int*)").WithLocation(4, 15),
8071
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 23),
8138
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(3, 6),
8141
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.M2(null)").WithLocation(3, 1));
8208
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.M2(null)").WithLocation(3, 1));
8364
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 5),
8367
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[0]").WithLocation(2, 1),
8370
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[0].M2()").WithLocation(2, 1),
8373
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(4, 6),
8376
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E.M2(null)").WithLocation(4, 1));
8455
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 5),
8458
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[0]").WithLocation(2, 1),
8461
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[0].M2()").WithLocation(2, 1),
8464
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(4, 6),
8467
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E.M2(null)").WithLocation(4, 1));
8627
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "i.M1()").WithLocation(2, 1),
8630
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(7, 12),
8633
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 5));
8703
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 21),
8706
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(11, 21),
8709
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(23, 21),
8712
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(17, 21),
8715
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(7, 12),
8718
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 14),
8721
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(14, 12),
8724
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 5),
8727
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 3),
8730
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "i.M1()").WithLocation(2, 1));
8801
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.P2").WithLocation(3, 1),
8804
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.P2").WithLocation(3, 8),
8807
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.P2 = c.P2").WithLocation(3, 1));
8894
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 5),
8897
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[0]").WithLocation(3, 1),
8900
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 22),
8903
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[0]").WithLocation(3, 18),
8906
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(5, 10),
8909
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E.get_P2(null)").WithLocation(5, 1),
8912
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(5, 26),
8915
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E.set_P2(null, 0)").WithLocation(5, 17));
8991
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c2[0]").WithLocation(4, 1),
8994
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c2[0]").WithLocation(4, 9),
8997
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c2[0] = c2[0]").WithLocation(4, 1));
9064
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.E2").WithLocation(3, 1));
9127
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(null)").WithLocation(2, 5),
9130
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(2, 11));
9344
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 19));
9946
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 19));
10154
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 19));
10528
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 21));
10706
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 36));
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (47)
CodeGen\CodeGenFunctionPointersTests.cs (9)
11504
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "default(B<delegate*<void>[]>.E)").WithLocation(11, 4),
11507
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(11, 14));
11572
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "default(B<delegate*<void>[]>.E)").WithLocation(11, 12),
11575
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(11, 22));
11659
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(3, 16)
11725
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "default").WithLocation(11, 4)
12093
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "B<delegate*<void>[]>").WithLocation(12, 12),
12096
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "B<delegate*<void>[]>.C").WithLocation(12, 12),
12099
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(12, 14));
CodeGen\FixedSizeBufferTests.cs (2)
373
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "s.x").WithLocation(14, 34),
376
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a[0].x").WithLocation(18, 34)
CodeGen\UnsafeTests.cs (36)
94
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 12),
97
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(param)").WithLocation(6, 9),
100
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "param").WithLocation(6, 11)
123
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 12),
126
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(param)").WithLocation(6, 9),
129
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "param").WithLocation(6, 11)
152
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 14),
155
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(param)").WithLocation(6, 9),
158
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "param").WithLocation(6, 11)
181
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 7),
184
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(param)").WithLocation(6, 9),
187
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "param").WithLocation(6, 15)
210
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 7),
213
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(param)").WithLocation(6, 9),
216
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "param").WithLocation(6, 15)
11104
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.Field").WithLocation(3, 5)
11716
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 21),
11719
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(6, 26),
11722
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(6, 34),
11725
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(10, 21),
11728
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(10, 28),
11731
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(10, 34),
11734
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(14, 21),
11737
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(14, 37),
11740
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(14, 45),
11743
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(18, 23),
11746
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(18, 42),
11749
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(18, 48)
11790
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(11, 17),
11793
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(11, 25),
11796
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(15, 17),
11799
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(15, 23),
11802
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(19, 17),
11805
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(19, 25),
11808
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(23, 17),
11811
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(23, 23)
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (28)
Attributes\AttributeTests.cs (7)
10182
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "F").WithLocation(8, 28)
10235
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "F").WithLocation(9, 28)
10870
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 7),
10876
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(8, 7),
10947
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 7));
10958
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 7));
11633
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 4));
PartialEventsAndConstructorsTests.cs (3)
3096
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(8, 15),
3099
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(9, 43),
3102
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(10, 43));
Semantics\CollectionExpressionTests.cs (3)
45740
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "[2, 3]").WithLocation(5, 24)
45825
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "2").WithLocation(5, 25),
45828
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "3").WithLocation(5, 28)
Semantics\ExtensionTests.cs (1)
20083
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "object.M").WithLocation(1, 7));
Semantics\OutVarTests.cs (2)
32018
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a[2]").WithLocation(3, 12)
32049
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a[2]").WithLocation(3, 12),
Semantics\ParamsCollectionTests.cs (6)
13542
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Params.Test()").WithLocation(5, 9),
13545
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Params.Test(1)").WithLocation(6, 9),
13548
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Params.Test(2, 3)").WithLocation(7, 9)
13648
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "1").WithLocation(6, 21),
13651
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "2").WithLocation(7, 21),
13654
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "3").WithLocation(7, 24)
Semantics\PatternMatchingTests_Global.cs (2)
6193
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a[2]").WithLocation(3, 12)
6222
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a[2]").WithLocation(3, 12),
Semantics\PrimaryConstructorTests.cs (4)
22121
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 11),
22124
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(4, 22),
22127
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(7, 10),
22130
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(9, 22)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (16)
IOperation\IOperationTests_StackAllocArrayCreationAndInitializer.cs (16)
37
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[1]").WithLocation(6, 27)
67
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc M[1]").WithLocation(8, 27)
98
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc M[dimension]").WithLocation(9, 27)
128
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc M[dimension]").WithLocation(8, 27)
161
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc M[dimension]").WithLocation(8, 27)
194
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc M[(int)dimension]").WithLocation(8, 27)
223
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[] { 42 }").WithLocation(6, 27)
252
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[1] { 42 }").WithLocation(6, 27)
340
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc M[] { new M() }").WithLocation(8, 27)
374
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc[] { new M() }").WithLocation(8, 27)
476
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc[] { 2, a, default }").WithLocation(7, 27)
532
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[] { 1 }").WithLocation(6, 27)
566
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[b]").WithLocation(6, 27)
605
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[M()]").WithLocation(6, 27)
641
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[(int)M()]").WithLocation(6, 27)
741
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[0.0]").WithLocation(6, 27)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (388)
Semantics\BindingAsyncTests.cs (2)
740
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(8, 26),
743
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(9, 26)
Semantics\FunctionPointerTests.cs (2)
74
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(2, 11),
133
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(2, 43));
Semantics\GlobalUsingDirectiveTests.cs (2)
5066
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(4, 5));
5089
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 18));
Semantics\LocalFunctionTests.cs (6)
2423
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(37, 40),
2429
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Local(&x)").WithLocation(39, 17),
2432
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "&x").WithLocation(39, 23)
3506
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "&x").WithLocation(11, 32)
4873
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(11, 29),
4876
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(void*)null").WithLocation(11, 28),
Semantics\RefFieldTests.cs (18)
756
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "S*").WithLocation(14, 9),
759
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "S2*").WithLocation(15, 9),
765
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "C*").WithLocation(16, 9),
1054
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(13, 12),
1057
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = (S*)p").WithLocation(15, 9),
1060
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(S*)p").WithLocation(15, 13),
1063
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "S*").WithLocation(15, 14),
1066
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(15, 17),
1069
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = (S2*)p").WithLocation(16, 9),
1072
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(S2*)p").WithLocation(16, 13),
1075
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "S2*").WithLocation(16, 14),
1081
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(16, 18),
1084
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = (C*)p").WithLocation(17, 9),
1087
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(C*)p").WithLocation(17, 13),
1090
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "C*").WithLocation(17, 14),
1096
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(17, 17),
1310
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "&s").WithLocation(15, 17),
1316
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "&s").WithLocation(19, 17),
Semantics\ScriptSemanticsTests.cs (2)
1143
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[3]").WithLocation(1, 11)
1169
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[3]").WithLocation(1, 11)
Semantics\SemanticErrorTests.cs (2)
16173
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "inst.field.buffer").WithLocation(13, 30),
16176
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "field.buffer").WithLocation(20, 17)
Semantics\StackAllocInitializerTests.cs (4)
1510
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int [3] { 1, 2, 3 }").WithLocation(6, 18),
1513
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int [ ] { 1, 2, 3 }").WithLocation(7, 18),
1516
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc [ ] { 1, 2, 3 }").WithLocation(8, 18)
1850
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc [ ] { d }").WithLocation(9, 18)
Semantics\StackAllocSpanExpressionsTests.cs (1)
416
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[10]").WithLocation(6, 17));
Semantics\TopLevelStatementsTests.cs (3)
8601
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "fixed(int *p = &new C().i) {}").WithLocation(2, 1),
8604
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int *").WithLocation(2, 7),
8607
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "&new C().i").WithLocation(2, 16)
Semantics\UnsafeTests.cs (346)
395
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 9)
962
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(7, 24)
1013
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(9, 28)
1041
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(7, 24)
1073
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(10, 29)
1105
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(10, 29)
1136
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 9)
1177
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 12)
1290
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 51)
1460
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 36)
1573
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 78)
1681
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 14)
1734
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 15)
1802
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 54)
1829
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 15));
1903
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 15)
1952
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 5)
2005
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 15)
2073
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 44)
2100
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 15));
2174
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 15)
2260
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 8)
2372
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 47)
2464
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 12),
2467
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(1, 17)
2554
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 12),
2557
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(1, 19),
2750
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*")
2772
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
2792
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*"),
2794
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "byte*"),
2796
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
2799
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*"),
2801
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "byte*"),
2803
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
2818
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*"),
2820
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "byte*"),
2822
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
2837
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*"),
2839
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "byte*"));
2854
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
2872
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
2874
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "byte*"),
2876
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "short*"),
2878
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*"));
2898
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
2900
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
2920
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
2922
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*"),
2924
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "byte*"),
2926
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
2928
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*"),
2930
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "byte*"));
2983
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 18),
2989
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(8, 18),
3052
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3055
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3058
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3061
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3064
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3067
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3070
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
3073
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe(null)")
3135
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3138
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3141
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3144
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3147
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3150
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3153
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3156
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3159
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3162
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3165
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3168
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
3195
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3198
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3204
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3207
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3210
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*")
3245
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3316
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 59)
3511
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3514
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo()"),
3517
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
3520
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo(null)"),
3523
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3526
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1"),
3529
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo((int*)1)"),
3532
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3535
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[2]"),
3538
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo(new int*[2])")
3563
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3566
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo()"),
3569
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
3572
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo(null)"),
3575
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3578
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1"),
3581
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo((int*)1)")
3608
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3611
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d()"),
3614
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
3617
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d(null)"),
3620
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3623
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1"),
3626
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d((int*)1)"),
3629
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3632
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[2]"),
3635
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d(new int*[2])")
3661
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 39),
3664
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d()").WithLocation(8, 11),
3667
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(9, 13),
3670
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d(null)").WithLocation(9, 11),
3673
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(10, 27),
3676
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new Container<int*[]>[2]").WithLocation(10, 13),
3679
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d(new Container<int*[]>[2])").WithLocation(10, 11)
3705
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3708
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d()"),
3711
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
3714
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d(null)"),
3717
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3720
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1"),
3723
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d((int*)1)")
3750
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3753
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C()"),
3756
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
3759
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(null)"),
3762
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3765
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1"),
3768
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C((int*)1)"),
3771
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3774
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[2]"),
3777
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(new int*[2])")
3803
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 25),
3806
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C()").WithLocation(8, 15),
3809
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(9, 21),
3812
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(null)").WithLocation(9, 15),
3815
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(10, 35),
3818
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new Container<int*[]>[2]").WithLocation(10, 21),
3821
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(new Container<int*[]>[2])").WithLocation(10, 15)
3847
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3850
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C()"),
3853
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
3856
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(null)"),
3859
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3862
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1"),
3865
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C((int*)1)")
3892
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3895
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3898
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1"),
3901
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3904
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[2]")
3931
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(14, 39),
3934
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(11, 38),
3937
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new Container<int*[]>[2]").WithLocation(11, 24)
3963
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3966
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3969
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1")
3995
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*")
4034
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*")
4074
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo"),
4078
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
4081
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
4106
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo"),
4110
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
4113
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
4138
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 22),
4141
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(12, 22),
4144
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo").WithLocation(9, 15));
4169
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 13),
4172
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(12, 15),
4175
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo").WithLocation(9, 15));
4200
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 24),
4203
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(12, 24),
4206
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo").WithLocation(9, 15));
4231
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 15),
4234
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(12, 17),
4237
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo").WithLocation(9, 15));
4245
d => !d.Code.Equals((int)ErrorCode.
ERR_UnsafeNeeded
) && !d.Code.Equals((int)ErrorCode.ERR_SizeofUnsafe));
4284
d => !d.Code.Equals((int)ErrorCode.
ERR_UnsafeNeeded
) && !d.Code.Equals((int)ErrorCode.ERR_SizeofUnsafe));
4308
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*"),
4311
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
4314
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo(null)")
4335
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(4, 20),
4338
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(null)").WithLocation(7, 9),
4341
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(7, 11)
4363
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(5, 22),
4366
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(null)").WithLocation(8, 9),
4369
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(8, 11)
4401
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
4404
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
4407
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
4410
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(null)"),
4413
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
4416
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
4419
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(null, null)"),
4422
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "this"),
4425
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(this)")
4457
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 38),
4460
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 19),
4463
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(11, 23),
4466
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(null)").WithLocation(11, 21),
4469
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(14, 23),
4472
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(14, 29),
4475
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(null, null)").WithLocation(14, 21),
4478
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "this").WithLocation(17, 23),
4481
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(this)").WithLocation(17, 21)
4513
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
4516
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
4547
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 24),
4550
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 40)
4573
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
4576
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
4579
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "base")
4601
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 18),
4604
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "base").WithLocation(9, 25),
4607
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(9, 30)
4630
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 20),
4633
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "base").WithLocation(10, 25),
4636
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(10, 30)
4659
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
4662
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x"));
10511
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
10517
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
10520
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int**"),
10526
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*"),
10532
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*"),
10535
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void**"),
10925
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
10928
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[1]")
10950
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[1]").WithLocation(6, 17)
11545
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "T*").WithLocation(8, 22),
11649
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "T*").WithLocation(17, 22),
11652
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "T*").WithLocation(10, 22),
11812
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "string*").WithLocation(13, 22),
11815
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "string*").WithLocation(10, 22),
12124
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
12127
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "B"),
12130
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "base"));
12153
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 24),
12156
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "B").WithLocation(11, 6),
12159
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "base").WithLocation(12, 20)
13034
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 11),
13037
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(7, 13),
13040
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Y").WithLocation(10, 13));
13065
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(5, 15));
13121
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 11),
13124
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 12));
13200
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12));
13241
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 11));
13271
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 13));
13295
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 13));
13363
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 13));
13387
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(2, 11),
13390
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 13));
13416
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(2, 11),
13419
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 12));
13456
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(8, 13));
13490
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(3, 11));
13523
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 13));
13547
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 13));
13567
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*").WithLocation(3, 43));
13581
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43));
13599
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*").WithLocation(3, 46));
13613
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 46));
13714
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43)
13744
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12),
13763
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43),
13766
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12),
13820
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43),
13832
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43),
13867
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43)
13905
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12));
13911
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12));
13917
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43),
13920
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12)
13965
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43),
13981
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43),
14049
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 5),
14052
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 9),
14055
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(9, 9),
14058
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 17),
14061
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 20),
14064
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(11, 22),
14067
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y").WithLocation(12, 9),
14070
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y = delegate { throw null; }").WithLocation(12, 9));
14079
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 5),
14082
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 9),
14085
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(9, 9),
14088
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 17),
14091
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 20),
14094
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(11, 22),
14097
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y").WithLocation(12, 9),
14100
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y = delegate { throw null; }").WithLocation(12, 9));
14106
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 5),
14109
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 9),
14112
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(9, 9),
14115
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 17),
14118
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 20),
14121
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(11, 22),
14124
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y").WithLocation(12, 9),
14127
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y = delegate { throw null; }").WithLocation(12, 9)
14173
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 5),
14176
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 9),
14179
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(9, 9),
14182
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 17),
14185
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 20),
14188
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(11, 22),
14191
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y").WithLocation(12, 9),
14194
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y = delegate { throw null; }").WithLocation(12, 9),
14197
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 17),
14200
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 25),
14203
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(13, 32));
14212
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 5),
14215
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 9),
14218
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(9, 9),
14221
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 17),
14224
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 20),
14227
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(11, 22),
14230
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y").WithLocation(12, 9),
14233
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y = delegate { throw null; }").WithLocation(12, 9),
14236
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 17),
14239
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 25),
14242
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(13, 32));
14248
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 5),
14251
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 9),
14254
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(9, 9),
14257
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 17),
14260
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 20),
14263
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(11, 22),
14266
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y").WithLocation(12, 9),
14269
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y = delegate { throw null; }").WithLocation(12, 9),
14272
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 17),
14275
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 25),
14278
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(13, 32)
14578
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 16)
14613
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 15)
14648
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 15)
14684
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 31)
14719
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 18),
14722
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 33),
14725
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 58)
14763
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 27),
14766
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 55)
14914
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 7),
14954
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 11),
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (79)
Compilation\UsedAssembliesTests.cs (26)
3588
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = C1<S<C0>*[]>.E1.F1 + 1").WithLocation(6, 9),
3591
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "C1<S<C0>*[]>").WithLocation(6, 13),
3594
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "C1<S<C0>*[]>.E1").WithLocation(6, 13),
3597
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "C1<S<C0>*[]>.E1.F1").WithLocation(6, 13),
3600
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "C1<S<C0>*[]>.E1.F1 + 1").WithLocation(6, 13));
3615
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E1.F1").WithLocation(7, 13),
3618
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E1.F1 + 1").WithLocation(7, 13),
3621
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = E1.F1 + 1").WithLocation(7, 9));
3636
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = F1 + 1").WithLocation(7, 9),
3639
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "F1").WithLocation(7, 13),
3642
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "F1 + 1").WithLocation(7, 13));
3657
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = alias.F1 + 1").WithLocation(7, 9),
3660
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "alias.F1").WithLocation(7, 13),
3663
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "alias.F1 + 1").WithLocation(7, 13));
3678
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = alias.E1.F1 + 1").WithLocation(7, 9),
3681
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "alias.E1").WithLocation(7, 13),
3684
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "alias.E1.F1").WithLocation(7, 13),
3687
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "alias.E1.F1 + 1").WithLocation(7, 13));
3749
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "S<C0>*").WithLocation(2, 17),
3752
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = E1.F1 + 1").WithLocation(7, 9),
3755
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E1.F1").WithLocation(7, 13),
3758
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E1.F1 + 1").WithLocation(7, 13));
3792
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "S<C0>*").WithLocation(2, 17),
3795
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = F1 + 1").WithLocation(7, 9),
3798
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "F1").WithLocation(7, 13),
3801
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "F1 + 1").WithLocation(7, 13));
Symbols\FunctionPointerTypeSymbolTests.cs (8)
1094
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(4, 5),
1100
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(5, 5),
1103
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(6, 5),
1106
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(6, 23),
1109
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(8, 9),
1115
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate/**/*").WithLocation(9, 13),
1781
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(15, 9),
1784
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr(1)").WithLocation(16, 13)
Symbols\GenericConstraintTests.cs (5)
6521
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "C<int>.E*").WithLocation(4, 30),
6524
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E*").WithLocation(9, 37));
6544
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "C<U>.E*").WithLocation(4, 33),
6547
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "C<V>.E*").WithLocation(9, 40));
7023
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 15));
Symbols\PartialPropertiesTests.cs (1)
2106
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(9, 20));
Symbols\Source\ClsComplianceTests.cs (1)
408
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(10, 26),
Symbols\Source\EnumTests.cs (2)
937
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 11),
961
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 11),
Symbols\Source\UsingAliasTests.cs (18)
776
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(7, 12));
781
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 43),
784
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(7, 12));
809
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(7, 12),
812
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(9, 17),
815
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[0]").WithLocation(9, 17));
836
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(7, 12),
839
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(9, 17),
842
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[0]").WithLocation(9, 17),
845
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[0][0]").WithLocation(9, 17));
850
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 43),
853
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(7, 12),
856
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(9, 17),
859
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[0]").WithLocation(9, 17),
862
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[0][0]").WithLocation(9, 17));
884
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12));
890
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43),
893
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12)
Symbols\SymbolErrorTests.cs (18)
2849
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "S*"),
2852
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "&s"),
2855
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "s2"));
2889
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "s.x"),
2892
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "s.x"));
2919
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "buf[10]"));
2944
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[10]").WithLocation(8, 21));
4440
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C<int*>()").WithLocation(7, 9),
4475
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C<int*>()").WithLocation(7, 9),
4478
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(7, 15),
4496
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(11, 11),
4585
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "COfIntPtr").WithLocation(9, 13),
4588
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new COfIntPtr()").WithLocation(9, 9),
4599
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 21),
4608
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "COfIntPtr").WithLocation(9, 13),
4611
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new COfIntPtr()").WithLocation(9, 9),
4614
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(10, 21),
15551
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ab[10]");
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (31)
Parsing\AnonymousFunctionParsingTests.cs (8)
1870
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 22),
1900
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 22),
1990
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 22),
2044
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 22),
2139
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
2160
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
2236
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 22),
2254
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 22),
Parsing\DeclarationScopeParsingTests.cs (1)
9683
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
Parsing\ExtensionsParsingTests.cs (1)
2627
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "field[10]").WithLocation(5, 19),
Parsing\FileModifierParsingTests.cs (1)
738
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(3, 10),
Parsing\FunctionPointerTests.cs (1)
519
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
Parsing\ParserErrorMessageTests.cs (3)
1121
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "T*").WithLocation(2, 15),
1124
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "T*").WithLocation(9, 19));
4069
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Test1*").WithLocation(6, 15),
Parsing\ParsingErrorRecoveryTests.cs (1)
4092
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "fixed(t v;").WithLocation(1, 22),
Parsing\StackAllocInitializerParsingTests.cs (3)
31
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[] { 42 }").WithLocation(1, 30));
78
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[1] { 42 }").WithLocation(1, 30));
125
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc[] { 42 }").WithLocation(1, 30));
Parsing\UsingDirectiveParsingTests.cs (10)
614
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "A*").WithLocation(1, 11));
729
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 11));
1095
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 11));
1195
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 15));
1348
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 11),
1434
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 15));
2156
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "VP").WithLocation(5, 12));
2310
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(1, 12));
5164
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 46));
5244
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 46));
Syntax\SyntaxFactoryTests.cs (2)
666
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
677
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),