68 references to GetValEscape
Microsoft.CodeAnalysis.CSharp (68)
Binder\Binder.ValueChecks.cs (47)
1792
return
GetValEscape
(fieldAccess.ReceiverOpt);
2243
SafeContext escapeScope =
GetValEscape
(data.Construction);
2319
(false, false) =>
GetValEscape
(argument),
2339
escapeScope = escapeScope.Intersect(
GetValEscape
(methodInvocationInfo.Receiver));
2374
GetValEscape
(argument);
2402
:
GetValEscape
(argument);
3237
escapeTo = escapeTo.Union(
GetValEscape
(argument));
3250
inferredDestinationValEscape = inferredDestinationValEscape.Intersect(
GetValEscape
(argument));
3293
var toArgEscape =
GetValEscape
(mixableArg.Argument);
3337
:
GetValEscape
(fromArg));
4341
valEscape =
GetValEscape
(element);
4430
return
GetValEscape
(placeholder.Receiver);
4439
var consEscape =
GetValEscape
(conditional.Consequence);
4449
return consEscape.Intersect(
GetValEscape
(conditional.Alternative));
4454
return
GetValEscape
(coalescingOp.LeftOperand)
4455
.Intersect(
GetValEscape
(coalescingOp.RightOperand));
4468
return
GetValEscape
(fieldAccess.ReceiverOpt);
4567
escape = escape.Intersect(
GetValEscape
(initializerOpt));
4582
escape = escape.Intersect(
GetValEscape
(initializerOpt));
4591
return
GetValEscape
(withExpression.Receiver)
4592
.Intersect(
GetValEscape
(withExpression.InitializerExpression));
4603
return
GetValEscape
(unaryOperator.Operand);
4640
return
GetValEscape
(conversion.Operand);
4644
return
GetValEscape
(((BoundAssignmentOperator)expr).Right);
4648
return
GetValEscape
(nullCoalescingAssignment.LeftOperand)
4649
.Intersect(
GetValEscape
(nullCoalescingAssignment.RightOperand));
4670
return
GetValEscape
(increment.Operand);
4687
return
GetValEscape
(compound.Left);
4691
return
GetValEscape
(compound.Left)
4692
.Intersect(
GetValEscape
(compound.Right));
4704
return
GetValEscape
(binary.Left)
4705
.Intersect(
GetValEscape
(binary.Right));
4710
return (range.LeftOperandOpt is { } left ?
GetValEscape
(left) : SafeContext.CallingMethod)
4711
.Intersect(range.RightOperandOpt is { } right ?
GetValEscape
(right) : SafeContext.CallingMethod);
4721
return
GetValEscape
(((BoundQueryClause)expr).Value);
4724
return
GetValEscape
(((BoundRangeVariable)expr).Value);
4824
return
GetValEscape
(expr.CollectionCreation);
4828
?
GetValEscape
(collectionCreation)
4864
safeContext =
GetValEscape
(spreadElement.Expression);
4872
safeContext =
GetValEscape
(elementExpression);
4886
narrowestScope = narrowestScope.Intersect(
GetValEscape
(element));
4900
:
GetValEscape
(expr));
4931
:
GetValEscape
(assignment.Right);
4949
result =
GetValEscape
(expr);
5003
:
GetValEscape
(escapeValue.Argument);
5033
result = result.Intersect(
GetValEscape
(expression));
5054
Debug.Assert(
GetValEscape
(expr).IsConvertibleTo(escapeTo));
Binder\Binder_Operators.cs (2)
6029
SafeContext whenTrueEscape =
GetValEscape
(trueExpr);
6030
SafeContext whenFalseEscape =
GetValEscape
(falseExpr);
Binder\Binder_Statements.cs (3)
1590
leftEscape =
GetValEscape
(op1);
1591
rightEscape =
GetValEscape
(op2);
1630
var leftEscape =
GetValEscape
(op1);
Binder\RefSafetyAnalysis.cs (16)
411
?
GetValEscape
(expr)
456
using var _2 = new PatternInput(this,
GetValEscape
(node.Expression));
465
using var _ = new PatternInput(this,
GetValEscape
(node.Expression));
566
valEscapeScope =
GetValEscape
(initializer);
636
using var _ = new PatternInput(this,
GetValEscape
(node.Expression));
897
valEscapeScope = receiver.GetRefKind().IsWritableReference() ? GetRefEscape(receiver) :
GetValEscape
(receiver);
925
valEscapeScope =
GetValEscape
(arguments[argIndex]);
987
var escapeFrom =
GetValEscape
(node.InitializerExpressionOpt);
1030
if (!initializerEscape.IsConvertibleTo(
GetValEscape
(argument)))
1087
GetAwaitableInstancePlaceholders(placeholders, node.AwaitableInfo,
GetValEscape
(node.Expression));
1155
placeholders.Add((conversion.DeconstructionInfo.InputPlaceholder, SafeContextAndLocation.Create(
GetValEscape
(right))));
1168
?
GetValEscape
(variable.Expression)
1233
: new DeconstructionVariable(expr,
GetValEscape
(expr), null);
1278
collectionEscape =
GetValEscape
(node.Expression);
1346
receiverScope =
GetValEscape
(collectionCreation);
1375
spreadPlaceholders.Add((spreadElement.ElementPlaceholder, SafeContextAndLocation.Create(
GetValEscape
(spreadElement.Expression))));