94 instantiations of SourceLocation
Microsoft.CodeAnalysis (2)
Diagnostic\Location.cs (1)
165return new SourceLocation(syntaxTree, textSpan);
Syntax\SyntaxNode.cs (1)
690return !tree.SupportsLocations ? NoLocation.Singleton : new SourceLocation(this);
Microsoft.CodeAnalysis.CSharp (64)
Binder\Binder_Expressions.cs (1)
4512var loc = new SourceLocation(argSyntax.SyntaxTree, errorSpan);
Binder\Binder_Invocation.cs (1)
1161return new SourceLocation(token);
Binder\Binder_Query.cs (1)
731SourceLocation 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)
1679diagnostics.ReportUseSiteDiagnostic(useSiteInfo.DiagnosticInfo, new SourceLocation(syntax));
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1133SourceLocation sourceLocation = new SourceLocation(argument.Syntax);
Compilation\CSharpCompilation.cs (3)
2961new SourceLocation(syntaxTree, filterSpanWithinTree.Value) : 2962new SourceLocation(root); 3533diagnostics.Add(ErrorCode.WRN_ConflictingChecksum, new SourceLocation(checksumDirective), path);
Compiler\ClsComplianceChecker.cs (1)
659location = new SourceLocation(syntaxRef);
Compiler\DocumentationCommentCompiler.cs (1)
556Location 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 (10)
150nameLocation: new SourceLocation(container), 169nameLocation: new SourceLocation(firstGlobalStatement.GetFirstToken()), 231directives.Add(new ReferenceDirective(directiveNode.File.ValueText, new SourceLocation(directiveNode))); 256nameLocation: new SourceLocation(parentReference), 269nameLocation: new SourceLocation(parentReference), 430nameLocation: new SourceLocation(dotted.Right), 535nameLocation: new SourceLocation(name), 682nameLocation: new SourceLocation(node.Identifier), 730nameLocation: new SourceLocation(node.Identifier), 768nameLocation: 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)
219var loc = new SourceLocation(leave.Syntax.GetFirstToken()); 227var loc = new SourceLocation(leave.Syntax.GetFirstToken()); 269Diagnostics.Add(ErrorCode.WRN_UnreachableCode, new SourceLocation(firstToken)); 303var location = new SourceLocation(branch.Branch.Syntax.GetFirstToken()); 382new SourceLocation(syntax), syntax.ToString());
FlowAnalysis\DefiniteAssignment.cs (2)
464location = new SourceLocation(node); 2211Diagnostics.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)
221_explicitInterfaceType.CheckAllConstraints(DeclaringCompilation, conversions, new SourceLocation(explicitInterfaceSpecifier.Name), diagnostics);
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
288diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, new SourceLocation(arglistToken));
Symbols\Source\SourceMemberContainerSymbol.cs (11)
4655new SourceLocation(fieldSyntax.Declaration.Variables.First().Identifier)); 4699new SourceLocation(methodSyntax.Identifier)); 4713new SourceLocation(constructorSyntax.Identifier)); 4732new SourceLocation(destructorSyntax.Identifier)); 4750new SourceLocation(propertySyntax.Identifier)); 4802new SourceLocation(eventFieldSyntax.Declaration.Variables.First().Identifier)); 4855new SourceLocation(eventSyntax.Identifier)); 4875new SourceLocation(indexerSyntax.ThisKeyword)); 4892new SourceLocation(conversionOperatorSyntax.OperatorKeyword)); 4907new SourceLocation(operatorSyntax.OperatorKeyword)); 4967diagnostics.Add(ErrorCode.ERR_GlobalStatement, new SourceLocation(globalStatement));
Symbols\Source\SourceMemberFieldSymbol.cs (1)
183var errorLocation = new SourceLocation(firstIdentifier);
Symbols\Source\SourceNamedTypeSymbol.cs (1)
205var location = new SourceLocation(tp.Identifier);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (3)
229return new SourceLocation(b); 464var location = new SourceLocation(typeSyntax); 625diagnostics.Add(ErrorCode.ERR_ObjectCantHaveBases, new SourceLocation(name));
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
61var location = new SourceLocation(nameToken); 633_explicitInterfaceType.CheckAllConstraints(DeclaringCompilation, conversions, new SourceLocation(syntax.ExplicitInterfaceSpecifier.Name), diagnostics);
Symbols\Source\SourceParameterSymbol.cs (1)
47var locations = ImmutableArray.Create<Location>(new SourceLocation(identifier));
Symbols\Source\SourcePropertySymbolBase.cs (1)
805_explicitInterfaceType.CheckAllConstraints(compilation, conversions, new SourceLocation(explicitInterfaceSpecifier.Name), diagnostics);
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (2)
243diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, new SourceLocation(arglistToken)); 833_explicitInterfaceType.CheckAllConstraints(DeclaringCompilation, conversions, new SourceLocation(name), diagnostics);
Syntax\CSharpSyntaxNode.cs (1)
215return new SourceLocation(this);
Syntax\CSharpSyntaxTree.cs (1)
769return 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)
9194var 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);
Microsoft.CodeAnalysis.VisualBasic (8)
Compilation\ClsComplianceChecker.vb (1)
403location = New SourceLocation(syntaxRef)
Compilation\VisualBasicCompilation.vb (1)
2631diagnosticBag.Add(ERRID.WRN_MultipleDeclFileExtChecksum, New SourceLocation(checksumDirective), path)
Declarations\DeclarationTreeBuilder.vb (1)
110directives.Add(New ReferenceDirective(directiveNode.File.ValueText, New SourceLocation(directiveNode)))
Syntax\VisualBasicSyntaxNode.vb (3)
287Return New VBDiagnostic(errorInfo, If(tree Is Nothing, New SourceLocation(tree, nodeOrToken.Span), tree.GetLocation(nodeOrToken.Span))) 294Return New VBDiagnostic(errorInfo, If(tree Is Nothing, New SourceLocation(tree, nodeOrToken.Span), tree.GetLocation(nodeOrToken.Span))) 462Return New SourceLocation(Me)
Syntax\VisualBasicSyntaxTree.vb (1)
498Return New SourceLocation(Me, span)
VisualBasicExtensions.vb (1)
232Return New SourceLocation(syntaxReference)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (8)
LocationTests.vb (8)
74Dim locX As New SourceLocation(tree, xSpan) 75Dim locXToEndClass As New SourceLocation(tree, xToEndClassSpan) 275Dim loc1 As SourceLocation = New SourceLocation(tree, New TextSpan(3, 4)) 276Dim loc2 As SourceLocation = New SourceLocation(tree, New TextSpan(3, 4)) 277Dim loc3 As SourceLocation = New SourceLocation(tree, New TextSpan(3, 7)) 278Dim loc4 As SourceLocation = New SourceLocation(tree2, New TextSpan(3, 4)) 299Dim loc1 = New SourceLocation(tree, span1) 300Dim loc2 = New SourceLocation(tree, span2)
71 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 (53)
Binder\Binder_Expressions.cs (1)
4512var loc = new SourceLocation(argSyntax.SyntaxTree, errorSpan);
Binder\Binder_Invocation.cs (2)
1149private static SourceLocation GetCallerLocation(SyntaxNode syntax) 1372var callerSourceLocation = enableCallerInfo ? GetCallerLocation(syntax) : null;
Binder\Binder_Query.cs (1)
731SourceLocation errorLocation = new SourceLocation(let.SyntaxTree, new TextSpan(let.Identifier.SpanStart, let.Expression.Span.End - let.Identifier.SpanStart));
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1133SourceLocation sourceLocation = new SourceLocation(argument.Syntax);
Compilation\CSharpCompilation.cs (1)
2956SourceLocation? location = null;
Declarations\MergedNamespaceDeclaration.cs (1)
69SourceLocation loc = decl.NameLocation;
Declarations\MergedTypeDeclaration.cs (3)
157public ImmutableArray<SourceLocation> NameLocations 167var builder = ArrayBuilder<SourceLocation>.GetInstance(); 170SourceLocation loc = decl.NameLocation;
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)
70SourceLocation nameLocation,
FlowAnalysis\ControlFlowPass.cs (3)
219var loc = new SourceLocation(leave.Syntax.GetFirstToken()); 227var loc = new SourceLocation(leave.Syntax.GetFirstToken()); 303var location = new SourceLocation(branch.Branch.Syntax.GetFirstToken());
Symbols\MergedNamespaceSymbol.cs (1)
122internal override void ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken)
Symbols\NamespaceOrTypeSymbol.cs (1)
216var loc = declaration.NameLocation;
Symbols\Source\ExplicitInterfaceHelpers.cs (2)
207var location = new SourceLocation(explicitInterfaceSyntax); 223var location = new SourceLocation(explicitInterfaceSyntax);
Symbols\Source\SourceAssemblySymbol.cs (1)
900internal override void ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken)
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1497internal override void ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken)
Symbols\Source\SourceEnumConstantSymbol.cs (1)
103internal sealed override void ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken)
Symbols\Source\SourceEventSymbol.cs (1)
73internal override void ForceComplete(SourceLocation? locationOpt, CancellationToken cancellationToken)
Symbols\Source\SourceFieldLikeEventSymbol.cs (1)
185internal override void ForceComplete(SourceLocation? locationOpt, CancellationToken cancellationToken)
Symbols\Source\SourceMemberContainerSymbol.cs (2)
523internal override void ForceComplete(SourceLocation? locationOpt, CancellationToken cancellationToken) 968return declaration.NameLocations.Cast<SourceLocation, Location>();
Symbols\Source\SourceMemberFieldSymbol.cs (3)
183var errorLocation = new SourceLocation(firstIdentifier); 257static bool reportBadMemberFlagIfAny(DeclarationModifiers result, DeclarationModifiers modifier, BindingDiagnosticBag diagnostics, SourceLocation errorLocation) 269internal sealed override void ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken)
Symbols\Source\SourceMemberMethodSymbol.cs (1)
755internal override void ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken)
Symbols\Source\SourceModuleSymbol.cs (1)
224internal override void ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
205var location = new SourceLocation(tp.Identifier);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (6)
117var location = singleDeclaration.NameLocation; 163var location = singleDeclaration.NameLocation; 211private SourceLocation FindBaseRefSyntax(NamedTypeSymbol baseSym) 293SourceLocation baseTypeLocation = null; 295var interfaceLocations = SpecializedSymbolCollections.GetPooledSymbolDictionaryInstance<NamedTypeSymbol, SourceLocation>(); 464var location = new SourceLocation(typeSyntax);
Symbols\Source\SourceNamespaceSymbol_Completion.cs (1)
14internal override void ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
61var location = new SourceLocation(nameToken); 604internal override void ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken)
Symbols\Source\SourceParameterSymbol.cs (1)
176internal override void ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken)
Symbols\Source\SourcePropertySymbolBase.cs (1)
1436internal override void ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken)
Symbols\Source\SourceTypeParameterSymbol.cs (1)
345internal override void ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken)
Symbols\Symbol.cs (2)
50internal virtual void ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken) 822internal static void ForceCompleteMemberByLocation(SourceLocation locationOpt, Symbol member, CancellationToken cancellationToken)
Symbols\Tuples\TupleFieldSymbol.cs (1)
147internal override void ForceComplete(SourceLocation locationOpt, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
9194var 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)
818c.ReportDiagnostic(Diagnostic.Create(Descriptor, SourceLocation.Create(c.Tree, _badSpan)));
Microsoft.CodeAnalysis.VisualBasic (1)
Compilation\DocumentationComments\DocumentationCommentCompiler.Includes.vb (1)
548loc.Kind = LocationKind.SourceFile AndAlso DirectCast(loc, SourceLocation).SourceTree Is Me._onlyDiagnosticsFromTree AndAlso
Microsoft.CodeAnalysis.VisualBasic.Semantic.UnitTests (2)
Compilation\MyTemplateTests.vb (2)
310Assert.IsType(Of SourceLocation)(sym.Locations(0)) 314Assert.Equal(1, parent.Locations.OfType(Of SourceLocation).Count)
Microsoft.CodeAnalysis.VisualBasic.Syntax.UnitTests (4)
LocationTests.vb (4)
275Dim loc1 As SourceLocation = New SourceLocation(tree, New TextSpan(3, 4)) 276Dim loc2 As SourceLocation = New SourceLocation(tree, New TextSpan(3, 4)) 277Dim loc3 As SourceLocation = New SourceLocation(tree, New TextSpan(3, 7)) 278Dim loc4 As SourceLocation = New SourceLocation(tree2, New TextSpan(3, 4))