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