705 references to ERR_UnsafeNeeded
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Unsafe.cs (1)
121
? new CSDiagnosticInfo(ErrorCode.
ERR_UnsafeNeeded
)
Errors\ErrorFacts.cs (1)
801
or ErrorCode.
ERR_UnsafeNeeded
Microsoft.CodeAnalysis.CSharp.CSharp15.UnitTests (116)
UnsafeEvolutionTests.cs (116)
814
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
882
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 9));
960
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 11),
963
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(2, 1),
1038
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
1041
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(2, 10));
1093
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 9),
1096
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(7, 18));
1211
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
1214
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(2, 12));
1310
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
1313
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(2, 14));
1380
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
1383
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(2, 1),
1386
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(3, 9));
1439
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
1442
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(2, 1),
1448
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(3, 9),
1504
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
1507
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(2, 1),
1510
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[0]").WithLocation(2, 1),
1513
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[0] = null").WithLocation(2, 1),
1516
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(3, 5),
1519
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[1]").WithLocation(3, 5),
1522
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = x[1]").WithLocation(3, 1));
1569
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
1572
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(2, 1),
1578
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(3, 5),
1660
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
1728
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 11),
1731
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(2, 1),
1833
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
1836
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x()").WithLocation(2, 12));
1900
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 11),
1903
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(2, 1),
1906
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x()").WithLocation(3, 12));
1950
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 1),
1953
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "&x").WithLocation(2, 10),
1991
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 1),
2074
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "fixed (int* p = &x) { }").WithLocation(6, 9),
2077
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 16),
2080
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "&x").WithLocation(6, 25),
2132
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "fixed (int* p = new S()) { }").WithLocation(5, 9),
2135
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 16),
2173
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "fixed (int* p = &x) { }").WithLocation(2, 1),
2176
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 8),
2265
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
2268
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(2, 1),
2271
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p++").WithLocation(2, 1),
2274
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 1),
2277
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(3, 11),
2280
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p + 2").WithLocation(3, 11),
2283
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(4, 10),
2286
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(4, 14),
2289
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(5, 10),
2292
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p2").WithLocation(5, 14),
2396
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 1),
2399
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "s.y").WithLocation(2, 10),
2402
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "s.x").WithLocation(3, 9),
2405
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[5]").WithLocation(7, 22));
2501
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 1),
2504
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[3]").WithLocation(1, 10),
3006
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
4546
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "fixed (int* p = new C1()) { }").WithLocation(1, 1),
4549
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 8),
4552
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "fixed (int* p = new C2()) { }").WithLocation(2, 1),
4555
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 8),
6260
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.F()").WithLocation(2, 12));
6330
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(3, 6),
6333
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.M2(null)").WithLocation(3, 1));
6388
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.M2(null)").WithLocation(3, 1));
6532
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 5),
6535
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[0]").WithLocation(2, 1),
6538
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[0].M2()").WithLocation(2, 1),
6541
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(4, 6),
6544
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E.M2(null)").WithLocation(4, 1));
6611
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 5),
6614
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[0]").WithLocation(2, 1),
6617
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[0].M2()").WithLocation(2, 1),
6620
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(4, 6),
6623
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E.M2(null)").WithLocation(4, 1));
6771
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "i.M1()").WithLocation(2, 1),
6774
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(7, 12),
6777
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 5));
6835
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 21),
6838
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(11, 21),
6841
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(23, 21),
6844
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(17, 21),
6847
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(7, 12),
6850
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 14),
6853
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(14, 12),
6856
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 5),
6859
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 3),
6862
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "i.M1()").WithLocation(2, 1));
6921
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.P2").WithLocation(3, 1),
6924
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.P2").WithLocation(3, 8),
6927
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.P2 = c.P2").WithLocation(3, 1));
7002
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 5),
7005
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[0]").WithLocation(3, 1),
7008
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 22),
7011
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[0]").WithLocation(3, 18),
7014
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(5, 10),
7017
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E.get_P2(null)").WithLocation(5, 1),
7020
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(5, 26),
7023
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E.set_P2(null, 0)").WithLocation(5, 17));
7087
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c2[0]").WithLocation(4, 1),
7090
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c2[0]").WithLocation(4, 9),
7093
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c2[0] = c2[0]").WithLocation(4, 1));
7148
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.E2").WithLocation(3, 1));
7199
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(null)").WithLocation(2, 5),
7202
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(2, 11));
7390
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 19));
7962
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 19));
8150
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 19));
8492
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 21));
8650
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));
11556
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "default(B<delegate*<void>[]>.E)").WithLocation(11, 12),
11559
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(11, 22));
11633
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(3, 16)
11696
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "default").WithLocation(11, 4)
12061
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "B<delegate*<void>[]>").WithLocation(12, 12),
12064
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "B<delegate*<void>[]>.C").WithLocation(12, 12),
12067
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)
120
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 12),
123
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(param)").WithLocation(6, 9),
126
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "param").WithLocation(6, 11)
146
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 14),
149
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(param)").WithLocation(6, 9),
152
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "param").WithLocation(6, 11)
172
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 7),
175
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(param)").WithLocation(6, 9),
178
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "param").WithLocation(6, 15)
198
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 7),
201
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(param)").WithLocation(6, 9),
204
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "param").WithLocation(6, 15)
11090
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "c.Field").WithLocation(3, 5)
11679
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 21),
11682
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(6, 26),
11685
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(6, 34),
11688
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(10, 21),
11691
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(10, 28),
11694
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(10, 34),
11697
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(14, 21),
11700
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(14, 37),
11703
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(14, 45),
11706
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(18, 23),
11709
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(18, 42),
11712
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(18, 48)
11750
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(11, 17),
11753
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(11, 25),
11756
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(15, 17),
11759
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(15, 23),
11762
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(19, 17),
11765
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "ptr").WithLocation(19, 25),
11768
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "a").WithLocation(23, 17),
11771
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)
10220
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "F").WithLocation(9, 28)
10840
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 7),
10846
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(8, 7),
10901
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 7));
10907
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 7));
11582
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)
45746
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "[2, 3]").WithLocation(5, 24)
45826
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "2").WithLocation(5, 25),
45829
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)
13643
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "1").WithLocation(6, 21),
13646
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "2").WithLocation(7, 21),
13649
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)
36
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[1]").WithLocation(6, 27)
64
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc M[1]").WithLocation(8, 27)
93
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc M[dimension]").WithLocation(9, 27)
121
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc M[dimension]").WithLocation(8, 27)
152
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc M[dimension]").WithLocation(8, 27)
183
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc M[(int)dimension]").WithLocation(8, 27)
210
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[] { 42 }").WithLocation(6, 27)
237
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[1] { 42 }").WithLocation(6, 27)
323
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc M[] { new M() }").WithLocation(8, 27)
355
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc[] { new M() }").WithLocation(8, 27)
455
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc[] { 2, a, default }").WithLocation(7, 27)
509
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[] { 1 }").WithLocation(6, 27)
541
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[b]").WithLocation(6, 27)
572
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[M()]").WithLocation(6, 27)
606
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[(int)M()]").WithLocation(6, 27)
704
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[0.0]").WithLocation(6, 27)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (386)
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));
5085
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)
3485
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "&x").WithLocation(11, 32)
4851
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(11, 29),
4854
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),
1032
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(13, 12),
1035
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = (S*)p").WithLocation(15, 9),
1038
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(S*)p").WithLocation(15, 13),
1041
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "S*").WithLocation(15, 14),
1044
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(15, 17),
1047
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = (S2*)p").WithLocation(16, 9),
1050
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(S2*)p").WithLocation(16, 13),
1053
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "S2*").WithLocation(16, 14),
1059
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(16, 18),
1062
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = (C*)p").WithLocation(17, 9),
1065
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(C*)p").WithLocation(17, 13),
1068
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "C*").WithLocation(17, 14),
1074
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(17, 17),
1266
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "&s").WithLocation(15, 17),
1272
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)
16164
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "inst.field.buffer").WithLocation(13, 30),
16167
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "field.buffer").WithLocation(20, 17)
Semantics\StackAllocInitializerTests.cs (4)
1509
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int [3] { 1, 2, 3 }").WithLocation(6, 18),
1512
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int [ ] { 1, 2, 3 }").WithLocation(7, 18),
1515
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc [ ] { 1, 2, 3 }").WithLocation(8, 18)
1845
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc [ ] { d }").WithLocation(9, 18)
Semantics\StackAllocSpanExpressionsTests.cs (1)
415
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 (344)
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)
2214
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 8)
2326
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 47)
2418
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 12),
2421
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(1, 17)
2508
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 12),
2511
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "p").WithLocation(1, 19),
2704
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*")
2726
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
2746
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*"),
2748
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "byte*"),
2750
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
2753
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*"),
2755
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "byte*"),
2757
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
2772
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*"),
2774
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "byte*"),
2776
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
2791
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*"),
2793
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "byte*"));
2808
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
2826
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
2828
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "byte*"),
2830
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "short*"),
2832
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*"));
2852
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
2854
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
2874
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
2876
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*"),
2878
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "byte*"),
2880
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
2882
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*"),
2884
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "byte*"));
2937
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 18),
2943
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(8, 18),
2997
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3000
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3003
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3006
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3009
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3012
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3015
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
3018
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe(null)")
3080
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3083
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3086
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3089
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3092
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3095
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3098
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3101
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3104
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3107
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3110
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3113
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
3140
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3143
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3149
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3152
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Unsafe()"),
3155
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*")
3189
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3253
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 59)
3445
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3448
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo()"),
3451
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
3454
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo(null)"),
3457
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3460
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1"),
3463
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo((int*)1)"),
3466
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3469
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[2]"),
3472
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo(new int*[2])")
3497
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3500
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo()"),
3503
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
3506
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo(null)"),
3509
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3512
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1"),
3515
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo((int*)1)")
3542
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3545
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d()"),
3548
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
3551
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d(null)"),
3554
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3557
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1"),
3560
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d((int*)1)"),
3563
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3566
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[2]"),
3569
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d(new int*[2])")
3595
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 39),
3598
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d()").WithLocation(8, 11),
3601
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(9, 13),
3604
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d(null)").WithLocation(9, 11),
3607
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(10, 27),
3610
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new Container<int*[]>[2]").WithLocation(10, 13),
3613
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d(new Container<int*[]>[2])").WithLocation(10, 11)
3639
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3642
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d()"),
3645
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
3648
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d(null)"),
3651
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3654
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1"),
3657
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "d((int*)1)")
3684
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3687
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C()"),
3690
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
3693
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(null)"),
3696
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3699
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1"),
3702
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C((int*)1)"),
3705
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3708
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[2]"),
3711
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(new int*[2])")
3737
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 25),
3740
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C()").WithLocation(8, 15),
3743
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(9, 21),
3746
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(null)").WithLocation(9, 15),
3749
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(10, 35),
3752
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new Container<int*[]>[2]").WithLocation(10, 21),
3755
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(new Container<int*[]>[2])").WithLocation(10, 15)
3781
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3784
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C()"),
3787
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
3790
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C(null)"),
3793
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3796
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1"),
3799
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C((int*)1)")
3826
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3829
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3832
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1"),
3835
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3838
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new int*[2]")
3865
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(14, 39),
3868
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(11, 38),
3871
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new Container<int*[]>[2]").WithLocation(11, 24)
3897
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3900
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
3903
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "(int*)1")
3929
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*")
3962
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*")
3996
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo"),
4000
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
4003
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
4028
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo"),
4032
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
4035
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
4060
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 22),
4063
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(12, 22),
4066
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo").WithLocation(9, 15));
4091
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 13),
4094
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(12, 15),
4097
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo").WithLocation(9, 15));
4122
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 24),
4125
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(12, 24),
4128
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo").WithLocation(9, 15));
4153
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 15),
4156
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(12, 17),
4159
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo").WithLocation(9, 15));
4202
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*"),
4205
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
4208
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Goo(null)")
4229
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(4, 20),
4232
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(null)").WithLocation(7, 9),
4235
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(7, 11)
4257
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(5, 22),
4260
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(null)").WithLocation(8, 9),
4263
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(8, 11)
4295
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
4298
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
4301
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
4304
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(null)"),
4307
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
4310
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
4313
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(null, null)"),
4316
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "this"),
4319
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(this)")
4351
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 38),
4354
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 19),
4357
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(11, 23),
4360
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(null)").WithLocation(11, 21),
4363
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(14, 23),
4366
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(14, 29),
4369
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(null, null)").WithLocation(14, 21),
4372
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "this").WithLocation(17, 23),
4375
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "M(this)").WithLocation(17, 21)
4407
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
4410
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"));
4441
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 24),
4444
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 40)
4467
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
4470
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null"),
4473
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "base")
4495
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(4, 18),
4498
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "base").WithLocation(9, 25),
4501
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(9, 30)
4524
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(5, 20),
4527
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "base").WithLocation(10, 25),
4530
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "null").WithLocation(10, 30)
4553
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
4556
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x"));
10405
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
10411
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
10414
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int**"),
10420
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*"),
10426
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*"),
10429
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void**"),
10801
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
10804
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[1]")
10826
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[1]").WithLocation(6, 17)
11418
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "T*").WithLocation(8, 22),
11522
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "T*").WithLocation(17, 22),
11525
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "T*").WithLocation(10, 22),
11685
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "string*").WithLocation(13, 22),
11688
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "string*").WithLocation(10, 22),
11993
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*"),
11996
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "B"),
11999
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "base"));
12022
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 24),
12025
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "B").WithLocation(11, 6),
12028
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "base").WithLocation(12, 20)
12885
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 11),
12888
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(7, 13),
12891
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "Y").WithLocation(10, 13));
12911
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(5, 15));
12949
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 11),
12952
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 12));
13006
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12));
13035
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 11));
13054
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 13));
13073
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 13));
13125
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 13));
13144
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(2, 11),
13147
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 13));
13168
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(2, 11),
13171
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(6, 12));
13197
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(8, 13));
13217
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(3, 11));
13236
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 13));
13255
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 13));
13269
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*").WithLocation(3, 43));
13279
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43));
13293
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "long*").WithLocation(3, 46));
13303
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 46));
13397
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43)
13427
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12),
13446
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43),
13449
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12),
13503
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43),
13515
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43),
13550
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43)
13576
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12));
13582
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12));
13588
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43),
13591
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12)
13627
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43));
13633
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43),
13689
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 5),
13692
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 9),
13695
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(9, 9),
13698
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 17),
13701
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 20),
13704
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(11, 22),
13707
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y").WithLocation(12, 9),
13710
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y = delegate { throw null; }").WithLocation(12, 9));
13719
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 5),
13722
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 9),
13725
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(9, 9),
13728
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 17),
13731
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 20),
13734
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(11, 22),
13737
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y").WithLocation(12, 9),
13740
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y = delegate { throw null; }").WithLocation(12, 9));
13746
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 5),
13749
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 9),
13752
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(9, 9),
13755
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 17),
13758
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 20),
13761
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(11, 22),
13764
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y").WithLocation(12, 9),
13767
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y = delegate { throw null; }").WithLocation(12, 9)
13807
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 5),
13810
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 9),
13813
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(9, 9),
13816
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 17),
13819
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 20),
13822
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(11, 22),
13825
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y").WithLocation(12, 9),
13828
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y = delegate { throw null; }").WithLocation(12, 9),
13831
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 17),
13834
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 25),
13837
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(13, 32));
13846
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 5),
13849
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 9),
13852
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(9, 9),
13855
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 17),
13858
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 20),
13861
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(11, 22),
13864
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y").WithLocation(12, 9),
13867
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y = delegate { throw null; }").WithLocation(12, 9),
13870
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 17),
13873
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 25),
13876
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(13, 32));
13882
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 5),
13885
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 9),
13888
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(9, 9),
13891
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 17),
13894
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(11, 20),
13897
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(11, 22),
13900
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y").WithLocation(12, 9),
13903
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "y = delegate { throw null; }").WithLocation(12, 9),
13906
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 17),
13909
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(13, 25),
13912
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(13, 32)
14187
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 16)
14217
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 15)
14247
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 15)
14278
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 31)
14308
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 18),
14311
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 33),
14314
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 58)
14347
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 27),
14350
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(14, 55)
14486
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 7),
14524
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));
3748
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "S<C0>*").WithLocation(2, 17),
3751
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = E1.F1 + 1").WithLocation(7, 9),
3754
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E1.F1").WithLocation(7, 13),
3757
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "E1.F1 + 1").WithLocation(7, 13));
3784
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "S<C0>*").WithLocation(2, 17),
3787
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "_ = F1 + 1").WithLocation(7, 9),
3790
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "F1").WithLocation(7, 13),
3793
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));
806
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(7, 12),
809
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(9, 17),
812
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[0]").WithLocation(9, 17));
833
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(7, 12),
836
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(9, 17),
839
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[0]").WithLocation(9, 17),
842
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[0][0]").WithLocation(9, 17));
847
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(3, 43),
850
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(7, 12),
853
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x").WithLocation(9, 17),
856
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[0]").WithLocation(9, 17),
859
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "x[0][0]").WithLocation(9, 17));
878
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 12));
884
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 43),
887
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"));
2879
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "s.x"),
2882
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "s.x"));
2896
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "buf[10]"));
2918
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "stackalloc int[10]").WithLocation(8, 21));
4411
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C<int*>()").WithLocation(7, 9),
4446
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new C<int*>()").WithLocation(7, 9),
4449
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(7, 15),
4467
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(11, 11),
4556
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "COfIntPtr").WithLocation(9, 13),
4559
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new COfIntPtr()").WithLocation(9, 9),
4570
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 21),
4579
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "COfIntPtr").WithLocation(9, 13),
4582
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "new COfIntPtr()").WithLocation(9, 9),
4585
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(10, 21),
15522
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),
1886
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 22),
1976
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 22),
2004
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 22),
2099
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
2112
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 1),
2188
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 22),
2198
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)
736
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));
4051
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));
718
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "delegate*").WithLocation(1, 11));
1073
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 11));
1162
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 15));
1307
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(2, 11),
1385
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "X").WithLocation(6, 15));
2099
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "VP").WithLocation(5, 12));
2251
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "void*").WithLocation(1, 12));
5103
Diagnostic(ErrorCode.
ERR_UnsafeNeeded
, "int*").WithLocation(1, 46));
5183
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),