3 writes to _inUnsafeRegion
Microsoft.CodeAnalysis.CSharp (3)
Binder\RefSafetyAnalysis.cs (3)
87_inUnsafeRegion = inUnsafeRegion; 133_analysis._inUnsafeRegion = inUnsafeRegion; 138_analysis._inUnsafeRegion = _previousRegion;
15 references to _inUnsafeRegion
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder.ValueChecks.cs (6)
1354var inUnsafeRegion = _inUnsafeRegion; 1541Error(diagnostics, _inUnsafeRegion ? ErrorCode.WRN_EscapeVariable : ErrorCode.ERR_EscapeVariable, node, parameter); 1542return _inUnsafeRegion; 1560var inUnsafeRegion = _inUnsafeRegion; 5003bool inUnsafeRegion = _inUnsafeRegion; 5781Error(diagnostics, _inUnsafeRegion ? ErrorCode.WRN_EscapeVariable : ErrorCode.ERR_EscapeVariable, initExpr.Syntax, expr.Syntax);
Binder\Binder_Operators.cs (1)
5990diagnostics.Add(_inUnsafeRegion ? ErrorCode.WRN_MismatchedRefEscapeInTernary : ErrorCode.ERR_MismatchedRefEscapeInTernary, node.Location);
Binder\Binder_Statements.cs (4)
1573var errorCode = (rightEscape, _inUnsafeRegion) switch 1582if (!_inUnsafeRegion) 1602var errorCode = _inUnsafeRegion ? ErrorCode.WRN_RefAssignValEscapeWider : ErrorCode.ERR_RefAssignValEscapeWider; 1604if (!_inUnsafeRegion)
Binder\RefSafetyAnalysis.cs (4)
132_previousRegion = analysis._inUnsafeRegion; 300using var _1 = new UnsafeRegion(this, _inUnsafeRegion || node.HasUnsafeModifier); 372var analysis = new RefSafetyAnalysis(_compilation, localFunction, node, _inUnsafeRegion || localFunction.IsUnsafe, _useUpdatedEscapeRules, _diagnostics); 381var analysis = new RefSafetyAnalysis(_compilation, lambda, node, _inUnsafeRegion, _useUpdatedEscapeRules, _diagnostics);