356 references to ERR_UnsafeNeeded
Microsoft.CodeAnalysis.CSharp (3)
Binder\Binder_Unsafe.cs (1)
68? new CSDiagnosticInfo(ErrorCode.ERR_UnsafeNeeded)
Errors\ErrorFacts.cs (1)
729case ErrorCode.ERR_UnsafeNeeded:
Symbols\Source\SourceMemberFieldSymbol.cs (1)
579diagnosticsForFirstDeclarator.Add(ErrorCode.ERR_UnsafeNeeded, declarator.Location);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (7)
CodeGen\CodeGenFunctionPointersTests.cs (4)
11468Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(11, 14)); 11517Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(11, 22)); 11592Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(3, 16) 11963Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(12, 14));
CodeGen\FixedSizeBufferTests.cs (2)
364Diagnostic(ErrorCode.ERR_UnsafeNeeded, "s.x").WithLocation(14, 34), 367Diagnostic(ErrorCode.ERR_UnsafeNeeded, "a[0].x").WithLocation(18, 34)
CodeGen\UnsafeTests.cs (1)
9645Diagnostic(ErrorCode.ERR_UnsafeNeeded, "c.Field").WithLocation(3, 5)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (8)
Attributes\AttributeTests.cs (6)
9882Diagnostic(ErrorCode.ERR_UnsafeNeeded, "F").WithLocation(8, 28) 9920Diagnostic(ErrorCode.ERR_UnsafeNeeded, "F").WithLocation(9, 28) 10540Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(5, 7), 10546Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(8, 7), 10601Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(5, 7)); 10607Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(5, 7));
Semantics\PatternMatchingTests_Global.cs (2)
6192Diagnostic(ErrorCode.ERR_UnsafeNeeded, "a[2]").WithLocation(3, 12) 6221Diagnostic(ErrorCode.ERR_UnsafeNeeded, "a[2]").WithLocation(3, 12),
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 (253)
Semantics\FunctionPointerTests.cs (2)
51Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(2, 11), 110Diagnostic(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 (3)
3096Diagnostic(ErrorCode.ERR_UnsafeNeeded, "&x").WithLocation(11, 32) 4462Diagnostic(ErrorCode.ERR_UnsafeNeeded, "void*").WithLocation(11, 29), 4465Diagnostic(ErrorCode.ERR_UnsafeNeeded, "(void*)null").WithLocation(11, 28),
Semantics\OutVarTests.cs (2)
31970Diagnostic(ErrorCode.ERR_UnsafeNeeded, "a[2]").WithLocation(3, 12) 32001Diagnostic(ErrorCode.ERR_UnsafeNeeded, "a[2]").WithLocation(3, 12),
Semantics\RefFieldTests.cs (18)
729Diagnostic(ErrorCode.ERR_UnsafeNeeded, "S*").WithLocation(14, 9), 732Diagnostic(ErrorCode.ERR_UnsafeNeeded, "S2*").WithLocation(15, 9), 738Diagnostic(ErrorCode.ERR_UnsafeNeeded, "C*").WithLocation(16, 9), 1005Diagnostic(ErrorCode.ERR_UnsafeNeeded, "void*").WithLocation(13, 12), 1008Diagnostic(ErrorCode.ERR_UnsafeNeeded, "_ = (S*)p").WithLocation(15, 9), 1011Diagnostic(ErrorCode.ERR_UnsafeNeeded, "(S*)p").WithLocation(15, 13), 1014Diagnostic(ErrorCode.ERR_UnsafeNeeded, "S*").WithLocation(15, 14), 1017Diagnostic(ErrorCode.ERR_UnsafeNeeded, "p").WithLocation(15, 17), 1020Diagnostic(ErrorCode.ERR_UnsafeNeeded, "_ = (S2*)p").WithLocation(16, 9), 1023Diagnostic(ErrorCode.ERR_UnsafeNeeded, "(S2*)p").WithLocation(16, 13), 1026Diagnostic(ErrorCode.ERR_UnsafeNeeded, "S2*").WithLocation(16, 14), 1032Diagnostic(ErrorCode.ERR_UnsafeNeeded, "p").WithLocation(16, 18), 1035Diagnostic(ErrorCode.ERR_UnsafeNeeded, "_ = (C*)p").WithLocation(17, 9), 1038Diagnostic(ErrorCode.ERR_UnsafeNeeded, "(C*)p").WithLocation(17, 13), 1041Diagnostic(ErrorCode.ERR_UnsafeNeeded, "C*").WithLocation(17, 14), 1047Diagnostic(ErrorCode.ERR_UnsafeNeeded, "p").WithLocation(17, 17), 1239Diagnostic(ErrorCode.ERR_UnsafeNeeded, "&s").WithLocation(15, 17), 1245Diagnostic(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)
15991Diagnostic(ErrorCode.ERR_UnsafeNeeded, "inst.field.buffer").WithLocation(13, 30), 15994Diagnostic(ErrorCode.ERR_UnsafeNeeded, "field.buffer").WithLocation(20, 17)
Semantics\StackAllocInitializerTests.cs (4)
1493Diagnostic(ErrorCode.ERR_UnsafeNeeded, "stackalloc int [3] { 1, 2, 3 }").WithLocation(6, 18), 1496Diagnostic(ErrorCode.ERR_UnsafeNeeded, "stackalloc int [ ] { 1, 2, 3 }").WithLocation(7, 18), 1499Diagnostic(ErrorCode.ERR_UnsafeNeeded, "stackalloc [ ] { 1, 2, 3 }").WithLocation(8, 18) 1829Diagnostic(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)
8450Diagnostic(ErrorCode.ERR_UnsafeNeeded, "fixed(int *p = &new C().i) {}").WithLocation(2, 1), 8453Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int *").WithLocation(2, 7), 8456Diagnostic(ErrorCode.ERR_UnsafeNeeded, "&new C().i").WithLocation(2, 16)
Semantics\UnsafeTests.cs (214)
438Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*") 460Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*")); 480Diagnostic(ErrorCode.ERR_UnsafeNeeded, "long*"), 482Diagnostic(ErrorCode.ERR_UnsafeNeeded, "byte*"), 484Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 487Diagnostic(ErrorCode.ERR_UnsafeNeeded, "long*"), 489Diagnostic(ErrorCode.ERR_UnsafeNeeded, "byte*"), 491Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*")); 506Diagnostic(ErrorCode.ERR_UnsafeNeeded, "long*"), 508Diagnostic(ErrorCode.ERR_UnsafeNeeded, "byte*"), 510Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*")); 525Diagnostic(ErrorCode.ERR_UnsafeNeeded, "long*"), 527Diagnostic(ErrorCode.ERR_UnsafeNeeded, "byte*")); 542Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*")); 560Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 562Diagnostic(ErrorCode.ERR_UnsafeNeeded, "byte*"), 564Diagnostic(ErrorCode.ERR_UnsafeNeeded, "short*"), 566Diagnostic(ErrorCode.ERR_UnsafeNeeded, "long*")); 586Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 588Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*")); 608Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 610Diagnostic(ErrorCode.ERR_UnsafeNeeded, "long*"), 612Diagnostic(ErrorCode.ERR_UnsafeNeeded, "byte*"), 614Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 616Diagnostic(ErrorCode.ERR_UnsafeNeeded, "long*"), 618Diagnostic(ErrorCode.ERR_UnsafeNeeded, "byte*")); 671Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(3, 18), 677Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(8, 18), 731Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 734Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 737Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 740Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 743Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 746Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 749Diagnostic(ErrorCode.ERR_UnsafeNeeded, "null"), 752Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe(null)") 814Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 817Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 820Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 823Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 826Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 829Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 832Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 835Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 838Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 841Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 844Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 847Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*")); 874Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 877Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 883Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 886Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Unsafe()"), 889Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*") 923Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1112Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1115Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Goo()"), 1118Diagnostic(ErrorCode.ERR_UnsafeNeeded, "null"), 1121Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Goo(null)"), 1124Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1127Diagnostic(ErrorCode.ERR_UnsafeNeeded, "(int*)1"), 1130Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Goo((int*)1)"), 1133Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1136Diagnostic(ErrorCode.ERR_UnsafeNeeded, "new int*[2]"), 1139Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Goo(new int*[2])") 1164Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1167Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Goo()"), 1170Diagnostic(ErrorCode.ERR_UnsafeNeeded, "null"), 1173Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Goo(null)"), 1176Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1179Diagnostic(ErrorCode.ERR_UnsafeNeeded, "(int*)1"), 1182Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Goo((int*)1)") 1209Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1212Diagnostic(ErrorCode.ERR_UnsafeNeeded, "d()"), 1215Diagnostic(ErrorCode.ERR_UnsafeNeeded, "null"), 1218Diagnostic(ErrorCode.ERR_UnsafeNeeded, "d(null)"), 1221Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1224Diagnostic(ErrorCode.ERR_UnsafeNeeded, "(int*)1"), 1227Diagnostic(ErrorCode.ERR_UnsafeNeeded, "d((int*)1)"), 1230Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1233Diagnostic(ErrorCode.ERR_UnsafeNeeded, "new int*[2]"), 1236Diagnostic(ErrorCode.ERR_UnsafeNeeded, "d(new int*[2])") 1262Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1265Diagnostic(ErrorCode.ERR_UnsafeNeeded, "d()"), 1268Diagnostic(ErrorCode.ERR_UnsafeNeeded, "null"), 1271Diagnostic(ErrorCode.ERR_UnsafeNeeded, "d(null)"), 1274Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1277Diagnostic(ErrorCode.ERR_UnsafeNeeded, "(int*)1"), 1280Diagnostic(ErrorCode.ERR_UnsafeNeeded, "d((int*)1)") 1307Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1310Diagnostic(ErrorCode.ERR_UnsafeNeeded, "new C()"), 1313Diagnostic(ErrorCode.ERR_UnsafeNeeded, "null"), 1316Diagnostic(ErrorCode.ERR_UnsafeNeeded, "new C(null)"), 1319Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1322Diagnostic(ErrorCode.ERR_UnsafeNeeded, "(int*)1"), 1325Diagnostic(ErrorCode.ERR_UnsafeNeeded, "new C((int*)1)"), 1328Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1331Diagnostic(ErrorCode.ERR_UnsafeNeeded, "new int*[2]"), 1334Diagnostic(ErrorCode.ERR_UnsafeNeeded, "new C(new int*[2])") 1360Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1363Diagnostic(ErrorCode.ERR_UnsafeNeeded, "new C()"), 1366Diagnostic(ErrorCode.ERR_UnsafeNeeded, "null"), 1369Diagnostic(ErrorCode.ERR_UnsafeNeeded, "new C(null)"), 1372Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1375Diagnostic(ErrorCode.ERR_UnsafeNeeded, "(int*)1"), 1378Diagnostic(ErrorCode.ERR_UnsafeNeeded, "new C((int*)1)") 1405Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1408Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1411Diagnostic(ErrorCode.ERR_UnsafeNeeded, "(int*)1"), 1414Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1417Diagnostic(ErrorCode.ERR_UnsafeNeeded, "new int*[2]") 1443Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1446Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1449Diagnostic(ErrorCode.ERR_UnsafeNeeded, "(int*)1") 1475Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*") 1508Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*") 1542Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Goo"), 1546Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1549Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*")); 1592Diagnostic(ErrorCode.ERR_UnsafeNeeded, "void*"), 1595Diagnostic(ErrorCode.ERR_UnsafeNeeded, "null"), 1598Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Goo(null)") 1630Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1633Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1636Diagnostic(ErrorCode.ERR_UnsafeNeeded, "null"), 1639Diagnostic(ErrorCode.ERR_UnsafeNeeded, "M(null)"), 1642Diagnostic(ErrorCode.ERR_UnsafeNeeded, "null"), 1645Diagnostic(ErrorCode.ERR_UnsafeNeeded, "null"), 1648Diagnostic(ErrorCode.ERR_UnsafeNeeded, "M(null, null)"), 1651Diagnostic(ErrorCode.ERR_UnsafeNeeded, "this"), 1654Diagnostic(ErrorCode.ERR_UnsafeNeeded, "M(this)") 1686Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1689Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*")); 1711Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1714Diagnostic(ErrorCode.ERR_UnsafeNeeded, "null"), 1717Diagnostic(ErrorCode.ERR_UnsafeNeeded, "base") 1740Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 1743Diagnostic(ErrorCode.ERR_UnsafeNeeded, "x")); 7566Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 7572Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 7575Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int**"), 7581Diagnostic(ErrorCode.ERR_UnsafeNeeded, "void*"), 7587Diagnostic(ErrorCode.ERR_UnsafeNeeded, "void*"), 7590Diagnostic(ErrorCode.ERR_UnsafeNeeded, "void**"), 7955Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 7958Diagnostic(ErrorCode.ERR_UnsafeNeeded, "stackalloc int[1]") 8562Diagnostic(ErrorCode.ERR_UnsafeNeeded, "T*").WithLocation(8, 22), 8666Diagnostic(ErrorCode.ERR_UnsafeNeeded, "T*").WithLocation(17, 22), 8669Diagnostic(ErrorCode.ERR_UnsafeNeeded, "T*").WithLocation(10, 22), 8829Diagnostic(ErrorCode.ERR_UnsafeNeeded, "string*").WithLocation(13, 22), 8832Diagnostic(ErrorCode.ERR_UnsafeNeeded, "string*").WithLocation(10, 22), 9137Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*"), 9140Diagnostic(ErrorCode.ERR_UnsafeNeeded, "B"), 9143Diagnostic(ErrorCode.ERR_UnsafeNeeded, "base")); 9999Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(3, 11), 10002Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(7, 13), 10005Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Y").WithLocation(10, 13)); 10025Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(5, 15)); 10063Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(2, 11), 10066Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(6, 12)); 10120Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 12)); 10149Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(2, 11)); 10168Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 13)); 10187Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 13)); 10239Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 13)); 10258Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(2, 11), 10261Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 13)); 10282Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(2, 11), 10285Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(6, 12)); 10311Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(8, 13)); 10331Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(3, 11)); 10350Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 13)); 10369Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 13)); 10463Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(2, 43) 10509Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(2, 43), 10512Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 12), 10566Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(2, 43), 10578Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(2, 43), 10613Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(2, 43) 10645Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(2, 43), 10648Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 12) 10684Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(2, 43)); 10690Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(2, 43), 10757Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 5), 10760Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 9), 10763Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(9, 9), 10766Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(11, 17), 10769Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(11, 20) 10809Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 5), 10812Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 9), 10815Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(9, 9), 10818Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(11, 17), 10821Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(11, 20), 10824Diagnostic(ErrorCode.ERR_UnsafeNeeded, "x").WithLocation(11, 22), 10827Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(13, 17), 10830Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(13, 25), 10833Diagnostic(ErrorCode.ERR_UnsafeNeeded, "x").WithLocation(13, 32) 10843Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 5), 10846Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 9), 10849Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(9, 9), 10852Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(11, 17), 10855Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(11, 20), 10858Diagnostic(ErrorCode.ERR_UnsafeNeeded, "x").WithLocation(11, 22), 10861Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(13, 17), 10864Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(13, 25), 10867Diagnostic(ErrorCode.ERR_UnsafeNeeded, "x").WithLocation(13, 32) 10874Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 5), 10877Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 9), 10880Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(9, 9), 10883Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(11, 17), 10886Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(11, 20), 10889Diagnostic(ErrorCode.ERR_UnsafeNeeded, "x").WithLocation(11, 22), 10892Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(13, 17), 10895Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(13, 25), 10898Diagnostic(ErrorCode.ERR_UnsafeNeeded, "x").WithLocation(13, 32)
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (42)
Compilation\UsedAssembliesTests.cs (2)
3694Diagnostic(ErrorCode.ERR_UnsafeNeeded, "S<C0>*").WithLocation(2, 17)); 3710Diagnostic(ErrorCode.ERR_UnsafeNeeded, "S<C0>*").WithLocation(2, 17));
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), 1793Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(15, 9), 1796Diagnostic(ErrorCode.ERR_UnsafeNeeded, "ptr(1)").WithLocation(16, 13)
Symbols\GenericConstraintTests.cs (5)
6483Diagnostic(ErrorCode.ERR_UnsafeNeeded, "C<int>.E*").WithLocation(4, 30), 6486Diagnostic(ErrorCode.ERR_UnsafeNeeded, "E*").WithLocation(9, 37)); 6506Diagnostic(ErrorCode.ERR_UnsafeNeeded, "C<U>.E*").WithLocation(4, 33), 6509Diagnostic(ErrorCode.ERR_UnsafeNeeded, "C<V>.E*").WithLocation(9, 40)); 6984Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(6, 15));
Symbols\Source\ClsComplianceTests.cs (1)
409Diagnostic(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 (11)
778Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(3, 43), 781Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(8, 12)); 804Diagnostic(ErrorCode.ERR_UnsafeNeeded, "x[0]").WithLocation(10, 17)); 826Diagnostic(ErrorCode.ERR_UnsafeNeeded, "x[0]").WithLocation(10, 17), 829Diagnostic(ErrorCode.ERR_UnsafeNeeded, "x[0][0]").WithLocation(10, 17)); 834Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(3, 43), 837Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(8, 12), 840Diagnostic(ErrorCode.ERR_UnsafeNeeded, "x[0]").WithLocation(10, 17), 843Diagnostic(ErrorCode.ERR_UnsafeNeeded, "x[0][0]").WithLocation(10, 17)); 865Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(2, 43), 868Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 12)
Symbols\SymbolErrorTests.cs (13)
2836Diagnostic(ErrorCode.ERR_UnsafeNeeded, "S*"), 2839Diagnostic(ErrorCode.ERR_UnsafeNeeded, "&s"), 2842Diagnostic(ErrorCode.ERR_UnsafeNeeded, "s2")); 2866Diagnostic(ErrorCode.ERR_UnsafeNeeded, "s.x"), 2869Diagnostic(ErrorCode.ERR_UnsafeNeeded, "s.x")); 2883Diagnostic(ErrorCode.ERR_UnsafeNeeded, "buf[10]")); 2905Diagnostic(ErrorCode.ERR_UnsafeNeeded, "stackalloc int[10]").WithLocation(8, 21)); 4382Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(7, 15), 4400Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(11, 11), 4500Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(2, 21), 4506Diagnostic(ErrorCode.ERR_UnsafeNeeded, "COfIntPtr").WithLocation(9, 13), 4509Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(10, 21), 15363Diagnostic(ErrorCode.ERR_UnsafeNeeded, "ab[10]");
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (27)
Parsing\AnonymousFunctionParsingTests.cs (8)
1879Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(1, 22), 1895Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(1, 22), 1985Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(1, 22), 2013Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(1, 22), 2120Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(1, 1), 2133Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(1, 1), 2209Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(1, 22), 2219Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(1, 22),
Parsing\FileModifierParsingTests.cs (1)
735Diagnostic(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)); 4130Diagnostic(ErrorCode.ERR_UnsafeNeeded, "Test1*").WithLocation(6, 15),
Parsing\ParsingErrorRecoveryTests.cs (1)
3930Diagnostic(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 (8)
624Diagnostic(ErrorCode.ERR_UnsafeNeeded, "A*").WithLocation(1, 11)); 728Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(1, 11)); 1123Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(1, 11)); 1212Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 15)); 1357Diagnostic(ErrorCode.ERR_UnsafeNeeded, "int*").WithLocation(2, 11), 1435Diagnostic(ErrorCode.ERR_UnsafeNeeded, "X").WithLocation(6, 15)); 2149Diagnostic(ErrorCode.ERR_UnsafeNeeded, "VP").WithLocation(5, 12)); 2301Diagnostic(ErrorCode.ERR_UnsafeNeeded, "void*").WithLocation(1, 12));
Syntax\SyntaxFactoryTests.cs (2)
627Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(1, 1), 638Diagnostic(ErrorCode.ERR_UnsafeNeeded, "delegate*").WithLocation(1, 1),