Add InvalidEffectIdValueAnalyzer
このコミットが含まれているのは:
1 親
37fee87489
コミット
8cbb3c958e
4ファイル変更
+96
-1
検索条件に一致するファイルはありません
@@ -8,6 +8,21 @@ namespace ComputeSharp.SourceGeneration.Extensions;
|
||||
/// </summary>
|
||||
internal static class AttributeDataExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Tries to get the location of the input <see cref="AttributeData"/> instance.
|
||||
/// </summary>
|
||||
/// <param name="attributeData">The input <see cref="AttributeData"/> instance to get the location for.</param>
|
||||
/// <returns>The resulting location for <paramref name="attributeData"/>, if a syntax reference is available.</returns>
|
||||
public static Location? GetLocation(this AttributeData attributeData)
|
||||
{
|
||||
if (attributeData.ApplicationSyntaxReference is { } syntaxReference)
|
||||
{
|
||||
return syntaxReference.SyntaxTree.GetLocation(syntaxReference.Span);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to get a constructor argument at a given index from the input <see cref="AttributeData"/> instance.
|
||||
/// </summary>
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする