Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Clearer error output when you pass a temporary object into an inout parameter #6594

Open
nipunG314 opened this issue May 7, 2024 · 1 comment
Labels
diagnostic Issues for diagnostics dxil enhancement Feature suggestion spirv Work related to SPIR-V
Milestone

Comments

@nipunG314
Copy link

Is your feature request related to a problem? Please describe.
I have created an intentionally broken program here.
https://godbolt.org/z/1MxWvPP6E

This problem is easy to run into if you pass a temporary object into a inout parameter. I wish the compiler output was a bit clearer about what has gone wrong. If we remove the -spirv flag, it becomes clearer:

<source>:14:23: error: cannot compile this l-value expression yet
    counter.histogram(1);
                      ^
Compiler returned: 5

Describe the solution you'd like

It would be great if the output with the flag was also clear.

@nipunG314 nipunG314 added enhancement Feature suggestion needs-triage Awaiting triage labels May 7, 2024
@llvm-beanz llvm-beanz added diagnostic Issues for diagnostics dxil spirv Work related to SPIR-V and removed needs-triage Awaiting triage labels May 7, 2024
@llvm-beanz
Copy link
Collaborator

I'm marking this as both dxil and spriv because both messages are bad and not particularly useful. This should be failing overload resolution and providing a reasonable explanation as to why.

@llvm-beanz llvm-beanz added this to the Dormant milestone May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
diagnostic Issues for diagnostics dxil enhancement Feature suggestion spirv Work related to SPIR-V
Projects
Status: Triaged
Development

No branches or pull requests

2 participants