[Clang] Improve the diagnostic for _Imag int/float LValue not assignable
Open
clang:diagnostics
clang:frontend
enhancement
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
After https://github.com/llvm/llvm-project/pull/218270, Clang will not crash but will report an error message.
```c++
_Complex float foo()
{
float f;
__real__ f = 0;
__imag__ f = 0; <--- errror: expression is not assignable
return f;
}
```
This issue is a follow-up task to improve the diagnostic message suggested in: https://github.com/llvm/llvm-project/pull/218270#pullrequestreview-5082973528
The current suggested error message is: `__imag operator with non-complex type is not assignable.`
Contributor guide
Assessment
This issue has not been assessed yet.