3 writes to _inUnsafeRegion
Microsoft.CodeAnalysis.CSharp (3)
Binder\RefSafetyAnalysis.cs (3)
82_inUnsafeRegion = inUnsafeRegion; 124_analysis._inUnsafeRegion = inUnsafeRegion; 129_analysis._inUnsafeRegion = _previousRegion;
15 references to _inUnsafeRegion
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder.ValueChecks.cs (6)
1075var inUnsafeRegion = _inUnsafeRegion; 1262Error(diagnostics, _inUnsafeRegion ? ErrorCode.WRN_EscapeVariable : ErrorCode.ERR_EscapeVariable, node, parameter); 1263return _inUnsafeRegion; 1281var inUnsafeRegion = _inUnsafeRegion; 4741bool inUnsafeRegion = _inUnsafeRegion; 5562Error(diagnostics, _inUnsafeRegion ? ErrorCode.WRN_EscapeVariable : ErrorCode.ERR_EscapeVariable, initExpr.Syntax, expr.Syntax);
Binder\Binder_Operators.cs (1)
4396diagnostics.Add(_inUnsafeRegion ? ErrorCode.WRN_MismatchedRefEscapeInTernary : ErrorCode.ERR_MismatchedRefEscapeInTernary, node.Location);
Binder\Binder_Statements.cs (4)
1556var errorCode = (rightEscape, _inUnsafeRegion) switch 1565if (!_inUnsafeRegion) 1585var errorCode = _inUnsafeRegion ? ErrorCode.WRN_RefAssignValEscapeWider : ErrorCode.ERR_RefAssignValEscapeWider; 1587if (!_inUnsafeRegion)
Binder\RefSafetyAnalysis.cs (4)
123_previousRegion = analysis._inUnsafeRegion; 251using var _1 = new UnsafeRegion(this, _inUnsafeRegion || node.HasUnsafeModifier); 312var analysis = new RefSafetyAnalysis(_compilation, localFunction, _inUnsafeRegion || localFunction.IsUnsafe, _useUpdatedEscapeRules, _diagnostics); 321var analysis = new RefSafetyAnalysis(_compilation, lambda, _inUnsafeRegion, _useUpdatedEscapeRules, _diagnostics);