12 references to ReportUnsafeIfNotAllowed
Microsoft.CodeAnalysis.CSharp (12)
Binder\Binder_Conversions.cs (2)
3115
ReportUnsafeIfNotAllowed
(syntax, diagnostics, disallowedUnder: MemorySafetyRules.Updated, customErrorCode: ErrorCode.ERR_UnsafeUninitializedStackAlloc);
3747
&&
ReportUnsafeIfNotAllowed
(syntax, diagnostics, disallowedUnder: MemorySafetyRules.Legacy))
Binder\Binder_Expressions.cs (4)
605
ReportUnsafeIfNotAllowed
(node, diagnostics, disallowedUnder: MemorySafetyRules.Legacy);
1472
bool hasErrors = constantValue is null &&
ReportUnsafeIfNotAllowed
(node, diagnostics, sizeOfTypeOpt: type, disallowedUnder: MemorySafetyRules.Legacy);
3728
ReportUnsafeIfNotAllowed
(argument.Syntax, diagnostics, disallowedUnder: MemorySafetyRules.Legacy);
6963
hasError =
ReportUnsafeIfNotAllowed
(node, diagnostics, disallowedUnder: MemorySafetyRules.Legacy) || hasError;
Binder\Binder_Invocation.cs (3)
1327
gotError =
ReportUnsafeIfNotAllowed
(node, diagnostics, disallowedUnder: MemorySafetyRules.Legacy) || gotError;
2592
bool hasErrors =
ReportUnsafeIfNotAllowed
(node, diagnostics, disallowedUnder: MemorySafetyRules.Legacy) ||
2593
ReportUnsafeIfNotAllowed
(node, diagnostics, disallowedUnder: MemorySafetyRules.Updated);
Binder\Binder_Statements.cs (1)
191
fixedBinder.
ReportUnsafeIfNotAllowed
(node, diagnostics, disallowedUnder: MemorySafetyRules.Legacy);
Binder\Binder_Symbols.cs (2)
606
ReportUnsafeIfNotAllowed
(node, diagnostics, disallowedUnder: MemorySafetyRules.Legacy);
932
ReportUnsafeIfNotAllowed
(node, diagnostics, disallowedUnder: MemorySafetyRules.Legacy);