Handle and emit diagnostic for initializer expressions

このコミットが含まれているのは:
Sergio Pedri committed 2023-11-29 00:19:05 +01:00
1 親 45455abda9
コミット 1826122849
6ファイル変更
+42 -5

検索条件に一致するファイルはありません

+1
ファイルの表示
@@ -77,3 +77,4 @@ CMPSD2D0067 | ComputeSharp.D2D1.Shaders | Error | [Documentation](https://github
CMPSD2D0068 | ComputeSharp.D2D1.Shaders | Error | [Documentation](https://github.com/Sergio0694/ComputeSharp)
CMPSD2D0069 | ComputeSharp.D2D1.Shaders | Warning | [Documentation](https://github.com/Sergio0694/ComputeSharp)
CMPSD2D0070 | ComputeSharp.D2D1.Shaders | Warning | [Documentation](https://github.com/Sergio0694/ComputeSharp)
CMPSD2D0071 | ComputeSharp.D2D1.Shaders | Error | [Documentation](https://github.com/Sergio0694/ComputeSharp)
+13
ファイルの表示
@@ -1054,4 +1054,17 @@ partial class DiagnosticDescriptors
isEnabledByDefault: true,
description: "Shader types should be readonly (shaders cannot mutate their instance state while running, so shader types not being readonly makes them error prone).",
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
/// <summary>
/// Gets a <see cref="DiagnosticDescriptor"/> for an initializer expression.
/// </summary>
public static readonly DiagnosticDescriptor InitializerExpression = new(
id: "CMPSD2D0071",
title: "Initializer expression",
messageFormat: "An initializer expression cannot be used in a pixel shader",
category: "ComputeSharp.D2D1.Shaders",
defaultSeverity: DiagnosticSeverity.Error,
isEnabledByDefault: true,
description: "An initializer expression cannot be used in a pixel shader.",
helpLinkUri: "https://github.com/Sergio0694/ComputeSharp");
}