42 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 (28)
Binder\Binder_Expressions.cs (1)
5374var loc = new SourceLocation(argSyntax.SyntaxTree, errorSpan);
Binder\Binder_QueryErrors.cs (1)
50new SourceLocation(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 (2)
3252new SourceLocation(syntaxTree, filterSpanWithinTree.Value) : 3253new SourceLocation(root);
Compiler\ClsComplianceChecker.cs (1)
666location = new SourceLocation(syntaxRef);
Compiler\UnprocessedDocumentationCommentFinder.cs (1)
104_diagnostics.Add(ErrorCode.WRN_UnprocessedXMLComment, new SourceLocation(trivia.SyntaxTree, new TextSpan(start, length)));
Declarations\DeclarationTreeBuilder.cs (3)
226nameLocation: new SourceLocation(container), 341nameLocation: new SourceLocation(parentReference), 354nameLocation: new SourceLocation(parentReference),
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); 2388Diagnostics.Add(ErrorCode.ERR_FixedLocalInLambda, new SourceLocation(node.Syntax), localSymbol);
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
278diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, new SourceLocation(arglistToken));
Symbols\Source\SourceMemberFieldSymbol.cs (1)
194var errorLocation = new SourceLocation(firstIdentifier);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
625diagnostics.Add(ErrorCode.ERR_ObjectCantHaveBases, new SourceLocation(name));
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
337diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, new SourceLocation(arglistToken));
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)
9404var 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)
5374var loc = new SourceLocation(argSyntax.SyntaxTree, errorSpan);
Binder\Binder_Invocation.cs (2)
1406private static SourceLocation GetCallerLocation(SyntaxNode syntax) 1681var callerSourceLocation = enableCallerInfo ? GetCallerLocation(syntax) : null;
Binder\Binder_Query.cs (1)
732SourceLocation 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)
3247SourceLocation? 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)
1531internal override void ForceComplete(SourceLocation locationOpt, Predicate<Symbol> filter, CancellationToken cancellationToken)
Symbols\Source\SourceConstructorSymbol.cs (1)
266internal 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)
546internal 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)
1763internal 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)
9404var 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)));