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