3 writes to _inUnsafeRegion
Microsoft.CodeAnalysis.CSharp (3)
Binder\RefSafetyAnalysis.cs (3)
98_inUnsafeRegion = inUnsafeRegion; 141_analysis._inUnsafeRegion = inUnsafeRegion; 146_analysis._inUnsafeRegion = _previousRegion;
14 references to _inUnsafeRegion
Microsoft.CodeAnalysis.CSharp (14)
Binder\Binder.ValueChecks.cs (5)
877var inUnsafeRegion = _inUnsafeRegion; 1067Error(diagnostics, _inUnsafeRegion ? ErrorCode.WRN_EscapeVariable : ErrorCode.ERR_EscapeVariable, node, parameter); 1068return _inUnsafeRegion; 1086var inUnsafeRegion = _inUnsafeRegion; 3897bool inUnsafeRegion = _inUnsafeRegion;
Binder\Binder_Operators.cs (1)
4319diagnostics.Add(_inUnsafeRegion ? ErrorCode.WRN_MismatchedRefEscapeInTernary : ErrorCode.ERR_MismatchedRefEscapeInTernary, node.Location);
Binder\Binder_Statements.cs (4)
1563var errorCode = (rightEscape, _inUnsafeRegion) switch 1572if (!_inUnsafeRegion) 1591var errorCode = _inUnsafeRegion ? ErrorCode.WRN_RefAssignValEscapeWider : ErrorCode.ERR_RefAssignValEscapeWider; 1593if (!_inUnsafeRegion)
Binder\RefSafetyAnalysis.cs (4)
140_previousRegion = analysis._inUnsafeRegion; 229using var _1 = new UnsafeRegion(this, _inUnsafeRegion || node.HasUnsafeModifier); 267var analysis = new RefSafetyAnalysis(_compilation, localFunction, _inUnsafeRegion || localFunction.IsUnsafe, _useUpdatedEscapeRules, _diagnostics, _localEscapeScopes); 279var analysis = new RefSafetyAnalysis(_compilation, lambda, _inUnsafeRegion, _useUpdatedEscapeRules, _diagnostics, _localEscapeScopes);