Skip to content

[HLSL][RootSignature] Simplify and Audit RootSignatureParser Diagnostics #147799

@inbelic

Description

@inbelic

This issue tracks a final "polishing/auditing" of the diagnostics produced in RootSignatureParser diagnostics.

Namely, it has been noted more than once that the current diag::err_hlsl_unexpected_end_of_params is not direct and can be misleading. For instance, here and here.

As part of addressing this, it was also discovered that there was some test gaps in the diagnostics produced for enum/flags. This issue will also track the implementation of this as well.

This issue is resolved when we have split the current uses of diag::err_hlsl_unexpected_end_of_params into separate more direct cases, and also extend the use of such to enum/flag parsing.

AC:

  • Removes all uses of diag::err_hlsl_unexpected_end_of_params in RootSigantureParser
  • Introduce a new more direct diagnostic for an invalid value/param of the RootSignature
  • In each of these cases, replace the diagnostic with either the new diagnostic or diag::err_expected accordingly
  • Update HLSLRootSignatureParserTest to account for diagnostic changes
  • Increase test coverage of HLSLRootSignatureParserTest for enum/flag diagnostics
  • Increase test coverage of RootSignatures-err for enum/flag diagnostics

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Supportclang:frontendLanguage frontend issues, e.g. anything involving "Sema"

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions