1 override of SourceTree
Microsoft.CodeAnalysis (1)
Diagnostic\SourceLocation.cs (1)
72public override SyntaxTree SourceTree
374 references to SourceTree
AnalyzerRunner (1)
DiagnosticAnalyzerRunner.cs (1)
205.ThenBy(tuple => tuple.Item2.Location.SourceTree?.FilePath, StringComparer.OrdinalIgnoreCase)
ConfigurationSchemaGenerator (1)
RuntimeSource\SourceGenerators\DiagnosticInfo.cs (1)
34=> Location.Create(location.SourceTree?.FilePath ?? "", location.SourceSpan, location.GetLineSpan().Span);
Microsoft.Analyzers.Extra.Tests (2)
Resources\RoslynTestUtils.cs (2)
348var doc = proj.GetDocument(d.Location.SourceTree); 530return diagnostics.Where(d => d.Location.SourceTree!.FilePath.EndsWith(document.Name));
Microsoft.Analyzers.Local.Tests (2)
Resources\RoslynTestUtils.cs (2)
349var doc = proj.GetDocument(d.Location.SourceTree); 531return diagnostics.Where(d => d.Location.SourceTree!.FilePath.EndsWith(document.Name));
Microsoft.AspNetCore.Analyzer.Testing (2)
DiagnosticAnalyzerRunner.cs (1)
99if (tree == diag.Location.SourceTree)
DiagnosticVerifier.cs (1)
122if (tree == diag.Location.SourceTree)
Microsoft.AspNetCore.Components.Analyzers.Tests (2)
Helpers\DiagnosticVerifier.Helper.cs (1)
76if (tree == diag.Location.SourceTree)
Verifiers\DiagnosticVerifier.cs (1)
261string resultMethodName = diagnostics[i].Location.SourceTree.FilePath.EndsWith(".cs", StringComparison.Ordinal) ? "GetCSharpResultAt" : "GetBasicResultAt";
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (2)
Helpers\DiagnosticVerifier.Helper.cs (1)
76if (tree == diag.Location.SourceTree)
Verifiers\DiagnosticVerifier.cs (1)
261string resultMethodName = diagnostics[i].Location.SourceTree.FilePath.EndsWith(".cs", StringComparison.Ordinal) ? "GetCSharpResultAt" : "GetBasicResultAt";
Microsoft.AspNetCore.Http.RequestDelegateGenerator (1)
RequestDelegateGeneratorSuppressor.cs (1)
49if (location.SourceTree is not { } sourceTree
Microsoft.CodeAnalysis (29)
Diagnostic\Diagnostic.cs (1)
518if (location.SourceTree != tree)
Diagnostic\Location.cs (3)
31[MemberNotNullWhen(true, nameof(SourceTree))] 32public bool IsInSource { get { return SourceTree != null; } } 100result += "(" + this.SourceTree?.FilePath + this.SourceSpan + ")";
DiagnosticAnalyzer\AnalysisResultBuilder.cs (1)
303=> diagnostic.Location.SourceTree;
DiagnosticAnalyzer\AnalysisScope.cs (1)
302if (diagnostic.Location.SourceTree != filterFile.SourceTree)
DiagnosticAnalyzer\AnalyzerDriver.cs (6)
1252Debug.Assert(location.SourceTree != null); 1255if (IsGeneratedOrHiddenCodeLocation(location.SourceTree, location.SourceSpan, cancellationToken)) 1263var generatedCodeSymbolsInTree = getOrComputeGeneratedCodeSymbolsInTree(location.SourceTree, compilation, cancellationToken); 1266var model = compilation.GetSemanticModel(location.SourceTree); 1267for (var node = location.SourceTree.GetRoot(cancellationToken).FindNode(location.SourceSpan, getInnermostNodeForTie: true); 2007if (diagnostic?.Location.SourceTree is { } tree &&
DiagnosticAnalyzer\AnalyzerExecutor.AnalyzerDiagnosticReporter.cs (1)
129_contextFile.Value.SourceTree == diagnostic.Location.SourceTree;
DiagnosticAnalyzer\AnalyzerExecutor.cs (3)
1408if (syntaxRef.SyntaxTree == diagnostic.Location.SourceTree) 1516if (location.SourceTree != null && 1517!IsAnalyzerSuppressedForTree(analyzer, location.SourceTree, cancellationToken))
DiagnosticAnalyzer\CompilationWithAnalyzers.cs (2)
910if (location.SourceTree != null) 912partialTrees.Add(location.SourceTree);
DiagnosticAnalyzer\DiagnosticAnalysisContextHelpers.cs (5)
95Debug.Assert(location.SourceTree != null); 96if (!compilation.ContainsSyntaxTree(location.SourceTree)) 99throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticLocationReported, id, location.SourceTree.FilePath), "diagnostic"); 102if (location.SourceSpan.End > location.SourceTree.Length) 105throw new ArgumentException(string.Format(CodeAnalysisResources.InvalidDiagnosticSpanReported, id, location.SourceSpan, location.SourceTree.FilePath), "diagnostic");
DiagnosticAnalyzer\SuppressMessageAttributeState.cs (2)
163var model = _compilation.GetSemanticModel(location.SourceTree); 166for (var node = location.SourceTree.GetRoot().FindNode(location.SourceSpan, getInnermostNodeForTie: true);
ReferenceManager\CommonReferenceManager.Resolution.cs (4)
813Debug.Assert(referenceDirective.Location.SourceTree is object); 814if (localBoundReferenceDirectives != null && localBoundReferenceDirectives.ContainsKey((referenceDirective.Location.SourceTree.FilePath, referenceDirective.File))) 834localBoundReferenceDirectives.Add((referenceDirective.Location.SourceTree.FilePath, referenceDirective.File), boundReference); 870var tree = location.SourceTree;
Microsoft.CodeAnalysis.CodeStyle (22)
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (2)
226|| ShouldSkipAnalysis(location.SourceTree!, options, context.Compilation.Options, option.Notification, cancellationToken)) 298return options.GetAnalyzerOptions(diagnosticLocation.SourceTree!).PreferReadonly;
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (2)
60var sourceTree = symbolContext.Symbol.Locations.FirstOrDefault()?.SourceTree; 88if (symbol?.Locations.FirstOrDefault()?.SourceTree is not { } sourceTree)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
497if (diagnostic.Location.SourceTree == tree) 555Debug.Assert(diagnostic.Location.SourceTree == tree);
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (2)
541r => r.SyntaxTree == diagnosticLocation.SourceTree && r.Span.Contains(diagnosticLocation.SourceSpan)); 595foreach (var tree in namedTypeSymbol.Locations.Select(l => l.SourceTree).Distinct().WhereNotNull())
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
133var option = analyzerOptions.GetAnalyzerOptions(location.SourceTree!).UnusedParameters;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalysisContextExtensions.cs (4)
55=> location.SourceTree != null && context.ShouldAnalyzeSpan(location.SourceSpan, location.SourceTree); 75=> location.SourceTree != null && context.ShouldAnalyzeSpan(location.SourceSpan, location.SourceTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\LocationExtensions.cs (5)
15Contract.ThrowIfNull(location.SourceTree); 16return location.SourceTree; 38var tree = loc.SourceTree; 45return loc1.SourceTree == loc2.SourceTree && loc1.SourceSpan.IntersectsWith(loc2.SourceSpan);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (1)
78var syntaxTree = locations[0].SourceTree;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (2)
725if (location.SourceTree != null) 728var semanticModel = Compilation.GetSemanticModel(location.SourceTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
263WriteString(location.SourceTree.FilePath);
Microsoft.CodeAnalysis.CodeStyle.Fixes (7)
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (1)
78.GroupBy(diagnostic => diagnostic.Location.SourceTree)
src\Analyzers\Core\CodeFixes\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsCodeFixProvider.cs (1)
41var title = GetTitle(negated, diagnostic.Location.SourceTree!.Options);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
494if (location.SourceTree != destinationMember.SyntaxTree)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
190declaration = await SelectFirstOrDefaultAsync(declarations.Where(r => r.SyntaxTree == location.SourceTree), node => true, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (2)
202if (info.Context.AfterThisLocation?.SourceTree is { } afterSourceTree && 218if (info.Context.BeforeThisLocation?.SourceTree is { } beforeSourceTree &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
58var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath);
Microsoft.CodeAnalysis.CSharp (53)
Binder\Binder_Invocation.cs (2)
1627int line = callerSourceLocation.SourceTree.GetDisplayLineNumber(callerSourceLocation.SourceSpan); 1632string path = callerSourceLocation.SourceTree.GetDisplayPath(callerSourceLocation.SourceSpan, Compilation.Options.SourceReferenceResolver);
Binder\Binder_Symbols.cs (2)
1896if (containerResult == 0 && la.SourceTree == lb.SourceTree) return lb.SourceSpan.Start - la.SourceSpan.Start;
Binder\BinderFactory.BinderFactoryVisitor.cs (1)
643return (location.SourceTree == syntaxTree) && span.Contains(location.SourceSpan);
Binder\InMethodBinder.cs (1)
248Debug.Assert(oldLocation != newLocation || oldLocation == Location.None || newLocation.SourceTree?.GetRoot().ContainsDiagnostics == true,
CommandLine\CSharpCompiler.cs (1)
262string entryPointFileName = PathUtilities.GetFileName(entryPoint.GetFirstLocation().SourceTree!.FilePath);
Compilation\CSharpCompilation.cs (3)
3593var filePath = location.SourceTree?.FilePath; 4526var comparison = CompareSyntaxTreeOrdering(loc1.SourceTree!, loc2.SourceTree!);
Compilation\CSharpDiagnosticFilter.cs (3)
153Debug.Assert(location.SourceTree is null || location.SourceTree is CSharpSyntaxTree); 154var tree = location.SourceTree as CSharpSyntaxTree;
Compilation\CSharpSemanticModel.cs (1)
3236if (location.SourceTree == this.SyntaxTree && parameter.Span.Contains(location.SourceSpan))
Compilation\SyntaxTreeSemanticModel.cs (3)
1813if (loc.IsInSource && loc.SourceTree == this.SyntaxTree && declarationSpan.Contains(loc.SourceSpan)) 2180if (location.SourceTree == this.SyntaxTree && parameter.Span.Contains(location.SourceSpan)) 2395if (location.SourceTree != this.SyntaxTree)
Compiler\DocumentationCommentCompiler.cs (3)
386Debug.Assert(location.SourceTree!.ReportDocumentationCommentDiagnostics()); //Should be the same tree as for the symbol. 401Debug.Assert(location.SourceTree!.ReportDocumentationCommentDiagnostics()); //Should be the same tree as for the symbol. 603if (location.SourceTree.ReportDocumentationCommentDiagnostics())
Compiler\DocumentationCommentCompiler.IncludeElementExpander.cs (2)
636if (treelessSyntax.ContainsDiagnostics && sourceLocation.SourceTree.ReportDocumentationCommentDiagnostics()) 652if (sourceLocation.SourceTree.ReportDocumentationCommentDiagnostics())
Declarations\DeclarationTreeBuilder.cs (2)
236if (nameLocation.SourceTree is null) 241Debug.Assert(nameLocation.SourceTree is not null);
Emitter\Model\PEModuleBuilder.cs (1)
454Cci.DebugSourceDocument doc = DebugDocumentsBuilder.TryGetDebugDocument(span.Path, basePath: location.SourceTree.FilePath);
SymbolDisplay\SymbolDisplayVisitor.Types.cs (1)
192: internalSymbol2.GetFirstLocationOrNone().SourceTree is { } tree ? $"<tree {internalSymbol2.DeclaringCompilation.GetSyntaxTreeOrdinal(tree)}>"
SymbolDisplay\SymbolDisplayVisitor_Minimal.cs (2)
245if (location.IsInSource && location.SourceTree == SemanticModelOpt.SyntaxTree) 247var token = location.SourceTree.GetRoot().FindToken(PositionOpt);
Symbols\ConstraintsHelper.cs (1)
102Binder.CheckFeatureAvailability(location.SourceTree, MessageID.IDS_FeatureAllowsRefStructConstraint, diagnostics, location);
Symbols\LexicalSortKey.cs (1)
75: this(location.SourceTree, location.SourceSpan.Start, compilation)
Symbols\NamespaceOrTypeSymbol.cs (1)
227if (loc.IsInSource && loc.SourceTree == syntax.SyntaxTree && syntax.Span.Contains(loc.SourceSpan))
Symbols\RangeVariableSymbol.cs (2)
61Debug.Assert(_location.SourceTree != null); 62SyntaxToken token = _location.SourceTree.GetRoot().FindToken(_location.SourceSpan.Start);
Symbols\Source\ModifierUtils.cs (5)
115=> ((result & modifier) != 0) && !Binder.CheckFeatureAvailability(errorLocation.SourceTree, featureID, diagnostics, errorLocation); 153LanguageVersion availableVersion = ((CSharpParseOptions)errorLocation.SourceTree.Options).LanguageVersion; 180Binder.CheckFeatureAvailability(errorLocation.SourceTree, MessageID.IDS_DefaultInterfaceImplementation, diagnostics, errorLocation); 215Debug.Assert(location.SourceTree is not null); 217LanguageVersion availableVersion = ((CSharpParseOptions)location.SourceTree.Options).LanguageVersion;
Symbols\Source\SourceAssemblySymbol.cs (1)
1558var tree = rootNs.Location.SourceTree;
Symbols\Source\SourceMemberContainerSymbol.cs (2)
862private SyntaxTree? AssociatedSyntaxTree => IsFileLocal ? declaration.Declarations[0].Location.SourceTree : null; 4460var languageVersion = ((CSharpParseOptions)this.GetFirstLocation().SourceTree!.Options).LanguageVersion;
Symbols\Source\SourceModuleSymbol.cs (1)
346ImmutableArray<ImmutableArray<string>> interceptorsNamespaces = ((CSharpParseOptions)location.SourceTree.Options).InterceptorsNamespaces;
Symbols\Source\SourceNamespaceSymbol.cs (1)
386var leftTree = possibleFileLocalType.MergedDeclaration.Declarations[0].Location.SourceTree;
Symbols\Source\SourcePropertySymbol.cs (2)
450Debug.Assert(location.SourceTree is not null); 452LanguageVersion availableVersion = ((CSharpParseOptions)location.SourceTree.Options).LanguageVersion;
Symbols\Source\SourceUserDefinedOperatorSymbolBase.cs (3)
169LanguageVersion availableVersion = ((CSharpParseOptions)location.SourceTree.Options).LanguageVersion; 193Binder.CheckFeatureAvailability(location.SourceTree, MessageID.IDS_DefaultInterfaceImplementation, diagnostics, location); 730Binder.CheckFeatureAvailability(location.SourceTree, MessageID.IDS_FeatureRelaxedShiftOperator, diagnostics, location);
Symbols\Symbol.cs (3)
454if (loc.IsInSource && loc.SourceTree == tree && declarationSpan.Contains(loc.SourceSpan)) 513SyntaxToken token = location.SourceTree.GetRoot().FindToken(location.SourceSpan.Start); 529SyntaxNode parent = location.SourceTree.GetRoot();
Symbols\Symbol_Attributes.cs (2)
497if (location.SourceTree == argumentLocation.SourceTree &&
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (4)
src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (2)
44if (diagnostic.Location.SourceTree is null) 47var root = diagnostic.Location.SourceTree.GetRoot(cancellationToken);
src\Analyzers\CSharp\CodeFixes\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorCodeFixProvider.cs (1)
43var title = GetTitle(negated, diagnostic.Location.SourceTree!.Options);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
203? contextLocation.SourceTree
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
Formatting\CodeCleanupTests.TestFixers.cs (1)
34var sourceTree = diagnostic.Location.SourceTree;
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (2)
Emit\EditAndContinue\EditAndContinueTestBase.cs (2)
86var tree1 = method1.Locations[0].SourceTree; 87var tree0 = method0.Locations[0].SourceTree;
Microsoft.CodeAnalysis.CSharp.Emit3.UnitTests (5)
Diagnostics\GetDiagnosticsTests.cs (5)
447Assert.True(diagnostics[0].Location.SourceTree.Equals(syntaxTree1)); 448Assert.True(diagnostics[1].Location.SourceTree.Equals(syntaxTree2)); 449Assert.True(diagnostics[2].Location.SourceTree.Equals(syntaxTree3)); 473Assert.True(diagnostics[0].Location.SourceTree.Equals(syntaxTree1)); 474Assert.True(diagnostics[1].Location.SourceTree.Equals(syntaxTree2));
Microsoft.CodeAnalysis.CSharp.Features (4)
Debugging\BreakpointResolver.cs (1)
36var tree = location.SourceTree;
src\Analyzers\CSharp\CodeFixes\MakeMethodAsynchronous\CSharpMakeMethodAsynchronousCodeFixProvider.cs (2)
44if (diagnostic.Location.SourceTree is null) 47var root = diagnostic.Location.SourceTree.GetRoot(cancellationToken);
src\Analyzers\CSharp\CodeFixes\UseIsNullCheck\CSharpUseIsNullCheckForCastAndEqualityOperatorCodeFixProvider.cs (1)
43var title = GetTitle(negated, diagnostic.Location.SourceTree!.Options);
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (6)
Diagnostics\DiagnosticTest.cs (2)
86Assert.Same(syntaxTree, d1.Location.SourceTree); 100Assert.Same(syntaxTree, d3.Location.SourceTree);
Syntax\SyntaxNodeTests.cs (4)
2079Assert.Equal(tree, nodeLocation.SourceTree); 2084Assert.Equal(tree, tokenLocation.SourceTree); 2089Assert.Equal(tree, triviaLocation.SourceTree); 2095Assert.Equal(tree, spanLocation.SourceTree);
Microsoft.CodeAnalysis.CSharp.Workspaces (5)
Rename\CSharpRenameRewriterLanguageService.cs (4)
146_renamableDeclarationLocation = _renamedSymbol.Locations.FirstOrDefault(loc => loc.IsInSource && loc.SourceTree == _semanticModel.SyntaxTree); 871var tree = location.SourceTree; 902var token = await location.SourceTree!.GetTouchingTokenAsync(location.SourceSpan.Start, cancellationToken, findInsideTrivia: true).ConfigureAwait(false); 1006var token = await implicitReferenceLocation.Location.SourceTree!.GetTouchingTokenAsync(
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\CSharp\CodeGeneration\CSharpCodeGenerationHelpers.cs (1)
203? contextLocation.SourceTree
Microsoft.CodeAnalysis.EditorFeatures (1)
InlineRename\AbstractEditorInlineRenameService.SymbolRenameInfo.cs (1)
167var symbolSourceDocument = this.Document.Project.Solution.GetDocument(RenameSymbol.Locations.Single().SourceTree);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (2)
Peek\PeekHelpers.cs (2)
50var root = identifierLocation.SourceTree.GetRoot(cancellationToken); 70return identifierLocation.SourceTree.GetLocation(node.Span).GetMappedLineSpan().Span;
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
FindReferences\FindReferencesTests.vb (1)
466Return loc.IsInSource AndAlso Not loc.SourceTree.IsHiddenPosition(loc.SourceSpan.Start)
Rename\RenameEngineResult.vb (2)
226Dim documentId = ConflictResolution.OldSolution.GetDocumentId(location.SourceTree) 249Dim documentId = ConflictResolution.OldSolution.GetDocumentId(location.SourceTree)
Microsoft.CodeAnalysis.Features (54)
ChangeSignature\AbstractChangeSignatureService.cs (2)
164var declarationDocument = solution.GetRequiredDocument(declarationLocation.SourceTree!); 456var tree = location.SourceTree;
CodeFixes\Configuration\ConfigurationUpdater.cs (1)
431var diagnosticSourceTree = _diagnostic?.Location.SourceTree;
CodeFixes\Configuration\ConfigureCodeStyle\ConfigureCodeStyleOptionCodeFixProvider.cs (2)
44diagnostic.Location.SourceTree == null) 49var language = diagnostic.Location.SourceTree.Options.Language;
CodeLens\CodeLensReferencesService.cs (4)
103var document = solution.GetDocument(location.SourceTree); 148var documentId = solution.GetDocument(location.SourceTree)?.Id; 247var document = solution.GetDocument(commonLocation.SourceTree); 278var document = solution.GetDocument(syntaxNode.GetLocation().SourceTree);
CodeLens\LocationComparer.cs (3)
22x.SourceTree.FilePath.Equals(y.SourceTree.FilePath, StringComparison.OrdinalIgnoreCase); 33StringComparer.OrdinalIgnoreCase.GetHashCode(obj.SourceTree.FilePath));
Debugging\AbstractBreakpointResolver.cs (1)
82var document = _solution.GetDocument(location.SourceTree);
DocumentHighlighting\AbstractDocumentHighlightsService.cs (2)
236var document = solution.GetDocument(location.SourceTree); 306var tree = location.SourceTree;
EditAndContinue\ProjectDiagnostics.cs (1)
26var document = solution.GetDocument(diagnostic.Location.SourceTree);
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingWorkCoordinator.UnitTestingSemanticChangeProcessor.cs (1)
183var documentId = solution.GetDocumentId(location.SourceTree, projectId);
ExtractMethod\MethodExtractor.VariableSymbol.cs (10)
169var commonTree = leftLocations.Select(l => l.SourceTree).Intersect(rightLocations.Select(l => l.SourceTree)).WhereNotNull().First(); 171var leftLocation = leftLocations.First(l => l.SourceTree == commonTree); 172var rightLocation = rightLocations.First(l => l.SourceTree == commonTree); 225Contract.ThrowIfFalse(_localSymbol.Locations[0].SourceTree == other._localSymbol.Locations[0].SourceTree); 245Contract.ThrowIfNull(_localSymbol.Locations[0].SourceTree); 247var tree = _localSymbol.Locations[0].SourceTree; 337Contract.ThrowIfFalse(locationLeft.SourceTree == locationRight.SourceTree);
FindUsages\AbstractFindUsagesService_FindImplementations.cs (1)
127if (location.IsInSource && !seenLocations.Add((location.SourceTree.FilePath, location.SourceSpan)))
FindUsages\DefinitionItemFactory.cs (1)
238solution.GetDocument(location.SourceTree) is { } document)
GoToDefinition\GoToDefinitionFeatureHelpers.cs (1)
39if (sourceLocations.All(l => solution.GetDocument(l.SourceTree) == null))
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (1)
736if (location.IsInSource && location.IsVisibleSourceLocation() && solution.GetDocument(location.SourceTree) is { } document)
Navigation\NavigableItemFactory.cs (1)
45let doc = solution.GetDocument(c.SourceTree)
NavigationBar\AbstractNavigationBarItemService.cs (4)
67var navigationLocationSpan = symbol.Locations.FirstOrDefault(loc => loc.SourceTree == tree)?.SourceSpan ?? 79var navigationLocation = symbol.Locations.FirstOrDefault(loc => loc.SourceTree != null && loc.SourceTree != tree) ?? 82var documentId = solution.GetDocumentId(navigationLocation.SourceTree);
Shared\Utilities\AnnotatedSymbolMapping.cs (1)
70var tree = location.SourceTree!;
src\Analyzers\Core\Analyzers\MakeFieldReadonly\AbstractMakeFieldReadonlyDiagnosticAnalyzer.cs (2)
226|| ShouldSkipAnalysis(location.SourceTree!, options, context.Compilation.Options, option.Notification, cancellationToken)) 298return options.GetAnalyzerOptions(diagnosticLocation.SourceTree!).PreferReadonly;
src\Analyzers\Core\Analyzers\NamingStyle\NamingStyleDiagnosticAnalyzerBase.cs (2)
60var sourceTree = symbolContext.Symbol.Locations.FirstOrDefault()?.SourceTree; 88if (symbol?.Locations.FirstOrDefault()?.SourceTree is not { } sourceTree)
src\Analyzers\Core\Analyzers\RemoveUnnecessarySuppressions\AbstractRemoveUnnecessaryPragmaSuppressionsDiagnosticAnalyzer.cs (2)
497if (diagnostic.Location.SourceTree == tree) 555Debug.Assert(diagnostic.Location.SourceTree == tree);
src\Analyzers\Core\Analyzers\RemoveUnusedMembers\AbstractRemoveUnusedMembersDiagnosticAnalyzer.cs (2)
541r => r.SyntaxTree == diagnosticLocation.SourceTree && r.Span.Contains(diagnosticLocation.SourceSpan)); 595foreach (var tree in namedTypeSymbol.Locations.Select(l => l.SourceTree).Distinct().WhereNotNull())
src\Analyzers\Core\Analyzers\RemoveUnusedParametersAndValues\AbstractRemoveUnusedParametersAndValuesDiagnosticAnalyzer.SymbolStartAnalyzer.cs (1)
133var option = analyzerOptions.GetAnalyzerOptions(location.SourceTree!).UnusedParameters;
src\Analyzers\Core\CodeFixes\MatchFolderAndNamespace\AbstractChangeNamespaceToMatchFolderCodeFixProvider.CustomFixAllProvider.cs (1)
78.GroupBy(diagnostic => diagnostic.Location.SourceTree)
src\Analyzers\Core\CodeFixes\UseIsNullCheck\AbstractUseIsNullForReferenceEqualsCodeFixProvider.cs (1)
41var title = GetTitle(negated, diagnostic.Location.SourceTree!.Options);
SyncNamespaces\AbstractSyncNamespacesService.cs (3)
107RoslynDebug.AssertNotNull(firstDiagnostic?.Location?.SourceTree); 109var document = solution.GetRequiredDocument(firstDiagnostic.Location.SourceTree); 172.Where(diagnostic => diagnostic.Location.SourceTree?.FilePath == document.FilePath)
ValueTracking\ValueTrackedItem.cs (2)
47Contract.ThrowIfNull(location.SourceTree); 49var document = solution.GetRequiredDocument(location.SourceTree);
ValueTracking\ValueTracker.cs (1)
290if (definitionLocation is not { SourceTree: not null })
Microsoft.CodeAnalysis.LanguageServer.Protocol (7)
Features\Diagnostics\DocumentAnalysisExecutor_Helpers.cs (7)
345RoslynDebug.Assert(location.SourceTree != null); 346if (project.GetDocument(location.SourceTree) == null) 349throw new ArgumentException(string.Format(FeaturesResources.Reported_diagnostic_0_has_a_source_location_in_file_1_which_is_not_part_of_the_compilation_being_analyzed, id, location.SourceTree.FilePath), "diagnostic"); 352if (location.SourceSpan.End > location.SourceTree.Length) 355throw new ArgumentException(string.Format(FeaturesResources.Reported_diagnostic_0_has_a_source_location_1_in_file_2_which_is_outside_of_the_given_file, id, location.SourceSpan, location.SourceTree.FilePath), "diagnostic"); 422if (diagnostic.Location.SourceTree != null) 424return targetTextDocument.Project.GetDocument(diagnostic.Location.SourceTree) == targetTextDocument;
Microsoft.CodeAnalysis.Test.Utilities (5)
Diagnostics\CommonDiagnosticAnalyzers.cs (1)
1806context.TryGetValue(location.SourceTree, _treeValueProvider, out var isGeneratedCode);
Diagnostics\DiagnosticDescription.cs (4)
161_squiggledText = _location.SourceTree.GetText().ToString(_location.SourceSpan); 285if (!_syntaxPredicate(d._location.SourceTree.GetRoot().FindToken(_location.SourceSpan.Start, true).Parent)) 298if (!d._syntaxPredicate(_location.SourceTree.GetRoot().FindToken(_location.SourceSpan.Start, true).Parent)) 543assertText.AppendLine(l.SourceTree.GetText().Lines.GetLineFromPosition(l.SourceSpan.Start).ToString());
Microsoft.CodeAnalysis.VisualBasic (22)
Binding\Binder_Expressions.vb (2)
3025declarationLocation.SourceTree Is referenceLocation.SourceTree Then
CommandLine\CommandLineDiagnosticFormatter.vb (1)
132text = diagnostic.Location.SourceTree.GetText()
Compilation\VisualBasicDiagnosticFilter.vb (3)
138Dim tree = location?.SourceTree 204If location IsNot Nothing AndAlso location.SourceTree IsNot Nothing AndAlso 205location.SourceTree.GetWarningState(id, location.SourceSpan.Start) = ReportDiagnostic.Suppress Then
Emit\PEModuleBuilder.vb (1)
282Dim doc As Cci.DebugSourceDocument = DebugDocumentsBuilder.TryGetDebugDocument(span.Path, basePath:=location.SourceTree.FilePath)
Locations\LocationExtensions.vb (1)
38Return DirectCast(location.SourceTree, VisualBasicSyntaxTree)
Locations\VBLocation.vb (1)
32Return DirectCast(Me.SourceTree, VisualBasicSyntaxTree)
Symbols\LexicalSortKey.vb (3)
187If first.SourceTree IsNot Nothing AndAlso first.SourceTree Is second.SourceTree Then
Symbols\MethodSymbolExtensions.vb (1)
51If location.IsInSource AndAlso location.SourceTree Is syntaxTree AndAlso parameter.Span.Contains(location.SourceSpan) Then
Symbols\NamedTypeSymbolExtensions.vb (3)
30If methodLoc.IsInSource AndAlso methodLoc.SourceTree Is tree AndAlso methodLoc.SourceSpan = nameSpan Then 40If methodLoc.IsInSource AndAlso methodLoc.SourceTree Is tree AndAlso methodLoc.SourceSpan = nameSpan Then 62methodLoc.SourceTree Is tree AndAlso
Symbols\Source\SourceAssemblySymbol.vb (1)
493Dim compilationUnitSyntax = DirectCast(rootNs.Location.SourceTree.GetRoot(), CompilationUnitSyntax)
Symbols\Source\SourceMemberContainerTypeSymbol.vb (1)
1361Return containingSourceNamespace.GetDeclarationSpelling(firstLocation.SourceTree, firstLocation.SourceSpan.Start)
Symbols\Source\SourceModuleSymbol.vb (1)
1025Dim tree = DirectCast(loc.SourceTree, VisualBasicSyntaxTree)
Symbols\Source\SourceNamedTypeSymbol.vb (1)
540If location.IsInSource AndAlso Not DirectCast(location.SourceTree, VisualBasicSyntaxTree).IsEmbeddedSyntaxTree Then
Symbols\Symbol.vb (2)
372If location.IsInSource AndAlso location.SourceTree IsNot Nothing Then 373Dim token = CType(location.SourceTree.GetRoot().FindToken(location.SourceSpan.Start), SyntaxToken)
Microsoft.CodeAnalysis.VisualBasic.Symbol.UnitTests (30)
SymbolsTests\Source\SourceSymbolTests.vb (30)
340Assert.Equal("a.vb", locs(0).SourceTree.FilePath) 341Assert.Equal("C", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 342Assert.Equal("b.vb", locs(1).SourceTree.FilePath) 343Assert.Equal("C", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 349Assert.Equal("a.vb", locs(0).SourceTree.FilePath) 350Assert.Equal("D", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 351Assert.Equal("b.vb", locs(1).SourceTree.FilePath) 352Assert.Equal("D", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 358Assert.Equal("a.vb", locs(0).SourceTree.FilePath) 359Assert.Equal("T", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 360Assert.Equal("b.vb", locs(1).SourceTree.FilePath) 361Assert.Equal("T", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 366Assert.Equal("a.vb", locs(0).SourceTree.FilePath) 367Assert.Equal("m1", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 372Assert.Equal("a.vb", locs(0).SourceTree.FilePath) 373Assert.Equal("x", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 378Assert.Equal("a.vb", locs(0).SourceTree.FilePath) 379Assert.Equal("v1$", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 385Assert.Equal("a.vb", locs(0).SourceTree.FilePath) 386Assert.Equal("N1", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 387Assert.Equal("b.vb", locs(1).SourceTree.FilePath) 388Assert.Equal("N1", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 394Assert.Equal("a.vb", locs(0).SourceTree.FilePath) 395Assert.Equal("N2", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 396Assert.Equal("b.vb", locs(1).SourceTree.FilePath) 397Assert.Equal("N2", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan)) 403Assert.Equal("a.vb", locs(0).SourceTree.FilePath) 404Assert.Equal("N3", locs(0).SourceTree.GetText().ToString(locs(0).SourceSpan)) 405Assert.Equal("b.vb", locs(1).SourceTree.FilePath) 406Assert.Equal("N3", locs(1).SourceTree.GetText().ToString(locs(1).SourceSpan))
Microsoft.CodeAnalysis.VisualBasic.Test.Utilities (3)
CompilationTestUtils.vb (3)
1009Dim lineText As String = GetLineText(sourceLocation.SourceTree.GetText(), sourceLocation.SourceSpan.Start, offsetInLine) 1052Dim sourceTree1 = loc1.SourceTree 1053Dim sourceTree2 = loc2.SourceTree
Microsoft.CodeAnalysis.Workspaces (54)
CodeFixes\CodeFix.cs (1)
64var document = Project.GetDocument(diagnostic.Location.SourceTree);
CodeFixes\FixAllOccurrences\BatchFixAllProvider.cs (2)
119.OrderBy(d => d.Location.SourceTree!.FilePath) 148var document = solution.GetRequiredDocument(diagnostic.Location.SourceTree!);
Diagnostics\DiagnosticAnalysisResultBuilder.cs (2)
121=> AddDiagnostic(ref _lazySemanticLocals, diagnostic.Location.SourceTree, diagnostic); 159var diagnosticTree = diagnostic.Location.SourceTree;
Diagnostics\DiagnosticData.cs (1)
266builder.AddIfNotNull(CreateLocation(document.Project.Solution.GetDocument(location.SourceTree), location));
Diagnostics\Extensions.cs (4)
215var diagnostics = additionalPragmaSuppressionDiagnostics.WhereAsArray(d => d.Location.SourceTree == treeToAnalyze); 222foreach (var group in additionalPragmaSuppressionDiagnostics.GroupBy(d => d.Location.SourceTree!)) 277Debug.Assert(diagnostics.All(d => d.Location.SourceTree == tree)); 289Debug.Assert(diagnostics.All(d => d.Location.SourceTree == tree));
Editing\SymbolEditor.cs (1)
327var sourceTree = location.SourceTree;
FindSymbols\FindReferences\Finders\AbstractMemberScopedReferenceFinder.cs (1)
41var document = project.GetDocument(location.SourceTree);
FindSymbols\ReferenceLocation.cs (2)
136var thisPath = this.Location.SourceTree?.FilePath; 137var otherPath = other.Location.SourceTree?.FilePath;
ReassignedVariable\AbstractReassignedVariableService.cs (1)
248if (parameterLocation.SourceTree == semanticModel.SyntaxTree)
Recommendations\AbstractRecommendationServiceRunner.cs (1)
353static (candidateLocation, declarationSyntax) => !(declarationSyntax.SyntaxTree == candidateLocation.SourceTree &&
Rename\ConflictEngine\ConflictResolver.cs (8)
191Contract.ThrowIfNull(implicitUsageConflict.SourceTree); 193implicitUsageConflict.SourceSpan, conflictResolution.OldSolution.GetRequiredDocument(implicitUsageConflict.SourceTree).Id, RelatedLocationType.UnresolvableConflict)); 215Contract.ThrowIfNull(implicitConflict.SourceTree); 217implicitConflict.SourceSpan, conflictResolution.OldSolution.GetRequiredDocument(implicitConflict.SourceTree).Id, RelatedLocationType.UnresolvableConflict)); 335Contract.ThrowIfNull(oldLocation.SourceTree); 337oldLocation.SourceSpan, conflictResolution.OldSolution.GetRequiredDocument(oldLocation.SourceTree).Id, RelatedLocationType.UnresolvableConflict)); 371renameDeclarationLocations[symbolIndex] = new RenameDeclarationLocationReference(solution.GetDocumentId(location.SourceTree), location.SourceSpan, overriddenFromMetadata, locations.Length); 412.OrderBy(l => l.IsInSource ? solution.GetDocumentId(l.SourceTree)!.Id : Guid.Empty)
Rename\ConflictEngine\ConflictResolver.Session.cs (2)
67_documentIdOfRenameSymbolDeclaration = renameLocationSet.Solution.GetRequiredDocument(renameSymbolDeclarationLocation.SourceTree!).Id; 245.Select(l => conflictResolution.OldSolution.GetRequiredDocument(l.SourceTree!))
Rename\RenameUtilities.cs (1)
91var documentsOfRenameSymbolDeclaration = symbol.Locations.Where(l => l.IsInSource).Select(l => solution.GetRequiredDocument(l.SourceTree!));
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (6)
201var syntaxFacts = solution.GetRequiredDocument(firstLocation.SourceTree!) 234var document = solution.GetRequiredDocument(location.SourceTree); 273Contract.ThrowIfNull(aliasLocation.SourceTree); 274results.Add(new RenameLocation(aliasLocation, solution.GetRequiredDocument(aliasLocation.SourceTree).Id)); 292Contract.ThrowIfNull(aliasLocation.SourceTree); 293results.Add(new RenameLocation(aliasLocation, solution.GetRequiredDocument(aliasLocation.SourceTree).Id));
Shared\Extensions\ISolutionExtensions.cs (1)
47return solution.GetDocument(location.SourceTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\AnalysisContextExtensions.cs (4)
55=> location.SourceTree != null && context.ShouldAnalyzeSpan(location.SourceSpan, location.SourceTree); 75=> location.SourceTree != null && context.ShouldAnalyzeSpan(location.SourceSpan, location.SourceTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Extensions\LocationExtensions.cs (5)
15Contract.ThrowIfNull(location.SourceTree); 16return location.SourceTree; 38var tree = loc.SourceTree; 45return loc1.SourceTree == loc2.SourceTree && loc1.SourceSpan.IntersectsWith(loc2.SourceSpan);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.BodyLevelSymbolKey.cs (1)
78var syntaxTree = locations[0].SourceTree;
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyReader.cs (2)
725if (location.SourceTree != null) 728var semanticModel = Compilation.GetSemanticModel(location.SourceTree);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\SymbolKey\SymbolKey.SymbolKeyWriter.cs (1)
263WriteString(location.SourceTree.FilePath);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
494if (location.SourceTree != destinationMember.SyntaxTree)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService_FindDeclaration.cs (1)
190declaration = await SelectFirstOrDefaultAsync(declarations.Where(r => r.SyntaxTree == location.SourceTree), node => true, cancellationToken).ConfigureAwait(false);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationHelpers.cs (2)
202if (info.Context.AfterThisLocation?.SourceTree is { } afterSourceTree && 218if (info.Context.BeforeThisLocation?.SourceTree is { } beforeSourceTree &&
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
58var diagnosticFilePath = PathUtilities.GetDirectoryName(diagnostic?.Location.SourceTree?.FilePath ?? project.FilePath);
Workspace\Solution\SolutionCompilationState.SymbolToProjectId.cs (2)
81var syntaxTree = symbol.Locations[0].SourceTree; 178Locations: [{ SourceTree: var typeParameterSourceTree }, ..],
Microsoft.Extensions.Options.SourceGeneration (4)
Parser.cs (4)
101Location lowerLocationInCompilation = modelTypeLocation is not null && modelTypeLocation.SourceTree is not null && _compilation.ContainsSyntaxTree(modelTypeLocation.SourceTree) 296Location location = memberLocation is not null && memberLocation.SourceTree is not null && _compilation.ContainsSyntaxTree(memberLocation.SourceTree)
Microsoft.Gen.ComplianceReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
484var doc = proj.GetDocument(d.Location.SourceTree);
Microsoft.Gen.ContextualOptions.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
484var doc = proj.GetDocument(d.Location.SourceTree);
Microsoft.Gen.Logging.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
484var doc = proj.GetDocument(d.Location.SourceTree);
Microsoft.Gen.Metrics.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
484var doc = proj.GetDocument(d.Location.SourceTree);
Microsoft.Gen.MetricsReports.Unit.Tests (1)
test\Generators\Shared\RoslynTestUtils.cs (1)
484var doc = proj.GetDocument(d.Location.SourceTree);
Microsoft.Interop.ComInterfaceGenerator (4)
ComMethodInfo.cs (2)
109if (methodLocation.SourceTree == interfaceLocation.SourceTree
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
198DocumentId documentId = solutionEditor.OriginalSolution.GetDocumentId(diagnostic.Location.SourceTree)!; 200SyntaxNode root = await diagnostic.Location.SourceTree.GetRootAsync(ct).ConfigureAwait(false);
Microsoft.Interop.LibraryImportGenerator (7)
Analyzers\CustomMarshallerAttributeFixer.cs (3)
36Document doc = fixAllContext.Solution.GetDocument(diagnostic.Location.SourceTree); 42SyntaxNode root = await diagnostic.Location.SourceTree.GetRootAsync(fixAllContext.CancellationToken).ConfigureAwait(false); 183attr.ApplicationSyntaxReference.SyntaxTree == locationInAttribute.SourceTree
Analyzers\ShapeBreakingDiagnosticSuppressor.cs (2)
35SemanticModel model = context.GetSemanticModel(diagnostic.Location.SourceTree); 36ISymbol diagnosedSymbol = model.GetDeclaredSymbol(diagnostic.Location.SourceTree.GetRoot(context.CancellationToken).FindNode(diagnostic.Location.SourceSpan), context.CancellationToken);
src\libraries\System.Runtime.InteropServices\gen\Common\ConvertToSourceGeneratedInteropFixer.cs (2)
198DocumentId documentId = solutionEditor.OriginalSolution.GetDocumentId(diagnostic.Location.SourceTree)!; 200SyntaxNode root = await diagnostic.Location.SourceTree.GetRootAsync(ct).ConfigureAwait(false);
Microsoft.ML.InternalCodeAnalyzer (1)
RelaxTestNamingSuppressor.cs (1)
36if (!(diagnostic.Location.SourceTree is { } tree))
Microsoft.VisualStudio.LanguageServices (17)
CallHierarchy\CallHierarchyDetail.cs (5)
31_documentId = workspace.CurrentSolution.GetDocumentId(location.SourceTree); 35File = location.SourceTree.FilePath; 44var start = location.SourceTree.GetText().Lines[lineSpan.StartLinePosition.Line].Start; 45var end = location.SourceTree.GetText().Lines[lineSpan.EndLinePosition.Line].End; 46return location.SourceTree.GetText().GetSubText(TextSpan.FromBounds(start, end)).ToString();
Diagnostics\VisualStudioVenusSpanMappingService.cs (2)
73if (location.SourceTree != null) 75return location.SourceTree.GetText().Lines;
MoveStaticMembers\VisualStudioMoveStaticMembersOptionsService.cs (1)
160private static string GetFile(Location loc) => loc.SourceTree!.FilePath;
Progression\GraphBuilder.cs (4)
200var preferredLocation = symbol.Locations.FirstOrDefault(l => l.SourceTree != null); 207preferredLocation = symbol.Locations.FirstOrDefault(l => l.SourceTree == syntaxTree) ?? preferredLocation; 232if (preferredLocation?.SourceTree != null) 236preferredLocation.SourceTree.FilePath,
Progression\GraphQueries\IsUsedByGraphQuery.cs (3)
53if (location.SourceTree == null) 56var lineText = location.SourceTree.GetText(cancellationToken).Lines[span.StartLinePosition.Line].ToString(); 57var filePath = location.SourceTree.FilePath;
Venus\ContainedLanguageCodeSupport.cs (2)
210var position = type.Locations.First(loc => loc.SourceTree == targetSyntaxTree).SourceSpan.Start; 491var typeLocation = type.Locations.FirstOrDefault(d => d.SourceTree == containingTree);
System.Text.Json.SourceGeneration (3)
Helpers\RoslynExtensions.cs (2)
41=> location.SourceTree != null && compilation.ContainsSyntaxTree(location.SourceTree);
src\libraries\Common\src\SourceGenerators\DiagnosticInfo.cs (1)
34=> Location.Create(location.SourceTree?.FilePath ?? "", location.SourceSpan, location.GetLineSpan().Span);
System.Text.RegularExpressions.Generator (1)
RegexGenerator.Parser.cs (1)
255return Location.Create(location.SourceTree?.FilePath ?? string.Empty, location.SourceSpan, location.GetLineSpan().Span);