Skip to content

Warn when a conversion operator is implemented (since they aren't supported) #6860

Closed as not planned

Description

@llvm-beanz

Description
In HLSL 2021 operator overloading was enabled, and it allows users to write conversion operators. The problem is they are never called because DXC's overload resolution doesn't handle conversion operators in any context.

We should emit a warning when writing operators that are never callable. (TBD: should this warning default as error)

Steps to Reproduce
https://godbolt.org/z/9sKzjqsqT

Environment

  • DXC version: 1.8.2407
  • Host Operating System: All

Activity

  1. added
    bug
    needs-triage
    on Aug 14, 2024
  2. changed the title [-]Disallow conversion operators[/-] [+]Warn when a conversion operator is implemented (since they aren't supported)[/+] on Aug 15, 2024
  3. devshgraphicsprogramming commented on Aug 17, 2024

    @devshgraphicsprogramming

    (TBD: should this warning default as error)

    Yes please, that code never worked and might help to catch bugs.

  4. llvm-beanz commented on Aug 28, 2024

    @llvm-beanz
    CollaboratorAuthor

    This is a duplicate of #5103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions