Skip to content

[HLSL] vector size and type errors have no source location  #111572

@pow2clk

Description

@pow2clk

Vectors with invalid sizes or types will display no code location for their errors given that they are defined in HLSLExternalSemaSource and not a line of HLSL. The accompanying notes will show the proper lines of code, but the errors having no location make it impossible to write verify tests for these errors

See https://godbolt.org/z/7jT7Trh8K

Proposed solution: use concepts to verify the vector size, this will generate error messages pointing at the correct line. Assumption for estimates here is that we've worked through all the issues around making this work well as part of our resource element type validation solution.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HLSLHLSL Language Supportclang:diagnosticsNew/improved warning or error message in Clang, but not in clang-tidy or static analyzer

    Type

    No type

    Projects

    Status

    Ready

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions