49 references to GetValEscape
Microsoft.CodeAnalysis.CSharp (49)
Binder\Binder.ValueChecks.cs (32)
1521
return
GetValEscape
(fieldAccess.ReceiverOpt, localScopeDepth);
1963
SafeContext escapeScope =
GetValEscape
(data.Construction, localScopeDepth);
2080
escapeScope = escapeScope.Intersect(
GetValEscape
(receiver, localScopeDepth));
4113
valEscape =
GetValEscape
(element, localScopeDepth);
4199
return
GetValEscape
(placeholder.Receiver, placeholder.LocalScopeDepth);
4208
var consEscape =
GetValEscape
(conditional.Consequence, localScopeDepth);
4218
return consEscape.Intersect(
GetValEscape
(conditional.Alternative, localScopeDepth));
4223
return
GetValEscape
(coalescingOp.LeftOperand, localScopeDepth)
4224
.Intersect(
GetValEscape
(coalescingOp.RightOperand, localScopeDepth));
4237
return
GetValEscape
(fieldAccess.ReceiverOpt, localScopeDepth);
4382
escape = escape.Intersect(
GetValEscape
(initializerOpt, localScopeDepth));
4397
escape = escape.Intersect(
GetValEscape
(initializerOpt, localScopeDepth));
4406
return
GetValEscape
(withExpression.Receiver, localScopeDepth)
4407
.Intersect(
GetValEscape
(withExpression.InitializerExpression, localScopeDepth));
4425
return
GetValEscape
(unaryOperator.Operand, localScopeDepth);
4478
return
GetValEscape
(conversion.Operand, localScopeDepth);
4485
return
GetValEscape
(((BoundAssignmentOperator)expr).Right, localScopeDepth);
4488
return
GetValEscape
(((BoundNullCoalescingAssignmentOperator)expr).RightOperand, localScopeDepth);
4491
return
GetValEscape
(((BoundIncrementOperator)expr).Operand, localScopeDepth);
4515
return
GetValEscape
(compound.Left, localScopeDepth);
4519
return
GetValEscape
(compound.Left, localScopeDepth)
4520
.Intersect(
GetValEscape
(compound.Right, localScopeDepth));
4539
return
GetValEscape
(binary.Left, localScopeDepth)
4540
.Intersect(
GetValEscape
(binary.Right, localScopeDepth));
4545
return (range.LeftOperandOpt is { } left ?
GetValEscape
(left, localScopeDepth) : SafeContext.CallingMethod)
4546
.Intersect(range.RightOperandOpt is { } right ?
GetValEscape
(right, localScopeDepth) : SafeContext.CallingMethod);
4563
return
GetValEscape
(((BoundQueryClause)expr).Value, localScopeDepth);
4566
return
GetValEscape
(((BoundRangeVariable)expr).Value, localScopeDepth);
4684
narrowestScope = narrowestScope.Intersect(
GetValEscape
(element, localScopeDepth));
4716
:
GetValEscape
(assignment.Right, localScopeDepth);
4734
result =
GetValEscape
(expr, localScopeDepth);
4814
result = result.Intersect(
GetValEscape
(expression, localScopeDepth));
Binder\Binder_Operators.cs (2)
5772
SafeContext whenTrueEscape =
GetValEscape
(trueExpr, currentScope);
5773
SafeContext whenFalseEscape =
GetValEscape
(falseExpr, currentScope);
Binder\Binder_Statements.cs (3)
1584
leftEscape =
GetValEscape
(op1, _localScopeDepth);
1585
rightEscape =
GetValEscape
(op2, _localScopeDepth);
1609
var leftEscape =
GetValEscape
(op1, _localScopeDepth);
Binder\RefSafetyAnalysis.cs (12)
350
?
GetValEscape
(expr, _localScopeDepth)
395
using var _2 = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
404
using var _ = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
505
valEscapeScope =
GetValEscape
(initializer, _localScopeDepth);
593
using var _ = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
761
valEscapeScope = receiver.GetRefKind().IsWritableReference() ? GetRefEscape(receiver, _localScopeDepth) :
GetValEscape
(receiver, _localScopeDepth);
774
valEscapeScope =
GetValEscape
(arguments[argIndex], _localScopeDepth);
853
var escapeFrom =
GetValEscape
(node.InitializerExpressionOpt, _localScopeDepth);
949
GetAwaitableInstancePlaceholders(placeholders, node.AwaitableInfo,
GetValEscape
(node.Expression, _localScopeDepth));
1010
placeholders.Add((conversion.DeconstructionInfo.InputPlaceholder,
GetValEscape
(right, _localScopeDepth)));
1083
: new DeconstructionVariable(expr,
GetValEscape
(expr, _localScopeDepth), null);
1135
collectionEscape =
GetValEscape
(node.Expression, _localScopeDepth);