59 references to ERR_SizeofUnsafe
Microsoft.CodeAnalysis.CSharp (2)
Binder\Binder_Unsafe.cs (1)
272
: new CSDiagnosticInfo(ErrorCode.
ERR_SizeofUnsafe
, sizeOfTypeOpt);
Errors\ErrorFacts.cs (1)
817
or ErrorCode.
ERR_SizeofUnsafe
Microsoft.CodeAnalysis.CSharp.CSharp15.UnitTests (3)
UnsafeEvolutionTests.cs (3)
2874
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(2, 5),
2877
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(S)").WithArguments("S").WithLocation(3, 5));
2922
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(string)").WithArguments("string").WithLocation(1, 5),
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (8)
Emit\NumericIntPtrTests.cs (8)
1307
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(System.IntPtr)").WithArguments("nint").WithLocation(5, 13),
1310
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(System.UIntPtr)").WithArguments("nuint").WithLocation(6, 13),
1313
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(7, 13),
1316
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nuint)").WithArguments("nuint").WithLocation(8, 13));
1402
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(6, 22),
1405
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nuint)").WithArguments("nuint").WithLocation(7, 22),
1408
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(System.IntPtr)").WithArguments("nint").WithLocation(8, 22),
1411
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(System.UIntPtr)").WithArguments("nuint").WithLocation(9, 22)
Microsoft.CodeAnalysis.CSharp.IOperation.UnitTests (5)
IOperation\IOperationTests_ISizeOfExpression.cs (5)
65
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(C)").WithArguments("C").WithLocation(8, 23)
132
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(UndefinedType)").WithArguments("UndefinedType").WithLocation(8, 23)
171
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(i)").WithArguments("i").WithLocation(8, 23)
223
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(M2").WithArguments("M2").WithLocation(8, 23)
271
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof()").WithArguments("?").WithLocation(8, 23)
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (41)
Semantics\ImplicitObjectCreationTests.cs (1)
2817
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(").WithArguments("?").WithLocation(6, 13),
Semantics\LocalFunctionTests.cs (2)
8328
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(TParameter)").WithArguments("TParameter").WithLocation(8, 36),
8331
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(TParameter)").WithArguments("TParameter").WithLocation(11, 29)
Semantics\NativeIntegerTests.cs (6)
4318
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(System.IntPtr)").WithArguments("System.IntPtr").WithLocation(5, 13),
4321
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(System.UIntPtr)").WithArguments("System.UIntPtr").WithLocation(6, 13),
4324
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(7, 13),
4327
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nuint)").WithArguments("nuint").WithLocation(8, 13));
4400
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(6, 22),
4403
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nuint)").WithArguments("nuint").WithLocation(7, 22)
Semantics\SemanticErrorTests.cs (1)
8636
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(S)").WithArguments("S"),
Semantics\UnsafeTests.cs (31)
934
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(6, 25)
1225
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(5, 16)
1313
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(5, 22));
1333
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(6, 26));
1387
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(5, 22)
1413
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(6, 26)
1508
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(5, 16)
1596
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(5, 22));
1632
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(5, 22)
1731
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(5, 22),
1826
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(5, 28),
1875
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(5, 28)
1900
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(5, 28),
2002
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(5, 22),
2097
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(5, 28),
2146
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(5, 28)
2171
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(5, 28),
2307
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(4, 12)
2393
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(4, 18));
2431
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(6, 22)
2507
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(3, 12)
2620
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(nint)").WithArguments("nint").WithLocation(3, 18)
4245
d => !d.Code.Equals((int)ErrorCode.ERR_UnsafeNeeded) && !d.Code.Equals((int)ErrorCode.
ERR_SizeofUnsafe
));
4284
d => !d.Code.Equals((int)ErrorCode.ERR_UnsafeNeeded) && !d.Code.Equals((int)ErrorCode.
ERR_SizeofUnsafe
));
10488
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(S)").WithArguments("S"));
10514
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(int*)").WithArguments("int*"),
10523
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(int**)").WithArguments("int**"),
10529
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(void*)").WithArguments("void*"),
10538
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(void**)").WithArguments("void**")
10559
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(S)").WithArguments("S").WithLocation(6, 22)
10682
Diagnostic(ErrorCode.
ERR_SizeofUnsafe
, "sizeof(").WithArguments("?"));