42 instantiations of SourceLocation
Microsoft.CodeAnalysis (2)
Diagnostic\Location.cs (1)
165
return new
SourceLocation
(syntaxTree, textSpan);
Syntax\SyntaxNode.cs (1)
694
return !tree.SupportsLocations ? NoLocation.Singleton : new
SourceLocation
(this);
Microsoft.CodeAnalysis.CSharp (28)
Binder\Binder_Expressions.cs (1)
5374
var loc = new
SourceLocation
(argSyntax.SyntaxTree, errorSpan);
Binder\Binder_QueryErrors.cs (1)
50
new
SourceLocation
(queryClause));
Binder\Binder_Symbols.cs (1)
1767
diagnostics.ReportUseSiteDiagnostic(useSiteInfo.DiagnosticInfo, new
SourceLocation
(syntax));
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1169
SourceLocation sourceLocation = new
SourceLocation
(argument.Syntax);
Compilation\CSharpCompilation.cs (2)
3252
new
SourceLocation
(syntaxTree, filterSpanWithinTree.Value) :
3253
new
SourceLocation
(root);
Compiler\ClsComplianceChecker.cs (1)
666
location = 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)
226
nameLocation: new
SourceLocation
(container),
341
nameLocation: new
SourceLocation
(parentReference),
354
nameLocation: new
SourceLocation
(parentReference),
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)
218
var loc = new
SourceLocation
(leave.Syntax.GetFirstToken());
226
var loc = new
SourceLocation
(leave.Syntax.GetFirstToken());
268
Diagnostics.Add(ErrorCode.WRN_UnreachableCode, new
SourceLocation
(firstToken));
302
var location = new
SourceLocation
(branch.Branch.Syntax.GetFirstToken());
380
new
SourceLocation
(syntax), syntax.ToString());
FlowAnalysis\DefiniteAssignment.cs (2)
472
location = new
SourceLocation
(node);
2388
Diagnostics.Add(ErrorCode.ERR_FixedLocalInLambda, new
SourceLocation
(node.Syntax), localSymbol);
Symbols\Source\SourceDelegateMethodSymbol.cs (1)
278
diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, new
SourceLocation
(arglistToken));
Symbols\Source\SourceMemberFieldSymbol.cs (1)
194
var errorLocation = new
SourceLocation
(firstIdentifier);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (1)
625
diagnostics.Add(ErrorCode.ERR_ObjectCantHaveBases, new
SourceLocation
(name));
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (1)
337
diagnostics.Add(ErrorCode.ERR_IllegalVarArgs, new
SourceLocation
(arglistToken));
Syntax\CSharpSyntaxNode.cs (1)
195
return new
SourceLocation
(this);
Syntax\CSharpSyntaxTree.cs (1)
761
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)
9404
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);
66 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 (55)
Binder\Binder_Expressions.cs (1)
5374
var
loc = new SourceLocation(argSyntax.SyntaxTree, errorSpan);
Binder\Binder_Invocation.cs (2)
1406
private static
SourceLocation
GetCallerLocation(SyntaxNode syntax)
1681
var
callerSourceLocation = enableCallerInfo ? GetCallerLocation(syntax) : null;
Binder\Binder_Query.cs (1)
732
SourceLocation
errorLocation = new SourceLocation(let.SyntaxTree, new TextSpan(let.Identifier.SpanStart, let.Expression.Span.End - let.Identifier.SpanStart));
Binder\Semantics\OverloadResolution\OverloadResolutionResult.cs (1)
1169
SourceLocation
sourceLocation = new SourceLocation(argument.Syntax);
Compilation\CSharpCompilation.cs (1)
3247
SourceLocation
? location = null;
Declarations\DeclarationTreeBuilder.cs (1)
235
var
nameLocation = new SourceLocation(firstGlobalStatement.GetFirstToken());
Declarations\MergedNamespaceDeclaration.cs (1)
70
SourceLocation
loc = decl.NameLocation;
Declarations\MergedTypeDeclaration.cs (2)
187
public OneOrMany<
SourceLocation
> NameLocations
194
var builder = ArrayBuilder<
SourceLocation
>.GetInstance(Declarations.Length);
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)
84
SourceLocation
nameLocation,
FlowAnalysis\ControlFlowPass.cs (3)
218
var
loc = new SourceLocation(leave.Syntax.GetFirstToken());
226
var
loc = new SourceLocation(leave.Syntax.GetFirstToken());
302
var
location = new SourceLocation(branch.Branch.Syntax.GetFirstToken());
Symbols\MergedNamespaceSymbol.cs (1)
119
internal override void ForceComplete(
SourceLocation
locationOpt, Predicate<Symbol> filter, CancellationToken cancellationToken)
Symbols\NamespaceOrTypeSymbol.cs (1)
227
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)
906
internal override void ForceComplete(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceComplexParameterSymbol.cs (1)
1531
internal override void ForceComplete(
SourceLocation
locationOpt, Predicate<Symbol> filter, CancellationToken cancellationToken)
Symbols\Source\SourceConstructorSymbol.cs (1)
266
internal sealed override void ForceComplete(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceEnumConstantSymbol.cs (1)
101
internal sealed override void ForceComplete(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceEventSymbol.cs (1)
76
internal override void ForceComplete(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceFieldLikeEventSymbol.cs (1)
212
internal override void ForceComplete(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceMemberContainerSymbol.cs (1)
546
internal override void ForceComplete(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceMemberFieldSymbol.cs (3)
194
var
errorLocation = new SourceLocation(firstIdentifier);
268
static bool reportBadMemberFlagIfAny(DeclarationModifiers result, DeclarationModifiers modifier, BindingDiagnosticBag diagnostics,
SourceLocation
errorLocation)
281
internal sealed override void ForceComplete(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceMemberMethodSymbol.cs (1)
889
internal override void ForceComplete(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceModuleSymbol.cs (1)
226
internal override void ForceComplete(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceNamedTypeSymbol.cs (1)
202
var
location = new SourceLocation(tp.Identifier);
Symbols\Source\SourceNamedTypeSymbol_Bases.cs (6)
118
var
location = singleDeclaration.NameLocation;
164
var
location = singleDeclaration.NameLocation;
212
private
SourceLocation
FindBaseRefSyntax(NamedTypeSymbol baseSym)
294
SourceLocation
baseTypeLocation = null;
296
var interfaceLocations = SpecializedSymbolCollections.GetPooledSymbolDictionaryInstance<NamedTypeSymbol,
SourceLocation
>();
465
var
location = new SourceLocation(typeSyntax);
Symbols\Source\SourceNamespaceSymbol_Completion.cs (1)
13
internal override void ForceComplete(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceOrdinaryMethodSymbol.cs (2)
35
var
location = new SourceLocation(nameToken);
440
internal sealed override void ForceComplete(
SourceLocation
locationOpt, Predicate<Symbol> filter, CancellationToken cancellationToken)
Symbols\Source\SourceParameterSymbol.cs (2)
47
var
location = new SourceLocation(name == "" ? syntax.Type : identifier);
173
internal override void ForceComplete(
SourceLocation
locationOpt, Predicate<Symbol> filter, CancellationToken cancellationToken)
Symbols\Source\SourcePropertySymbol.cs (1)
167
internal override void ForceComplete(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourcePropertySymbolBase.cs (1)
1763
internal override void ForceComplete(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Symbols\Source\SourceTypeParameterSymbol.cs (1)
350
internal override void ForceComplete(
SourceLocation
locationOpt, Predicate<Symbol> filter, CancellationToken cancellationToken)
Symbols\Symbol.cs (2)
51
internal virtual void ForceComplete(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
959
internal static void ForceCompleteMemberConditionally(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, Symbol member, CancellationToken cancellationToken)
Symbols\Tuples\TupleFieldSymbol.cs (1)
148
internal override void ForceComplete(
SourceLocation
? locationOpt, Predicate<Symbol>? filter, CancellationToken cancellationToken)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (1)
CommandLineTests.cs (1)
9404
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)
904
c.ReportDiagnostic(Diagnostic.Create(Descriptor,
SourceLocation
.Create(c.Tree, _badSpan)));