AmrDeveloper wrote:

> Something like that, I asked b/c I noticed EDG does diagnose: 
> https://godbolt.org/z/7KhchGojW

In that link, EDG reports a warning (Not sure if it should do that if it 
supports GCC mode), but this is not the crash case.

For the imag scalar as lvalue: https://godbolt.org/z/Ycd9EYbov

EDG reports the following error: `error: expression must be a modifiable lvalue`
GCC: `lvalue required as left operand of assignment`

I think it's more helpful to report the exact reason; I did that locally here

https://github.com/llvm/llvm-project/blob/main/clang/lib/Sema/SemaExpr.cpp#L14483-L14487

And the only test that fails after running the check parser, sema, and semacxx 
targets is the test that I introduced in this diff.

I can do that in a follow-up PR 



https://github.com/llvm/llvm-project/pull/218270
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to