Remove unnecessary diagnostic parameters
このコミットが含まれているのは:
1 親
9d5e412f7d
コミット
2c1ab945b2
3ファイル変更
+4
-15
検索条件に一致するファイルはありません
+1
-7
@@ -1,8 +1,6 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using ComputeSharp.D2D1.SourceGenerators.Helpers;
|
||||
using ComputeSharp.SourceGeneration.Extensions;
|
||||
using ComputeSharp.SourceGeneration.Helpers;
|
||||
using ComputeSharp.SourceGeneration.Models;
|
||||
using Microsoft.CodeAnalysis;
|
||||
|
||||
namespace ComputeSharp.D2D1.SourceGenerators;
|
||||
@@ -18,14 +16,10 @@ partial class ID2D1ShaderGenerator
|
||||
/// <summary>
|
||||
/// Extracts the effect display name info for the current shader.
|
||||
/// </summary>
|
||||
/// <param name="diagnostics">The collection of produced <see cref="DiagnosticInfo"/> instances.</param>
|
||||
/// <param name="compilation">The input <see cref="Compilation"/> object currently in use.</param>
|
||||
/// <param name="structDeclarationSymbol">The <see cref="INamedTypeSymbol"/> for the shader type in use.</param>
|
||||
/// <returns>The resulting effect display name.</returns>
|
||||
public static string GetInfo(
|
||||
ImmutableArrayBuilder<DiagnosticInfo> diagnostics,
|
||||
Compilation compilation,
|
||||
INamedTypeSymbol structDeclarationSymbol)
|
||||
public static string GetInfo(Compilation compilation, INamedTypeSymbol structDeclarationSymbol)
|
||||
{
|
||||
if (TryGetDefinedEffectDisplayName(compilation, structDeclarationSymbol, out string? effectDisplayName))
|
||||
{
|
||||
|
||||
@@ -5,7 +5,6 @@ using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using ComputeSharp.SourceGeneration.Extensions;
|
||||
using ComputeSharp.SourceGeneration.Helpers;
|
||||
using ComputeSharp.SourceGeneration.Models;
|
||||
using Microsoft.CodeAnalysis;
|
||||
|
||||
namespace ComputeSharp.D2D1.SourceGenerators;
|
||||
@@ -27,14 +26,10 @@ partial class ID2D1ShaderGenerator
|
||||
/// <summary>
|
||||
/// Extracts the effect id info for the current shader.
|
||||
/// </summary>
|
||||
/// <param name="diagnostics">The collection of produced <see cref="DiagnosticInfo"/> instances.</param>
|
||||
/// <param name="compilation">The input <see cref="Compilation"/> object currently in use.</param>
|
||||
/// <param name="structDeclarationSymbol">The <see cref="INamedTypeSymbol"/> for the shader type in use.</param>
|
||||
/// <returns>The resulting effect id.</returns>
|
||||
public static ImmutableArray<byte> GetInfo(
|
||||
ImmutableArrayBuilder<DiagnosticInfo> diagnostics,
|
||||
Compilation compilation,
|
||||
INamedTypeSymbol structDeclarationSymbol)
|
||||
public static ImmutableArray<byte> GetInfo(Compilation compilation, INamedTypeSymbol structDeclarationSymbol)
|
||||
{
|
||||
if (TryGetDefinedEffectId(compilation, structDeclarationSymbol, out ImmutableArray<byte> effectId))
|
||||
{
|
||||
|
||||
@@ -53,12 +53,12 @@ public sealed partial class ID2D1ShaderGenerator : IIncrementalGenerator
|
||||
using ImmutableArrayBuilder<DiagnosticInfo> diagnostics = ImmutableArrayBuilder<DiagnosticInfo>.Rent();
|
||||
|
||||
// EffectId info
|
||||
ImmutableArray<byte> effectId = EffectId.GetInfo(diagnostics, context.SemanticModel.Compilation, typeSymbol);
|
||||
ImmutableArray<byte> effectId = EffectId.GetInfo(context.SemanticModel.Compilation, typeSymbol);
|
||||
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
// EffectDisplayName info
|
||||
string effectDisplayName = EffectDisplayName.GetInfo(diagnostics, context.SemanticModel.Compilation, typeSymbol);
|
||||
string effectDisplayName = EffectDisplayName.GetInfo(context.SemanticModel.Compilation, typeSymbol);
|
||||
|
||||
token.ThrowIfCancellationRequested();
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする