3 writes to _inUnsafeRegion
Microsoft.CodeAnalysis.CSharp (3)
Binder\RefSafetyAnalysis.cs (3)
92_inUnsafeRegion = inUnsafeRegion; 138_analysis._inUnsafeRegion = inUnsafeRegion; 143_analysis._inUnsafeRegion = _previousRegion;
15 references to _inUnsafeRegion
Microsoft.CodeAnalysis.CSharp (15)
Binder\Binder_Operators.cs (1)
6093diagnostics.Add(_inUnsafeRegion ? ErrorCode.WRN_MismatchedRefEscapeInTernary : ErrorCode.ERR_MismatchedRefEscapeInTernary, node.Location);
Binder\Binder_Statements.cs (4)
1574var errorCode = (rightEscape, _inUnsafeRegion) switch 1583if (!_inUnsafeRegion) 1603var errorCode = _inUnsafeRegion ? ErrorCode.WRN_RefAssignValEscapeWider : ErrorCode.ERR_RefAssignValEscapeWider; 1605if (!_inUnsafeRegion)
Binder\Binder.ValueChecks.cs (6)
1368var inUnsafeRegion = _inUnsafeRegion; 1555Error(diagnostics, _inUnsafeRegion ? ErrorCode.WRN_EscapeVariable : ErrorCode.ERR_EscapeVariable, node, parameter); 1556return _inUnsafeRegion; 1574var inUnsafeRegion = _inUnsafeRegion; 5063bool inUnsafeRegion = _inUnsafeRegion; 5849Error(diagnostics, _inUnsafeRegion ? ErrorCode.WRN_EscapeVariable : ErrorCode.ERR_EscapeVariable, initExpr.Syntax, expr.Syntax);
Binder\RefSafetyAnalysis.cs (4)
137_previousRegion = analysis._inUnsafeRegion; 305using var _1 = new UnsafeRegion(this, _inUnsafeRegion || node.HasUnsafeModifier); 377var inUnsafeRegion = !Binder.IsIteratorBodyWithSafeContext(_compilation, isIteratorBody: localFunction.IsIterator) && (_inUnsafeRegion || localFunction.IntroducesUnsafeContext); 387var analysis = new RefSafetyAnalysis(_compilation, lambda, node, _inUnsafeRegion, _useUpdatedEscapeRules, _diagnostics);