38 references to CallingMethodScope
Microsoft.CodeAnalysis.CSharp (38)
Binder\Binder.ValueChecks.cs (32)
24CallingMethod = CallingMethodScope, 878if (escapeTo is CallingMethodScope or ReturnOnlyScope) 1028CallingMethodScope => EscapeLevel.CallingMethod, 1038_ => CallingMethodScope 1052{ HasUnscopedRefAttribute: true, IsThis: false } => CallingMethodScope, 1062Debug.Assert(escapeTo is CallingMethodScope or ReturnOnlyScope); 1269return CallingMethodScope; 1776uint escapeScope = CallingMethodScope; 1841uint escapeScope = CallingMethodScope; 2396GetLocalScopes(local).ValEscapeScope == CallingMethodScope) 2488var inferredDestinationValEscape = CallingMethodScope; 2589var inferredDestinationValEscape = CallingMethodScope; 2807if (escapeTo is CallingMethodScope or ReturnOnlyScope) 2917return CallingMethodScope; 2923return CallingMethodScope; 2940return CallingMethodScope; 3003return CallingMethodScope; 3089return CallingMethodScope; 3188if (escapeTo is CallingMethodScope or ReturnOnlyScope) 3475return CallingMethodScope; 3481return CallingMethodScope; 3487return CallingMethodScope; 3502return CallingMethodScope; 3510return CallingMethodScope; 3522return CallingMethodScope; 3525return CallingMethodScope; 3573return CallingMethodScope; 3740return Math.Max((range.LeftOperandOpt is { } left ? GetValEscape(left, scopeOfTheContainingExpression) : CallingMethodScope), 3741(range.RightOperandOpt is { } right ? GetValEscape(right, scopeOfTheContainingExpression) : CallingMethodScope)); 3792return CallingMethodScope; 3829var result = CallingMethodScope; 3855var result = CallingMethodScope;
Binder\RefSafetyAnalysis.cs (6)
118_analysis.AddLocalScopes(local, refEscapeScope: _analysis._localScopeDepth, valEscapeScope: CallingMethodScope); 258ValidateEscape(value, CallingMethodScope, isByRef: field.RefKind != RefKind.None, _diagnostics); 405CallingMethodScope; 507return typeExpression.Type.IsRefLikeType ? valEscape : CallingMethodScope; 532: symbol.GetTypeOrReturnType().IsRefLikeType() ? valEscape : CallingMethodScope; 545return member.Type.IsRefLikeType ? valEscape : CallingMethodScope;