1 instantiation of LookupResult
Microsoft.CodeAnalysis.CSharp (1)
Binder\LookupResult.cs (1)
304pool = new ObjectPool<LookupResult>(() => new LookupResult(pool), 128); // we rarely need more than 10
168 references to LookupResult
Microsoft.CodeAnalysis.CSharp (164)
Binder\Binder.CapturedParametersFinder.cs (1)
146protected override bool CheckAndClearLookupResult(Binder enclosingBinder, IdentifierNameSyntax id, LookupResult lookupResult)
Binder\Binder.IdentifierUsedAsValueFinder.cs (4)
19private LookupResult? _lookupResult; 197_lookupResult ??= LookupResult.GetInstance(); 205protected abstract bool CheckAndClearLookupResult(Binder enclosingBinder, IdentifierNameSyntax id, LookupResult lookupResult); 257LookupResult lookupResult)
Binder\Binder.WithQueryLambdaParametersBinder.cs (3)
93LookupResult lookupResult = LookupResult.GetInstance(); 105LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\Binder_Attributes.cs (2)
597LookupResult result = LookupResult.GetInstance();
Binder\Binder_Crefs.cs (2)
344LookupResult result = LookupResult.GetInstance();
Binder\Binder_Expressions.cs (30)
1481var lookupResult = LookupResult.GetInstance(); 1594var lookupResult = LookupResult.GetInstance(); 1728void reportPrimaryConstructorParameterShadowing(SimpleNameSyntax node, Symbol symbol, string name, bool invoked, LookupResult lookupResult, ArrayBuilder<Symbol> members, BindingDiagnosticBag diagnostics) 1789private void LookupIdentifier(LookupResult lookupResult, SimpleNameSyntax node, bool invoked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1794private void LookupIdentifier(LookupResult lookupResult, string name, int arity, bool invoked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 2007var lookupResult = LookupResult.GetInstance(); 2398var result = LookupResult.GetInstance(); 7652var lookupResult = LookupResult.GetInstance(); 7755LookupResult lookupResult, 7829LookupResult lookupResult, 7937var lookupResult = LookupResult.GetInstance(); 8002private void LookupInstanceMember(LookupResult lookupResult, TypeSymbol leftType, bool leftIsBaseReference, string rightName, int rightArity, bool invoked, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 8227LookupResult lookupResult, 8476var lookupResult = LookupResult.GetInstance(); 8496private void LookupExtensionMethods(LookupResult lookupResult, ExtensionMethodScope scope, string rightName, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 8848private Symbol GetSymbolOrMethodOrPropertyGroup(LookupResult result, SyntaxNode node, string plainName, int arity, ArrayBuilder<Symbol> methodOrPropertyGroup, BindingDiagnosticBag diagnostics, out bool wasError, NamespaceOrTypeSymbol qualifierOpt) 9586LookupResult lookupResult = LookupResult.GetInstance(); 10011var lookupResult = LookupResult.GetInstance(); 10145var lookupResult = LookupResult.GetInstance(); 10167LookupResult lookupResult,
Binder\Binder_Invocation.cs (2)
2331var lookupResult = LookupResult.GetInstance();
Binder\Binder_Lookup.cs (62)
28LookupResult result, 47internal void LookupExtensionMethods(LookupResult result, string name, int arity, LookupOptions options, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 61private Binder LookupSymbolsWithFallback(LookupResult result, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default) 82LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 92var tmp = LookupResult.GetInstance(); 116LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 126LookupResult result, 148private void LookupMembersWithFallback(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo, ConsList<TypeSymbol> basesBeingResolved = null, LookupOptions options = LookupOptions.Default) 164protected void LookupMembersInternal(LookupResult result, NamespaceOrTypeSymbol nsOrType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 180protected void LookupMembersInType(LookupResult result, TypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 220private void LookupMembersInErrorType(LookupResult result, ErrorTypeSymbol errorType, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 255protected void LookupMembersInSubmissions(LookupResult result, TypeSymbol submissionClass, CompilationUnitSyntax declarationSyntax, bool inUsings, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, 258LookupResult submissionSymbols = LookupResult.GetInstance(); 259LookupResult nonViable = LookupResult.GetInstance(); 307result.SetFrom(LookupResult.Good(error)); // force lookup to be done w/ error symbol as result 401LookupResult result, 443private static void LookupMembersInNamespace(LookupResult result, NamespaceSymbol ns, string name, int arity, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 460private void LookupExtensionMethodsInSingleBinder(ExtensionMethodScope scope, LookupResult result, string name, int arity, LookupOptions options, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 488LookupResult result, 526LookupResult resultWithSuffix = null; 532resultWithSuffix = LookupResult.GetInstance(); 587private bool IsAmbiguousResult(LookupResult result, out Symbol resultSymbol) 668private bool IsSingleViableAttributeType(LookupResult result, out Symbol symbol, ref CompoundUseSiteInfo<AssemblySymbol> attributeTypeViabilityUseSiteInfo) 691return LookupResult.NotAnAttributeType(symbol, diagInfo); 763protected static void LookupMembersWithoutInheritance(LookupResult result, TypeSymbol type, string name, int arity, 779LookupResult result, 794LookupResult result, 810var tmp = LookupResult.GetInstance(); 841result.SetFrom(LookupResult.Good(error)); // force lookup to be done w/ error symbol as result 874LookupResult result, 910var tmp = LookupResult.GetInstance(); 1013LookupResult current, 1116LookupResult current, 1129var tmp = LookupResult.GetInstance(); 1150private void LookupMembersInInterface(LookupResult current, NamedTypeSymbol type, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1159var tmp = LookupResult.GetInstance(); 1168private void LookupMembersInTypeParameter(LookupResult current, TypeParameterSymbol typeParameter, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1224private void MergeHidingLookupResults(LookupResult resultHiding, LookupResult resultHidden, ConsList<TypeSymbol> basesBeingResolved, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 1400return LookupResult.Empty(); 1404return LookupResult.Empty(); 1409return LookupResult.Empty(); 1414return LookupResult.Empty(); 1418return LookupResult.WrongArity(symbol, diagInfo); 1428return LookupResult.NotReferencable(symbol, diagInfo); 1432return LookupResult.NotTypeOrNamespace(unwrappedSymbol, symbol, diagnose); 1437return LookupResult.NotInvocable(unwrappedSymbol, symbol, diagnose); 1443return LookupResult.Inaccessible(symbol, diagInfo); 1469return LookupResult.Inaccessible(symbol, diagInfo); 1474return LookupResult.NotReferencable(symbol, diagInfo); 1479return LookupResult.StaticInstanceMismatch(symbol, diagInfo); 1484return LookupResult.StaticInstanceMismatch(symbol, diagInfo); 1489return LookupResult.NotTypeOrNamespace(symbol, diagInfo); 1494return LookupResult.NotLabel(symbol, diagInfo); 1498return LookupResult.Good(symbol);
Binder\Binder_Statements.cs (2)
474var result = LookupResult.GetInstance();
Binder\Binder_Symbols.cs (16)
199var lookupResult = LookupResult.GetInstance(); 363var result = LookupResult.GetInstance(); 871var result = LookupResult.GetInstance(); 951static bool isViableType(LookupResult result) 972static bool isViableNamespace(LookupResult result) 1274var lookupResult = LookupResult.GetInstance(); 1422LookupResult lookupResult, 1444LookupResult tempLookupResult = null; 1525ref LookupResult lookupResult, 1539lookupResult ??= LookupResult.GetInstance(); 1903LookupResult result, 1932LookupResult result,
Binder\Binder_XmlNameAttribute.cs (2)
30var lookupResult = LookupResult.GetInstance();
Binder\ForEachLoopBinder.cs (6)
1333var lookupResult = LookupResult.GetInstance(); 1352private MethodArgumentInfo FindForEachPatternMethod(SyntaxNode syntax, SyntaxNode collectionSyntax, TypeSymbol patternType, string methodName, LookupResult lookupResult, bool warningsOnly, BindingDiagnosticBag diagnostics, bool isAsync) 1617LookupResult lookupResult = LookupResult.GetInstance(); 1858private void ReportPatternMemberLookupDiagnostics(SyntaxNode collectionSyntax, LookupResult lookupResult, TypeSymbol patternType, string memberName, bool warningsOnly, BindingDiagnosticBag diagnostics)
Binder\HostObjectModeBinder.cs (1)
33LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\InContainerBinder.cs (2)
104LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 122result.SetFrom(LookupResult.Good(error)); // force lookup to be done w/ error symbol as result
Binder\InMethodBinder.cs (1)
194LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\InSubmissionClassBinder.cs (1)
48LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\LocalScopeBinder.cs (2)
422LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 435result.MergeEqual(LookupResult.Good(labelSymbol));
Binder\LookupResult.cs (10)
73private readonly ObjectPool<LookupResult> _pool; 75private LookupResult(ObjectPool<LookupResult> pool) 227internal void SetFrom(LookupResult other) 243internal void MergePrioritized(LookupResult other) 256internal void MergeEqual(LookupResult other) 298private static readonly ObjectPool<LookupResult> s_poolInstance = CreatePool(); 301internal static ObjectPool<LookupResult> CreatePool() 303ObjectPool<LookupResult> pool = null; 304pool = new ObjectPool<LookupResult>(() => new LookupResult(pool), 128); // we rarely need more than 10 308internal static LookupResult GetInstance()
Binder\NameofBinder.cs (3)
60internal override void LookupSymbolsInSingleBinder(LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo) 81var tmp = LookupResult.GetInstance();
Binder\WithExternAliasesBinder.cs (1)
33LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithExternAndUsingAliasesBinder.cs (1)
37LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithLambdaParametersBinder.cs (1)
87LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithParametersBinder.cs (1)
46LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithPrimaryConstructorParametersBinder.cs (1)
64LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithTypeParametersBinder.cs (1)
39LookupResult result, string name, int arity, ConsList<TypeSymbol> basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
Binder\WithUsingNamespacesAndTypesBinder.cs (1)
133LookupResult result, string name, int arity, ConsList<TypeSymbol>? basesBeingResolved, LookupOptions options, Binder originalBinder, bool diagnose, ref CompoundUseSiteInfo<AssemblySymbol> useSiteInfo)
BoundTree\BoundMethodGroup.cs (1)
19LookupResult lookupResult,
Compilation\CSharpSemanticModel.cs (4)
1657var lookupResult = LookupResult.GetInstance(); 1733var lookupResult = LookupResult.GetInstance();
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (2)
Semantics\LookupTests.cs (2)
438var lookupResult = LookupResult.GetInstance(); 585var lookupResult = LookupResult.GetInstance();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (2)
Compilation\SemanticModelGetDeclaredSymbolAPITests.cs (1)
2174var lookupResult = LookupResult.GetInstance();
DocumentationComments\CrefTests.cs (1)
5518var lookupResult = LookupResult.GetInstance();