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);
3186
escapeTo = escapeTo.Union(
GetValEscape
(argument, localScopeDepth));
3199
inferredDestinationValEscape = inferredDestinationValEscape.Intersect(
GetValEscape
(argument, localScopeDepth));
3243
var toArgEscape =
GetValEscape
(mixableArg.Argument, localScopeDepth);
3287
:
GetValEscape
(fromArg, localScopeDepth));
4304
valEscape =
GetValEscape
(element, localScopeDepth);
4390
return
GetValEscape
(placeholder.Receiver, placeholder.LocalScopeDepth);
4399
var consEscape =
GetValEscape
(conditional.Consequence, localScopeDepth);
4409
return consEscape.Intersect(
GetValEscape
(conditional.Alternative, localScopeDepth));
4414
return
GetValEscape
(coalescingOp.LeftOperand, localScopeDepth)
4415
.Intersect(
GetValEscape
(coalescingOp.RightOperand, localScopeDepth));
4428
return
GetValEscape
(fieldAccess.ReceiverOpt, localScopeDepth);
4535
escape = escape.Intersect(
GetValEscape
(initializerOpt, localScopeDepth));
4550
escape = escape.Intersect(
GetValEscape
(initializerOpt, localScopeDepth));
4559
return
GetValEscape
(withExpression.Receiver, localScopeDepth)
4560
.Intersect(
GetValEscape
(withExpression.InitializerExpression, localScopeDepth));
4572
return
GetValEscape
(unaryOperator.Operand, localScopeDepth);
4613
return
GetValEscape
(conversion.Operand, localScopeDepth);
4620
return
GetValEscape
(((BoundAssignmentOperator)expr).Right, localScopeDepth);
4623
return
GetValEscape
(((BoundNullCoalescingAssignmentOperator)expr).RightOperand, localScopeDepth);
4645
return
GetValEscape
(increment.Operand, localScopeDepth);
4663
return
GetValEscape
(compound.Left, localScopeDepth);
4667
return
GetValEscape
(compound.Left, localScopeDepth)
4668
.Intersect(
GetValEscape
(compound.Right, localScopeDepth));
4681
return
GetValEscape
(binary.Left, localScopeDepth)
4682
.Intersect(
GetValEscape
(binary.Right, localScopeDepth));
4687
return (range.LeftOperandOpt is { } left ?
GetValEscape
(left, localScopeDepth) : SafeContext.CallingMethod)
4688
.Intersect(range.RightOperandOpt is { } right ?
GetValEscape
(right, localScopeDepth) : SafeContext.CallingMethod);
4699
return
GetValEscape
(((BoundQueryClause)expr).Value, localScopeDepth);
4702
return
GetValEscape
(((BoundRangeVariable)expr).Value, localScopeDepth);
4820
narrowestScope = narrowestScope.Intersect(
GetValEscape
(element, localScopeDepth));
4835
:
GetValEscape
(expr, localScopeDepth));
4866
:
GetValEscape
(assignment.Right, localScopeDepth);
4884
result =
GetValEscape
(expr, localScopeDepth);
4938
:
GetValEscape
(escapeValue.Argument, localScopeDepth);
4968
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));
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);