60 references to GetValEscape
Microsoft.CodeAnalysis.CSharp (60)
Binder\Binder.ValueChecks.cs (41)
1742
return
GetValEscape
(fieldAccess.ReceiverOpt, localScopeDepth);
2184
SafeContext escapeScope =
GetValEscape
(data.Construction, localScopeDepth);
2261
(false, false) =>
GetValEscape
(argument, localScopeDepth),
2281
escapeScope = escapeScope.Intersect(
GetValEscape
(methodInvocationInfo.Receiver, localScopeDepth));
2317
GetValEscape
(argument, localScopeDepth);
2346
:
GetValEscape
(argument, localScopeDepth);
3180
escapeTo = escapeTo.Union(
GetValEscape
(argument, localScopeDepth));
3193
inferredDestinationValEscape = inferredDestinationValEscape.Intersect(
GetValEscape
(argument, localScopeDepth));
3237
var toArgEscape =
GetValEscape
(mixableArg.Argument, localScopeDepth);
3281
:
GetValEscape
(fromArg, localScopeDepth));
4278
valEscape =
GetValEscape
(element, localScopeDepth);
4364
return
GetValEscape
(placeholder.Receiver, placeholder.LocalScopeDepth);
4373
var consEscape =
GetValEscape
(conditional.Consequence, localScopeDepth);
4383
return consEscape.Intersect(
GetValEscape
(conditional.Alternative, localScopeDepth));
4388
return
GetValEscape
(coalescingOp.LeftOperand, localScopeDepth)
4389
.Intersect(
GetValEscape
(coalescingOp.RightOperand, localScopeDepth));
4402
return
GetValEscape
(fieldAccess.ReceiverOpt, localScopeDepth);
4499
escape = escape.Intersect(
GetValEscape
(initializerOpt, localScopeDepth));
4514
escape = escape.Intersect(
GetValEscape
(initializerOpt, localScopeDepth));
4523
return
GetValEscape
(withExpression.Receiver, localScopeDepth)
4524
.Intersect(
GetValEscape
(withExpression.InitializerExpression, localScopeDepth));
4536
return
GetValEscape
(unaryOperator.Operand, localScopeDepth);
4577
return
GetValEscape
(conversion.Operand, localScopeDepth);
4584
return
GetValEscape
(((BoundAssignmentOperator)expr).Right, localScopeDepth);
4587
return
GetValEscape
(((BoundNullCoalescingAssignmentOperator)expr).RightOperand, localScopeDepth);
4609
return
GetValEscape
(increment.Operand, localScopeDepth);
4627
return
GetValEscape
(compound.Left, localScopeDepth);
4631
return
GetValEscape
(compound.Left, localScopeDepth)
4632
.Intersect(
GetValEscape
(compound.Right, localScopeDepth));
4645
return
GetValEscape
(binary.Left, localScopeDepth)
4646
.Intersect(
GetValEscape
(binary.Right, localScopeDepth));
4651
return (range.LeftOperandOpt is { } left ?
GetValEscape
(left, localScopeDepth) : SafeContext.CallingMethod)
4652
.Intersect(range.RightOperandOpt is { } right ?
GetValEscape
(right, localScopeDepth) : SafeContext.CallingMethod);
4663
return
GetValEscape
(((BoundQueryClause)expr).Value, localScopeDepth);
4666
return
GetValEscape
(((BoundRangeVariable)expr).Value, localScopeDepth);
4784
narrowestScope = narrowestScope.Intersect(
GetValEscape
(element, localScopeDepth));
4799
:
GetValEscape
(expr, localScopeDepth));
4830
:
GetValEscape
(assignment.Right, localScopeDepth);
4848
result =
GetValEscape
(expr, localScopeDepth);
4902
:
GetValEscape
(escapeValue.Argument, localScopeDepth);
4932
result = result.Intersect(
GetValEscape
(expression, localScopeDepth));
Binder\Binder_Operators.cs (2)
5807
SafeContext whenTrueEscape =
GetValEscape
(trueExpr, currentScope);
5808
SafeContext whenFalseEscape =
GetValEscape
(falseExpr, currentScope);
Binder\Binder_Statements.cs (3)
1584
leftEscape =
GetValEscape
(op1, _localScopeDepth);
1585
rightEscape =
GetValEscape
(op2, _localScopeDepth);
1624
var leftEscape =
GetValEscape
(op1, _localScopeDepth);
Binder\RefSafetyAnalysis.cs (14)
391
?
GetValEscape
(expr, _localScopeDepth)
436
using var _2 = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
445
using var _ = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
546
valEscapeScope =
GetValEscape
(initializer, _localScopeDepth);
617
using var _ = new PatternInput(this,
GetValEscape
(node.Expression, _localScopeDepth));
850
valEscapeScope = receiver.GetRefKind().IsWritableReference() ? GetRefEscape(receiver, _localScopeDepth) :
GetValEscape
(receiver, _localScopeDepth);
878
valEscapeScope =
GetValEscape
(arguments[argIndex], _localScopeDepth);
956
var escapeFrom =
GetValEscape
(node.InitializerExpressionOpt, _localScopeDepth);
976
if (!escapeFrom.IsConvertibleTo(
GetValEscape
(argument, _localScopeDepth)))
1036
GetAwaitableInstancePlaceholders(placeholders, node.AwaitableInfo,
GetValEscape
(node.Expression, _localScopeDepth));
1104
placeholders.Add((conversion.DeconstructionInfo.InputPlaceholder, SafeContextAndLocation.Create(
GetValEscape
(right, _localScopeDepth))));
1117
?
GetValEscape
(variable.Expression, _localScopeDepth)
1172
: new DeconstructionVariable(expr,
GetValEscape
(expr, _localScopeDepth), null);
1218
collectionEscape =
GetValEscape
(node.Expression, _localScopeDepth);