18 references to Version2
Microsoft.CodeAnalysis (2)
MemorySafetyRulesVersion.cs (1)
28return version is MemorySafetyRulesVersion.Version1 or MemorySafetyRulesVersion.Version2;
Symbols\ISymbol.cs (1)
165/// Under <see cref="MemorySafetyRulesVersion.Version2"/>, symbols marked <see langword="unsafe"/> are considered requires-unsafe.
Microsoft.CodeAnalysis.CSharp (16)
Binder\Binder_Expressions.cs (2)
7681ReportUnsafeIfNotAllowed(node.OperatorToken.GetLocation(), diagnostics, MemorySafetyRulesVersion.Version2); 10300ReportUnsafeIfNotAllowed(node.ArgumentList.OpenBracketToken.GetLocation(), diagnostics, MemorySafetyRulesVersion.Version2);
Binder\Binder_Invocation.cs (1)
2618ReportUnsafeIfNotAllowed(node, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version2);
Binder\Binder_Operators.cs (1)
4091ReportUnsafeIfNotAllowed(node.OperatorToken.GetLocation(), diagnostics, MemorySafetyRulesVersion.Version2);
Binder\Binder_Unsafe.cs (4)
118ReportUnsafeIfNotAllowed(arg, location, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version2, 175ReportUnsafeIfNotAllowed(node, diagnostics, disallowedUnder: MemorySafetyRulesVersion.Version2, customErrorCode: ErrorCode.ERR_UnsafeUninitializedStackAlloc); 299Debug.Assert(disallowedUnder is MemorySafetyRulesVersion.Version2); 328Debug.Assert(disallowedUnder is MemorySafetyRulesVersion.Version2);
CSharpCompilationOptions.cs (4)
507=> WithMemorySafetyRulesVersion(enabled ? MemorySafetyRulesVersion.Version2 : MemorySafetyRulesVersion.Version1); 509internal bool UseUpdatedMemorySafetyRules => MemorySafetyRulesVersion == MemorySafetyRulesVersion.Version2; 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])));
SymbolDisplay\SymbolDisplayVisitor.Members.cs (1)
968symbol.ContainingModule.MemorySafetyRulesVersion == MemorySafetyRulesVersion.Version2)
Symbols\Metadata\PE\PEUtilities.cs (1)
29((int)MemorySafetyRulesVersion.Version2).ToString(CultureInfo.InvariantCulture));
Symbols\ModuleSymbol.cs (1)
326internal bool UseUpdatedMemorySafetyRules => MemorySafetyRulesVersion == MemorySafetyRulesVersion.Version2;
Symbols\Source\SourceModuleSymbol.cs (1)
757? MemorySafetyRulesVersion.Version2