58 instantiations of SourceLocation
Microsoft.CodeAnalysis (2)
Diagnostic\Location.cs (1)
165return new SourceLocation(syntaxTree, textSpan);
Syntax\SyntaxNode.cs (1)
694return !tree.SupportsLocations ? NoLocation.Singleton : new SourceLocation(this);
Microsoft.CodeAnalysis.CSharp (56)
Binder\Binder_Expressions.cs (1)
5535var loc = new SourceLocation(argSyntax.SyntaxTree, errorSpan);
Binder\Binder_Invocation.cs (1)
1425return new SourceLocation(token);
Binder\Binder_Query.cs (1)
737SourceLocation errorLocation = new SourceLocation(let.SyntaxTree, new TextSpan(let.Identifier.SpanStart, let.Expression.Span.End - let.Identifier.SpanStart));
Binder\Binder_QueryErrors.cs (4)
50new SourceLocation(queryClause)); 58symbols), new SourceLocation(fromClause != null ? fromClause.Expression : queryClause)); 66symbols), new SourceLocation(fromClause.Expression)); 74symbols), new SourceLocation(fromClause != null ? fromClause.Expression : queryClause));
Binder\Binder_Symbols.cs (1)
1783diagnostics.ReportUseSiteDiagnostic(useSiteInfo.DiagnosticInfo, new SourceLocation(syntax));
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1208SourceLocation sourceLocation = new SourceLocation(argument.Syntax);
Compilation\CSharpCompilation.cs (3)
3404new SourceLocation(syntaxTree, filterSpanWithinTree.Value) : 3405new SourceLocation(root); 4058diagnostics.Add(ErrorCode.WRN_ConflictingChecksum, new SourceLocation(checksumDirective), path);
Compiler\ClsComplianceChecker.cs (1)
666location = new SourceLocation(syntaxRef);
Compiler\DocumentationCommentCompiler.cs (1)
699Location location = new SourceLocation(trivia.SyntaxTree, new TextSpan(trivia.SpanStart, 0));
Compiler\UnprocessedDocumentationCommentFinder.cs (1)
104_diagnostics.Add(ErrorCode.WRN_UnprocessedXMLComment, new SourceLocation(trivia.SyntaxTree, new TextSpan(start, length)));
Declarations\DeclarationTreeBuilder.cs (11)
227nameLocation: new SourceLocation(container), 236var nameLocation = new SourceLocation(firstGlobalStatement.GetFirstToken()); 240nameLocation = new SourceLocation(firstGlobalStatement.GetFirstToken(includeSkipped: true)); 317directives.Add(new ReferenceDirective(directiveNode.File.ValueText, new SourceLocation(directiveNode))); 342nameLocation: new SourceLocation(parentReference), 355nameLocation: new SourceLocation(parentReference), 516nameLocation: new SourceLocation(dotted.Right), 621nameLocation: new SourceLocation(name), 804nameLocation: new SourceLocation(isExtension ? node.Keyword : node.Identifier), 852nameLocation: new SourceLocation(node.Identifier), 890nameLocation: new SourceLocation(node.Identifier),
Declarations\RootSingleNamespaceDeclaration.cs (1)
39nameLocation: new SourceLocation(treeNode),
Declarations\SingleNamespaceOrTypeDeclaration.cs (1)
39return new SourceLocation(this.SyntaxReference);
DocumentationComments\SourceDocumentationCommentUtils.cs (1)
81diagnostics.Add(ErrorCode.WRN_UnprocessedXMLComment, new SourceLocation(tree, new TextSpan(start, length)));
FlowAnalysis\ControlFlowPass.cs (5)
218var loc = new SourceLocation(leave.Syntax.GetFirstToken()); 226var loc = new SourceLocation(leave.Syntax.GetFirstToken()); 268Diagnostics.Add(ErrorCode.WRN_UnreachableCode, new SourceLocation(firstToken)); 303var location = new SourceLocation(branch.Branch.Syntax.GetFirstToken()); 381new SourceLocation(syntax), syntax.ToString());
FlowAnalysis\DefiniteAssignment.cs (2)
423location = new SourceLocation(node); 2332Diagnostics.Add(ErrorCode.ERR_FixedLocalInLambda, new SourceLocation(node.Syntax), localSymbol);
Symbols\Source\ExplicitInterfaceHelpers.cs (2)
211var location = new SourceLocation(explicitInterfaceSyntax); 227var location = new SourceLocation(explicitInterfaceSyntax);
Symbols\Source\SourceCustomEventSymbol.cs (1)
223_explicitInterfaceType.CheckAllConstraints(DeclaringCompilation, conversions, new SourceLocation(explicitInterfaceSpecifier.Name), diagnostics);
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
283diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, new SourceLocation(arglistToken));
Symbols\Source\SourceMemberContainerSymbol.cs (2)
6066diagnostics.Add(ErrorCode.ERR_GlobalStatement, new SourceLocation(globalStatement)); 6092diagnostics.Add(errorCode, new SourceLocation(locationSyntax));
Symbols\Source\SourceMemberFieldSymbol.cs (1)
194var errorLocation = new SourceLocation(firstIdentifier);
Symbols\Source\SourceNamedTypeSymbol.cs (1)
206var location = new SourceLocation(tp.Identifier);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (3)
230return new SourceLocation(b); 520var location = new SourceLocation(typeSyntax); 680diagnostics.Add(ErrorCode.ERR_ObjectCantHaveBases, new SourceLocation(name));
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
35var location = new SourceLocation(nameToken); 1133_explicitInterfaceType.CheckAllConstraints(DeclaringCompilation, conversions, new SourceLocation(syntax.ExplicitInterfaceSpecifier.Name), diagnostics);
Symbols\Source\SourceParameterSymbol.cs (1)
47var location = new SourceLocation(name == "" ? syntax.Type : identifier);
Symbols\Source\SourcePropertySymbolBase.cs (1)
1035_explicitInterfaceType.CheckAllConstraints(compilation, conversions, new SourceLocation(explicitInterfaceSpecifier.Name), diagnostics);
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (2)
337diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, new SourceLocation(arglistToken)); 1031_explicitInterfaceType.CheckAllConstraints(DeclaringCompilation, conversions, new SourceLocation(name), diagnostics);
Syntax\CSharpSyntaxNode.cs (1)
195return new SourceLocation(this);
Syntax\CSharpSyntaxTree.cs (1)
761return new SourceLocation(this, span);
Syntax\SyntaxTreeDiagnosticEnumerator.cs (1)
60yield return new CSDiagnostic(sdi, new SourceLocation(syntaxTree, TextSpan.FromBounds(spanStart, spanEnd)));
58 references to SourceLocation
Microsoft.CodeAnalysis (3)
Diagnostic\SourceLocation.cs (3)
15internal sealed class SourceLocation : Location, IEquatable<SourceLocation?> 108public bool Equals(SourceLocation? other) 120return this.Equals(obj as SourceLocation);
Microsoft.CodeAnalysis.CSharp (55)
Binder\Binder_Expressions.cs (1)
5535var loc = new SourceLocation(argSyntax.SyntaxTree, errorSpan);
Binder\Binder_Invocation.cs (2)
1413private static SourceLocation GetCallerLocation(SyntaxNode syntax) 1691var callerSourceLocation = enableCallerInfo ? GetCallerLocation(syntax) : null;
Binder\Binder_Query.cs (1)
737SourceLocation errorLocation = new SourceLocation(let.SyntaxTree, new TextSpan(let.Identifier.SpanStart, let.Expression.Span.End - let.Identifier.SpanStart));
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1208SourceLocation sourceLocation = new SourceLocation(argument.Syntax);
Compilation\CSharpCompilation.cs (1)
3399SourceLocation? location = null;
Declarations\DeclarationTreeBuilder.cs (1)
236var nameLocation = new SourceLocation(firstGlobalStatement.GetFirstToken());
Declarations\MergedNamespaceDeclaration.cs (1)
71SourceLocation loc = decl.NameLocation;
Declarations\MergedTypeDeclaration.cs (2)
188public OneOrMany<SourceLocation> NameLocations 195var builder = ArrayBuilder<SourceLocation>.GetInstance(Declarations.Length);
Declarations\SingleNamespaceDeclaration.cs (2)
18SourceLocation nameLocation, 68SourceLocation nameLocation,
Declarations\SingleNamespaceDeclarationEx.cs (1)
18SyntaxReference syntaxReference, SourceLocation nameLocation,
Declarations\SingleNamespaceOrTypeDeclaration.cs (4)
14private readonly SourceLocation _nameLocation; 26SourceLocation nameLocation, 35public SourceLocation Location 51public SourceLocation NameLocation
Declarations\SingleTypeDeclaration.cs (1)
84SourceLocation nameLocation,
FlowAnalysis\ControlFlowPass.cs (3)
218var loc = new SourceLocation(leave.Syntax.GetFirstToken()); 226var loc = new SourceLocation(leave.Syntax.GetFirstToken()); 303var location = new SourceLocation(branch.Branch.Syntax.GetFirstToken());
Symbols\MergedNamespaceSymbol.cs (1)
120internal override void ForceComplete(SourceLocation locationOpt, Predicate<Symbol> filter, CancellationToken cancellationToken)
Symbols\NamespaceOrTypeSymbol.cs (1)
227var loc = declaration.NameLocation;
Symbols\Source\ExplicitInterfaceHelpers.cs (2)
211var location = new SourceLocation(explicitInterfaceSyntax); 227var location = new SourceLocation(explicitInterfaceSyntax);
Symbols\Source\SourceAssemblySymbol.cs (1)
906internal override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1574internal override void ForceComplete(SourceLocation locationOpt, Predicate<Symbol> filter, CancellationToken cancellationToken)
Symbols\Source\SourceConstructorSymbol.cs (1)
277internal sealed override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceEnumConstantSymbol.cs (1)
101internal sealed override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceEventSymbol.cs (1)
76internal override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceFieldLikeEventSymbol.cs (1)
219internal override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceMemberContainerSymbol.cs (1)
574internal override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceMemberFieldSymbol.cs (3)
194var errorLocation = new SourceLocation(firstIdentifier); 268static bool reportBadMemberFlagIfAny(DeclarationModifiers result, DeclarationModifiers modifier, BindingDiagnosticBag diagnostics, SourceLocation errorLocation) 281internal sealed override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceMemberMethodSymbol.cs (1)
877internal override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceModuleSymbol.cs (1)
226internal override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
206var location = new SourceLocation(tp.Identifier);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (6)
118var location = singleDeclaration.NameLocation; 164var location = singleDeclaration.NameLocation; 212private SourceLocation FindBaseRefSyntax(NamedTypeSymbol baseSym) 294SourceLocation baseTypeLocation = null; 296var interfaceLocations = SpecializedSymbolCollections.GetPooledSymbolDictionaryInstance<NamedTypeSymbol, SourceLocation>(); 520var location = new SourceLocation(typeSyntax);
Symbols\Source\SourceNamespaceSymbol_Completion.cs (1)
13internal override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
35var location = new SourceLocation(nameToken); 442internal sealed override void ForceComplete(SourceLocation locationOpt, Predicate<Symbol> filter, CancellationToken cancellationToken)
Symbols\Source\SourceParameterSymbol.cs (2)
47var location = new SourceLocation(name == "" ? syntax.Type : identifier); 173internal override void ForceComplete(SourceLocation locationOpt, Predicate<Symbol> filter, CancellationToken cancellationToken)
Symbols\Source\SourcePropertySymbol.cs (1)
166internal override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourcePropertySymbolBase.cs (1)
1784internal override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceTypeParameterSymbol.cs (1)
350internal override void ForceComplete(SourceLocation locationOpt, Predicate<Symbol> filter, CancellationToken cancellationToken)
Symbols\Symbol.cs (2)
50internal virtual void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken) 965internal static void ForceCompleteMemberConditionally(SourceLocation? locationOpt, Predicate<Symbol>? filter, Symbol member, CancellationToken cancellationToken)
Symbols\Tuples\TupleFieldSymbol.cs (1)
148internal override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)