79 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 (65)
Binder\Binder_Expressions.cs (1)
5372var loc = new SourceLocation(argSyntax.SyntaxTree, errorSpan);
Binder\Binder_Invocation.cs (1)
1439return new SourceLocation(token);
Binder\Binder_Query.cs (1)
738SourceLocation 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)
1767diagnostics.ReportUseSiteDiagnostic(useSiteInfo.DiagnosticInfo, new SourceLocation(syntax));
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1169SourceLocation sourceLocation = new SourceLocation(argument.Syntax);
Compilation\CSharpCompilation.cs (3)
3284new SourceLocation(syntaxTree, filterSpanWithinTree.Value) : 3285new SourceLocation(root); 3937diagnostics.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)
226nameLocation: new SourceLocation(container), 235var nameLocation = new SourceLocation(firstGlobalStatement.GetFirstToken()); 239nameLocation = new SourceLocation(firstGlobalStatement.GetFirstToken(includeSkipped: true)); 316directives.Add(new ReferenceDirective(directiveNode.File.ValueText, new SourceLocation(directiveNode))); 341nameLocation: new SourceLocation(parentReference), 354nameLocation: new SourceLocation(parentReference), 515nameLocation: new SourceLocation(dotted.Right), 620nameLocation: new SourceLocation(name), 783nameLocation: new SourceLocation(isExtension ? node.Keyword : node.Identifier), 831nameLocation: new SourceLocation(node.Identifier), 869nameLocation: 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)); 302var location = new SourceLocation(branch.Branch.Syntax.GetFirstToken()); 380new SourceLocation(syntax), syntax.ToString());
FlowAnalysis\DefiniteAssignment.cs (2)
472location = new SourceLocation(node); 2380Diagnostics.Add(ErrorCode.ERR_FixedLocalInLambda, new SourceLocation(node.Syntax), localSymbol);
Symbols\Source\ExplicitInterfaceHelpers.cs (2)
207var location = new SourceLocation(explicitInterfaceSyntax); 223var location = new SourceLocation(explicitInterfaceSyntax);
Symbols\Source\SourceCustomEventSymbol.cs (1)
223_explicitInterfaceType.CheckAllConstraints(DeclaringCompilation, conversions, new SourceLocation(explicitInterfaceSpecifier.Name), diagnostics);
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
278diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, new SourceLocation(arglistToken));
Symbols\Source\SourceMemberContainerSymbol.cs (11)
5517new SourceLocation(fieldSyntax.Declaration.Variables.First().Identifier)); 5561new SourceLocation(methodSyntax.Identifier)); 5575new SourceLocation(constructorSyntax.Identifier)); 5594new SourceLocation(destructorSyntax.Identifier)); 5612new SourceLocation(propertySyntax.Identifier)); 5664new SourceLocation(eventFieldSyntax.Declaration.Variables.First().Identifier)); 5717new SourceLocation(eventSyntax.Identifier)); 5737new SourceLocation(indexerSyntax.ThisKeyword)); 5754new SourceLocation(conversionOperatorSyntax.OperatorKeyword)); 5769new SourceLocation(operatorSyntax.OperatorKeyword)); 5829diagnostics.Add(ErrorCode.ERR_GlobalStatement, new SourceLocation(globalStatement));
Symbols\Source\SourceMemberFieldSymbol.cs (1)
194var errorLocation = new SourceLocation(firstIdentifier);
Symbols\Source\SourceNamedTypeSymbol.cs (1)
202var location = new SourceLocation(tp.Identifier);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (3)
230return new SourceLocation(b); 465var location = new SourceLocation(typeSyntax); 625diagnostics.Add(ErrorCode.ERR_ObjectCantHaveBases, new SourceLocation(name));
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
35var location = new SourceLocation(nameToken); 1131_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)
1032_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)
66_current = new CSDiagnostic(sdi, new SourceLocation(_syntaxTree, new TextSpan(spanStart, spanWidth)));
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
9415var loc = new SourceLocation(tree.GetCompilationUnitRoot().FindToken(6));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (11)
Diagnostics\DiagnosticTest.cs (3)
83Location l1 = new SourceLocation(syntaxTree, new TextSpan(5, 8)); 98DiagnosticInfo di3 = new CustomErrorInfo(provider, "OtherSymbol", new SourceLocation(syntaxTree, new TextSpan(14, 8))); 99var d3 = new CSDiagnostic(di3, new SourceLocation(syntaxTree, new TextSpan(1, 1)));
Diagnostics\LocationsTests.cs (8)
91Location locX = new SourceLocation(syntaxTree, xSpan); 92Location locXToCloseBrace = new SourceLocation(syntaxTree, xToCloseBraceSpan); 429SourceLocation loc1 = new SourceLocation(syntaxTree, new TextSpan(3, 4)); 430SourceLocation loc2 = new SourceLocation(syntaxTree, new TextSpan(3, 4)); 431SourceLocation loc3 = new SourceLocation(syntaxTree, new TextSpan(3, 7)); 432SourceLocation loc4 = new SourceLocation(tree2, new TextSpan(3, 4)); 492SourceLocation loc1 = new SourceLocation(syntaxTree, span1); 493SourceLocation loc2 = new SourceLocation(syntaxTree, span2);
66 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)
5372var loc = new SourceLocation(argSyntax.SyntaxTree, errorSpan);
Binder\Binder_Invocation.cs (2)
1427private static SourceLocation GetCallerLocation(SyntaxNode syntax) 1702var callerSourceLocation = enableCallerInfo ? GetCallerLocation(syntax) : null;
Binder\Binder_Query.cs (1)
738SourceLocation errorLocation = new SourceLocation(let.SyntaxTree, new TextSpan(let.Identifier.SpanStart, let.Expression.Span.End - let.Identifier.SpanStart));
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1169SourceLocation sourceLocation = new SourceLocation(argument.Syntax);
Compilation\CSharpCompilation.cs (1)
3279SourceLocation? location = null;
Declarations\DeclarationTreeBuilder.cs (1)
235var nameLocation = new SourceLocation(firstGlobalStatement.GetFirstToken());
Declarations\MergedNamespaceDeclaration.cs (1)
70SourceLocation loc = decl.NameLocation;
Declarations\MergedTypeDeclaration.cs (2)
187public OneOrMany<SourceLocation> NameLocations 194var 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()); 302var location = new SourceLocation(branch.Branch.Syntax.GetFirstToken());
Symbols\MergedNamespaceSymbol.cs (1)
119internal override void ForceComplete(SourceLocation locationOpt, Predicate<Symbol> filter, CancellationToken cancellationToken)
Symbols\NamespaceOrTypeSymbol.cs (1)
227var loc = declaration.NameLocation;
Symbols\Source\ExplicitInterfaceHelpers.cs (2)
207var location = new SourceLocation(explicitInterfaceSyntax); 223var 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)
1538internal override void ForceComplete(SourceLocation locationOpt, Predicate<Symbol> filter, CancellationToken cancellationToken)
Symbols\Source\SourceConstructorSymbol.cs (1)
274internal 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)
212internal override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceMemberContainerSymbol.cs (1)
549internal 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)
889internal 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)
202var 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>(); 465var 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); 440internal 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)
167internal override void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourcePropertySymbolBase.cs (1)
1771internal 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)
51internal virtual void ForceComplete(SourceLocation? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken) 959internal 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)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
9415var loc = new SourceLocation(tree.GetCompilationUnitRoot().FindToken(6));
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (6)
Diagnostics\LocationsTests.cs (6)
429SourceLocation loc1 = new SourceLocation(syntaxTree, new TextSpan(3, 4)); 430SourceLocation loc2 = new SourceLocation(syntaxTree, new TextSpan(3, 4)); 431SourceLocation loc3 = new SourceLocation(syntaxTree, new TextSpan(3, 7)); 432SourceLocation loc4 = new SourceLocation(tree2, new TextSpan(3, 4)); 492SourceLocation loc1 = new SourceLocation(syntaxTree, span1); 493SourceLocation loc2 = new SourceLocation(syntaxTree, span2);
Microsoft.CodeAnalysis.Test.Utilities (1)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
904c.ReportDiagnostic(Diagnostic.Create(Descriptor, SourceLocation.Create(c.Tree, _badSpan)));