60 references to GetValEscape
Microsoft.CodeAnalysis.CSharp (60)
Binder\Binder.ValueChecks.cs (41)
1744
return
GetValEscape
(fieldAccess.ReceiverOpt, localScopeDepth);
2186
SafeContext escapeScope =
GetValEscape
(data.Construction, localScopeDepth);
2263
(false, false) =>
GetValEscape
(argument, localScopeDepth),
2283
escapeScope = escapeScope.Intersect(
GetValEscape
(methodInvocationInfo.Receiver, localScopeDepth));
2319
GetValEscape
(argument, localScopeDepth);
2348
:
GetValEscape
(argument, localScopeDepth);
3188
escapeTo = escapeTo.Union(
GetValEscape
(argument, localScopeDepth));
3201
inferredDestinationValEscape = inferredDestinationValEscape.Intersect(
GetValEscape
(argument, localScopeDepth));
3245
var toArgEscape =
GetValEscape
(mixableArg.Argument, localScopeDepth);
3289
:
GetValEscape
(fromArg, localScopeDepth));
4306
valEscape =
GetValEscape
(element, localScopeDepth);
4392
return
GetValEscape
(placeholder.Receiver, placeholder.LocalScopeDepth);
4401
var consEscape =
GetValEscape
(conditional.Consequence, localScopeDepth);
4411
return consEscape.Intersect(
GetValEscape
(conditional.Alternative, localScopeDepth));
4416
return
GetValEscape
(coalescingOp.LeftOperand, localScopeDepth)
4417
.Intersect(
GetValEscape
(coalescingOp.RightOperand, localScopeDepth));
4430
return
GetValEscape
(fieldAccess.ReceiverOpt, localScopeDepth);
4537
escape = escape.Intersect(
GetValEscape
(initializerOpt, localScopeDepth));
4552
escape = escape.Intersect(
GetValEscape
(initializerOpt, localScopeDepth));
4561
return
GetValEscape
(withExpression.Receiver, localScopeDepth)
4562
.Intersect(
GetValEscape
(withExpression.InitializerExpression, localScopeDepth));
4574
return
GetValEscape
(unaryOperator.Operand, localScopeDepth);
4615
return
GetValEscape
(conversion.Operand, localScopeDepth);
4622
return
GetValEscape
(((BoundAssignmentOperator)expr).Right, localScopeDepth);
4625
return
GetValEscape
(((BoundNullCoalescingAssignmentOperator)expr).RightOperand, localScopeDepth);
4647
return
GetValEscape
(increment.Operand, localScopeDepth);
4665
return
GetValEscape
(compound.Left, localScopeDepth);
4669
return
GetValEscape
(compound.Left, localScopeDepth)
4670
.Intersect(
GetValEscape
(compound.Right, localScopeDepth));
4683
return
GetValEscape
(binary.Left, localScopeDepth)
4684
.Intersect(
GetValEscape
(binary.Right, localScopeDepth));
4689
return (range.LeftOperandOpt is { } left ?
GetValEscape
(left, localScopeDepth) : SafeContext.CallingMethod)
4690
.Intersect(range.RightOperandOpt is { } right ?
GetValEscape
(right, localScopeDepth) : SafeContext.CallingMethod);
4701
return
GetValEscape
(((BoundQueryClause)expr).Value, localScopeDepth);
4704
return
GetValEscape
(((BoundRangeVariable)expr).Value, localScopeDepth);
4822
narrowestScope = narrowestScope.Intersect(
GetValEscape
(element, localScopeDepth));
4837
:
GetValEscape
(expr, localScopeDepth));
4868
:
GetValEscape
(assignment.Right, localScopeDepth);
4886
result =
GetValEscape
(expr, localScopeDepth);
4940
:
GetValEscape
(escapeValue.Argument, localScopeDepth);
4970
result = result.Intersect(
GetValEscape
(expression, localScopeDepth));
Binder\Binder_Operators.cs (2)
5839
SafeContext whenTrueEscape =
GetValEscape
(trueExpr, currentScope);
5840
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));
879
valEscapeScope = receiver.GetRefKind().IsWritableReference() ? GetRefEscape(receiver, _localScopeDepth) :
GetValEscape
(receiver, _localScopeDepth);
907
valEscapeScope =
GetValEscape
(arguments[argIndex], _localScopeDepth);
985
var escapeFrom =
GetValEscape
(node.InitializerExpressionOpt, _localScopeDepth);
1005
if (!escapeFrom.IsConvertibleTo(
GetValEscape
(argument, _localScopeDepth)))
1065
GetAwaitableInstancePlaceholders(placeholders, node.AwaitableInfo,
GetValEscape
(node.Expression, _localScopeDepth));
1133
placeholders.Add((conversion.DeconstructionInfo.InputPlaceholder, SafeContextAndLocation.Create(
GetValEscape
(right, _localScopeDepth))));
1146
?
GetValEscape
(variable.Expression, _localScopeDepth)
1212
: new DeconstructionVariable(expr,
GetValEscape
(expr, _localScopeDepth), null);
1258
collectionEscape =
GetValEscape
(node.Expression, _localScopeDepth);