Skip to content

[HLSL][RootSignature] Retain SourceLocation of RootElement for use in Diags with SemaHLSL #145819

Open
@inbelic

Description

@inbelic

At the moment, when we report diagnostics from SemaHLSL we only provide the source location of the attr. This allows for significantly less helpful diagnostics (for eg. reporting resource range overlaps).

This issue tracks implementing a way to retain the source location of a root element when it is parsed, so that we can output its SourceLocation in the diagnostics produce during semantic analysis.

Potential solutions:

  • Using a DenseMap to point from a RootElement to its SourceLocation
  • Creating a wrapper clang::hlsl::RootElement struct that wraps the llvm::hlsl::rootsig::RootElement equivalent, that will hold all additional diagnostic data that wouldn't be available to llvm::hlsl:rootsig::RootElement.

A potential solution should be listed as a proposed solution before it is ready for refinement.

Metadata

Metadata

Assignees

Labels

HLSLHLSL Language Support

Type

No type

Projects

Status

Planning

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions