47 references to CallingMethodScope
Microsoft.CodeAnalysis.CSharp (47)
Binder\Binder.ValueChecks.cs (37)
21CallingMethod = CallingMethodScope, 1072if (escapeTo is CallingMethodScope or ReturnOnlyScope) 1220CallingMethodScope => EscapeLevel.CallingMethod, 1230_ => CallingMethodScope 1244{ HasUnscopedRefAttribute: true, IsThis: false } => CallingMethodScope, 1460return CallingMethodScope; 1971uint escapeScope = CallingMethodScope; 2039uint escapeScope = CallingMethodScope; 2729GetLocalScopes(local).ValEscapeScope == CallingMethodScope) 2819var inferredDestinationValEscape = CallingMethodScope; 2922var inferredDestinationValEscape = CallingMethodScope; 3198if (escapeTo is CallingMethodScope or ReturnOnlyScope) 3312return CallingMethodScope; 3318return CallingMethodScope; 3335return CallingMethodScope; 3398return CallingMethodScope; 3488return CallingMethodScope; 3655if (escapeTo is CallingMethodScope or ReturnOnlyScope) 4015return CallingMethodScope; 4021return CallingMethodScope; 4027return CallingMethodScope; 4042return CallingMethodScope; 4050return CallingMethodScope; 4062return CallingMethodScope; 4065return CallingMethodScope; 4113return CallingMethodScope; 4272var escape = CallingMethodScope; 4320CallingMethodScope; 4416return Math.Max((range.LeftOperandOpt is { } left ? GetValEscape(left, scopeOfTheContainingExpression) : CallingMethodScope), 4417(range.RightOperandOpt is { } right ? GetValEscape(right, scopeOfTheContainingExpression) : CallingMethodScope)); 4476return CallingMethodScope; 4569var result = CallingMethodScope; 4613return CallingMethodScope; 4620return CallingMethodScope; 4637uint receiverEscapeScope = CallingMethodScope; 4665return CallingMethodScope; 4676var result = CallingMethodScope;
Binder\RefSafetyAnalysis.cs (10)
103_analysis.AddLocalScopes(local, refEscapeScope: _analysis._localScopeDepth, valEscapeScope: CallingMethodScope); 184: (CallingMethodScope, CallingMethodScope); 222: CallingMethodScope; 463CallingMethodScope; 584return typeExpression.Type.IsRefLikeOrAllowsRefLikeType() ? valEscape : CallingMethodScope; 609: symbol.GetTypeOrReturnType().IsRefLikeOrAllowsRefLikeType() ? valEscape : CallingMethodScope; 622return member.Type.IsRefLikeOrAllowsRefLikeType() ? valEscape : CallingMethodScope; 701valEscapeScope = CallingMethodScope; 723valEscapeScope = CallingMethodScope; // Consider skipping this placeholder entirely since CallingMethodScope is the fallback in GetPlaceholderScope().