Skip to content

Commit ca72180

Browse files
committed
udpate
1 parent d73a5cb commit ca72180

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/Analyzers/RoslynExtensions.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,6 @@ public static bool IsEqualTo(this IMethodSymbol methodSymbol, INamedTypeSymbol?
162162
/// <returns>The Diagnostic based on the symbol location.</returns>
163163
public static Diagnostic BuildDiagnostic(DiagnosticDescriptor descriptor, ISymbol symbol, params string[] messageArgs)
164164
{
165-
// If the symbol has no syntax references (e.g., symbols from external assemblies),
166-
// fall back to using the symbol's location directly.
167-
if (symbol.DeclaringSyntaxReferences.IsEmpty)
168-
{
169-
return Diagnostic.Create(descriptor, symbol.Locations.FirstOrDefault() ?? Location.None, messageArgs);
170-
}
171-
172165
return BuildDiagnostic(descriptor, symbol.DeclaringSyntaxReferences.First().GetSyntax(), messageArgs);
173166
}
174167

0 commit comments

Comments
 (0)