18 references to Version2
Microsoft.CodeAnalysis (2)
MemorySafetyRulesVersion.cs (1)
28
return 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)
7681
ReportUnsafeIfNotAllowed(node.OperatorToken.GetLocation(), diagnostics, MemorySafetyRulesVersion.
Version2
);
10300
ReportUnsafeIfNotAllowed(node.ArgumentList.OpenBracketToken.GetLocation(), diagnostics, MemorySafetyRulesVersion.
Version2
);
Binder\Binder_Invocation.cs (1)
2618
ReportUnsafeIfNotAllowed(node, diagnostics, disallowedUnder: MemorySafetyRulesVersion.
Version2
);
Binder\Binder_Operators.cs (1)
4091
ReportUnsafeIfNotAllowed(node.OperatorToken.GetLocation(), diagnostics, MemorySafetyRulesVersion.
Version2
);
Binder\Binder_Unsafe.cs (4)
118
ReportUnsafeIfNotAllowed(arg, location, diagnostics, disallowedUnder: MemorySafetyRulesVersion.
Version2
,
175
ReportUnsafeIfNotAllowed(node, diagnostics, disallowedUnder: MemorySafetyRulesVersion.
Version2
, customErrorCode: ErrorCode.ERR_UnsafeUninitializedStackAlloc);
299
Debug.Assert(disallowedUnder is MemorySafetyRulesVersion.
Version2
);
328
Debug.Assert(disallowedUnder is MemorySafetyRulesVersion.
Version2
);
CSharpCompilationOptions.cs (4)
507
=> WithMemorySafetyRulesVersion(enabled ? MemorySafetyRulesVersion.
Version2
: MemorySafetyRulesVersion.Version1);
509
internal bool UseUpdatedMemorySafetyRules => MemorySafetyRulesVersion == MemorySafetyRulesVersion.
Version2
;
813
if (MemorySafetyRulesVersion is not (MemorySafetyRulesVersion.Version1 or MemorySafetyRulesVersion.
Version2
))
815
builder.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)
968
symbol.ContainingModule.MemorySafetyRulesVersion == MemorySafetyRulesVersion.
Version2
)
Symbols\Metadata\PE\PEUtilities.cs (1)
29
((int)MemorySafetyRulesVersion.
Version2
).ToString(CultureInfo.InvariantCulture));
Symbols\ModuleSymbol.cs (1)
326
internal bool UseUpdatedMemorySafetyRules => MemorySafetyRulesVersion == MemorySafetyRulesVersion.
Version2
;
Symbols\Source\SourceModuleSymbol.cs (1)
757
? MemorySafetyRulesVersion.
Version2