30 references to Version1
Microsoft.CodeAnalysis (2)
MemorySafetyRulesVersion.cs (1)
28return version is MemorySafetyRulesVersion.Version1 or MemorySafetyRulesVersion.Version2;
Symbols\ISymbol.cs (1)
164/// Under <see cref="MemorySafetyRulesVersion.Version1"/>, symbols with pointers in their signature are considered requires-unsafe.
Microsoft.CodeAnalysis.CSharp (28)
Binder\Binder_Conversions.cs (2)
3103ReportUnsafeIfNotAllowed(syntax.Location, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version1); 3738&& ReportUnsafeIfNotAllowed(syntax, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version1))
Binder\Binder_Expressions.cs (5)
605ReportUnsafeIfNotAllowed(node, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version1); 1475bool hasErrors = constantValue is null && ReportUnsafeIfNotAllowed(node, diagnostics, sizeOfTypeOpt: type, disallowedUnder: MemorySafetyRulesVersion.Version1); 3731ReportUnsafeIfNotAllowed(argument.Syntax, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version1); 5121hasErrors = ReportUnsafeIfNotAllowed(errorLocation, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version1); 6979hasError = ReportUnsafeIfNotAllowed(node, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version1) || hasError;
Binder\Binder_Invocation.cs (2)
1352gotError = ReportUnsafeIfNotAllowed(node, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version1) || gotError; 2617bool hasErrors = ReportUnsafeIfNotAllowed(node, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version1) ||
Binder\Binder_Statements.cs (1)
191fixedBinder.ReportUnsafeIfNotAllowed(node, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version1);
Binder\Binder_Symbols.cs (3)
463if (GetUnsafeDiagnosticInfo(disallowedUnder: MemorySafetyRulesVersion.Version1, sizeOfTypeOpt: null) is CSDiagnosticInfo info) 606ReportUnsafeIfNotAllowed(node, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version1); 932ReportUnsafeIfNotAllowed(node, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version1);
Binder\Binder_Unsafe.cs (3)
267Debug.Assert(sizeOfTypeOpt is null || disallowedUnder is MemorySafetyRulesVersion.Version1); 277if (disallowedUnder is MemorySafetyRulesVersion.Version1) 320if (disallowedUnder is MemorySafetyRulesVersion.Version1)
BoundTree\UnboundLambda.cs (1)
977this.Binder.ReportUnsafeIfNotAllowed(this.ParameterLocation(i), diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version1);
CSharpCompilationOptions.cs (5)
162memorySafetyRulesVersion: MemorySafetyRulesVersion.Version1) 507=> WithMemorySafetyRulesVersion(enabled ? MemorySafetyRulesVersion.Version2 : MemorySafetyRulesVersion.Version1); 813if (MemorySafetyRulesVersion is not (MemorySafetyRulesVersion.Version1 or MemorySafetyRulesVersion.Version2)) 815builder.Add(Diagnostic.Create(MessageProvider.Instance, (int)ErrorCode.ERR_BadCompilationOptionValueAccepted, nameof(MemorySafetyRulesVersion), MemorySafetyRulesVersion, string.Join(", ", [(int)MemorySafetyRulesVersion.Version1, (int)MemorySafetyRulesVersion.Version2]))); 1035memorySafetyRulesVersion: MemorySafetyRulesVersion.Version1)
Symbols\Metadata\PE\PEModuleSymbol.cs (2)
764version != (int)MemorySafetyRulesVersion.Version1) 771: MemorySafetyRulesVersion.Version1;
Symbols\MissingModuleSymbol.cs (1)
203internal sealed override MemorySafetyRulesVersion MemorySafetyRulesVersion => MemorySafetyRulesVersion.Version1;
Symbols\Source\SourceMemberFieldSymbol.cs (1)
626binder.ReportUnsafeIfNotAllowed(declarator.Location, diagnosticsForFirstDeclarator, disallowedUnder: MemorySafetyRulesVersion.Version1);
Symbols\Source\SourceModuleSymbol.cs (2)
684if (MemorySafetyRulesVersion != MemorySafetyRulesVersion.Version1) 758: MemorySafetyRulesVersion.Version1;