3 writes to _inUnsafeRegion
Microsoft.CodeAnalysis.CSharp (3)
Binder\RefSafetyAnalysis.cs (3)
83_inUnsafeRegion = inUnsafeRegion; 126_analysis._inUnsafeRegion = inUnsafeRegion; 131_analysis._inUnsafeRegion = _previousRegion;
15 references to _inUnsafeRegion
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder.ValueChecks.cs (6)
1071var inUnsafeRegion = _inUnsafeRegion; 1258Error(diagnostics, _inUnsafeRegion ? ErrorCode.WRN_EscapeVariable : ErrorCode.ERR_EscapeVariable, node, parameter); 1259return _inUnsafeRegion; 1277var inUnsafeRegion = _inUnsafeRegion; 4722bool inUnsafeRegion = _inUnsafeRegion; 5543Error(diagnostics, _inUnsafeRegion ? ErrorCode.WRN_EscapeVariable : ErrorCode.ERR_EscapeVariable, initExpr.Syntax, expr.Syntax);
Binder\Binder_Operators.cs (1)
4389diagnostics.Add(_inUnsafeRegion ? ErrorCode.WRN_MismatchedRefEscapeInTernary : ErrorCode.ERR_MismatchedRefEscapeInTernary, node.Location);
Binder\Binder_Statements.cs (4)
1553var errorCode = (rightEscape, _inUnsafeRegion) switch 1562if (!_inUnsafeRegion) 1581var errorCode = _inUnsafeRegion ? ErrorCode.WRN_RefAssignValEscapeWider : ErrorCode.ERR_RefAssignValEscapeWider; 1583if (!_inUnsafeRegion)
Binder\RefSafetyAnalysis.cs (4)
125_previousRegion = analysis._inUnsafeRegion; 253using var _1 = new UnsafeRegion(this, _inUnsafeRegion || node.HasUnsafeModifier); 317var analysis = new RefSafetyAnalysis(_compilation, localFunction, _inUnsafeRegion || localFunction.IsUnsafe, _useUpdatedEscapeRules, _diagnostics, _localEscapeScopes); 329var analysis = new RefSafetyAnalysis(_compilation, lambda, _inUnsafeRegion, _useUpdatedEscapeRules, _diagnostics, _localEscapeScopes);