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