4 types derived from SourceLocalSymbol
Microsoft.CodeAnalysis.CSharp (4)
Symbols\Source\SourceLocalSymbol.cs (4)
512
private sealed class LocalWithInitializer :
SourceLocalSymbol
621
private sealed class ForEachLocalSymbol :
SourceLocalSymbol
660
private sealed class DeconstructionLocalSymbol :
SourceLocalSymbol
723
private sealed class LocalSymbolWithEnclosingContext :
SourceLocalSymbol
3 instantiations of SourceLocalSymbol
Microsoft.CodeAnalysis.CSharp (3)
Symbols\Source\SourceLocalSymbol.cs (3)
149
: new
SourceLocalSymbol
(containingSymbol, scopeBinder, allowRefKind: false, allowScoped: true, closestTypeSyntax, identifierToken, kind);
180
: new
SourceLocalSymbol
(containingSymbol, scopeBinder, allowRefKind: false, allowScoped: true, typeSyntax, identifierToken, kind);
214
: new
SourceLocalSymbol
(containingSymbol, scopeBinder, allowRefKind: allowRefKind, allowScoped: allowScoped, typeSyntax, identifierToken, declarationKind);
65 references to SourceLocalSymbol
Microsoft.CodeAnalysis.CSharp (65)
Binder\Binder.ValueChecks.cs (5)
2762
private bool ShouldInferDeclarationExpressionValEscape(BoundExpression argument, [NotNullWhen(true)] out
SourceLocalSymbol
? localSymbol)
2770
if (symbol is
SourceLocalSymbol
local &&
2781
Debug.Assert(symbol is null or
SourceLocalSymbol
or GlobalExpressionVariable);
2877
if (ShouldInferDeclarationExpressionValEscape(argument, out
var
localSymbol))
2969
if (ShouldInferDeclarationExpressionValEscape(argument, out
var
localSymbol))
Binder\Binder_Deconstruct.cs (1)
870
SourceLocalSymbol
localSymbol = LookupLocal(designation.Identifier);
Binder\Binder_Expressions.cs (2)
2032
else if ((localSymbol as
SourceLocalSymbol
)?.IsVar == true && localSymbol.ForbiddenZone?.Contains(node) == true)
3151
SourceLocalSymbol
localSymbol = this.LookupLocal(designation.Identifier);
Binder\Binder_Patterns.cs (1)
879
SourceLocalSymbol
localSymbol = this.LookupLocal(identifier);
Binder\Binder_Statements.cs (6)
973
SourceLocalSymbol
localSymbol,
1194
private
SourceLocalSymbol
LocateDeclaredVariableSymbol(VariableDeclaratorSyntax declarator, TypeSyntax typeSyntax, LocalDeclarationKind outerKind)
1200
private
SourceLocalSymbol
LocateDeclaredVariableSymbol(SyntaxToken identifier, TypeSyntax typeSyntax, EqualsValueClauseSyntax equalsValue, LocalDeclarationKind kind)
1202
SourceLocalSymbol
localSymbol = this.LookupLocal(identifier);
1208
localSymbol =
SourceLocalSymbol
.MakeLocal(
1848
protected virtual
SourceLocalSymbol
LookupLocal(SyntaxToken nameToken)
Binder\BuckStopsHereBinder.cs (1)
53
protected override
SourceLocalSymbol
? LookupLocal(SyntaxToken nameToken)
Binder\CatchClauseBinder.cs (1)
34
locals.Add(
SourceLocalSymbol
.MakeLocal(this.ContainingMemberOrLambda, this, allowRefKind: false, allowScoped: false, declarationOpt.Type, declarationOpt.Identifier, LocalDeclarationKind.CatchVariable, initializer: null));
Binder\ExpressionVariableFinder.cs (3)
607
return
SourceLocalSymbol
.MakeLocalSymbolWithEnclosingContext(
629
return
SourceLocalSymbol
.MakeLocalSymbolWithEnclosingContext(
654
return
SourceLocalSymbol
.MakeDeconstructionLocal(
Binder\ForEachLoopBinder.cs (7)
29
private
SourceLocalSymbol
IterationVariable
33
return (_syntax.Kind() == SyntaxKind.ForEachStatement) ? (
SourceLocalSymbol
)this.Locals[0] : null;
88
var
iterationVariable =
SourceLocalSymbol
.MakeForeachLocal(
150
SourceLocalSymbol
localSymbol =
SourceLocalSymbol
.MakeDeconstructionLocal(
313
SourceLocalSymbol
local = this.IterationVariable;
Binder\ForLoopBinder.cs (1)
48
var
localSymbol = MakeLocal(_syntax.Declaration, vdecl, LocalDeclarationKind.RegularVariable, allowScoped: true);
Binder\InContainerBinder.cs (1)
136
protected override
SourceLocalSymbol
LookupLocal(SyntaxToken nameToken)
Binder\InMethodBinder.cs (1)
59
protected override
SourceLocalSymbol
LookupLocal(SyntaxToken nameToken)
Binder\LocalScopeBinder.cs (6)
216
var
localSymbol = MakeLocal(decl.Declaration, vdecl, kind, allowScoped: true, localDeclarationBinder);
331
protected
SourceLocalSymbol
MakeLocal(VariableDeclarationSyntax declaration, VariableDeclaratorSyntax declarator, LocalDeclarationKind kind, bool allowScoped, Binder initializerBinderOpt = null)
333
return
SourceLocalSymbol
.MakeLocal(
381
protected override
SourceLocalSymbol
LookupLocal(SyntaxToken nameToken)
386
if (result.IdentifierToken == nameToken) return (
SourceLocalSymbol
)result;
393
return (
SourceLocalSymbol
)local;
Binder\RefSafetyAnalysis.cs (2)
484
var
localSymbol = (
SourceLocalSymbol
)node.LocalSymbol;
Binder\WithExternAliasesBinder.cs (1)
62
protected sealed override
SourceLocalSymbol
? LookupLocal(SyntaxToken nameToken)
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
218
protected override
SourceLocalSymbol
? LookupLocal(SyntaxToken nameToken)
BoundTree\NullabilityRewriter.cs (2)
141
case
SourceLocalSymbol
local:
186
Symbol remapLocal(
SourceLocalSymbol
local)
BoundTree\VariablePendingInference.cs (2)
51
var
localSymbol = (
SourceLocalSymbol
)this.VariableSymbol;
Compilation\CSharpSemanticModel.cs (2)
3282
return (local is
SourceLocalSymbol
{ DeclarationKind: LocalDeclarationKind.ForEachIterationVariable } sourceLocal
3294
internal abstract LocalSymbol GetAdjustedLocalSymbol(
SourceLocalSymbol
originalSymbol);
Compilation\MemberSemanticModel.cs (2)
700
return GetAdjustedLocalSymbol((
SourceLocalSymbol
)local);
709
internal override LocalSymbol GetAdjustedLocalSymbol(
SourceLocalSymbol
local)
Compilation\SpeculativeSemanticModelWithMemberModel.cs (1)
340
internal override LocalSymbol GetAdjustedLocalSymbol(
SourceLocalSymbol
local)
Compilation\SyntaxTreeSemanticModel.cs (1)
1870
internal override LocalSymbol GetAdjustedLocalSymbol(
SourceLocalSymbol
originalSymbol)
FlowAnalysis\DefiniteAssignment.cs (1)
2354
if ((localSymbol as
SourceLocalSymbol
)?.IsVar == true && localSymbol.ForbiddenZone?.Contains(node.Syntax) == true)
FlowAnalysis\NullableWalker.cs (2)
3021
if (local is
SourceLocalSymbol
{ IsVar: true } && local.ForbiddenZone?.Contains(node.Syntax) == true)
11113
else if (iterationVariable is
SourceLocalSymbol
{ IsVar: true })
FlowAnalysis\NullableWalker.SnapshotManager.cs (1)
60
internal TypeWithAnnotations? GetUpdatedTypeForLocalSymbol(
SourceLocalSymbol
symbol)
FlowAnalysis\NullableWalker_Patterns.cs (1)
681
if (variableAccess is BoundLocal { LocalSymbol:
SourceLocalSymbol
local } boundLocal)
Symbols\Source\SourceLocalSymbol.cs (4)
108
public static
SourceLocalSymbol
MakeForeachLocal(
135
public static
SourceLocalSymbol
MakeDeconstructionLocal(
200
public static
SourceLocalSymbol
MakeLocal(
499
return obj is
SourceLocalSymbol
symbol
Symbols\UpdatedContainingSymbolLocal.cs (6)
18
internal static UpdatedContainingSymbolAndNullableAnnotationLocal CreateForTest(
SourceLocalSymbol
underlyingLocal, Symbol updatedContainingSymbol, TypeWithAnnotations updatedType)
23
private UpdatedContainingSymbolAndNullableAnnotationLocal(
SourceLocalSymbol
underlyingLocal, Symbol updatedContainingSymbol, TypeWithAnnotations updatedType, bool assertContaining)
34
internal UpdatedContainingSymbolAndNullableAnnotationLocal(
SourceLocalSymbol
underlyingLocal, Symbol updatedContainingSymbol, TypeWithAnnotations updatedType)
39
private readonly
SourceLocalSymbol
_underlyingLocal;
55
SourceLocalSymbol
? otherSource = otherLocal switch
58
SourceLocalSymbol
source => source,