microsoft / microsoft/DirectXShaderCompiler
[Feature Request] Clearer error output when you pass a temporary object into an inout parameter
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 3.7k
- Forks
- 900
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 44
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the intentionally broken program from the Godbolt link, comparing compiler output with and without the -spirv flag. Start from the diagnostic for counter.histogram(1) and determine how the SPIR-V path reports the temporary-object/inout-parameter error; done means the flagged invocation produces an equally clear diagnostic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100