Shafik Yaghmour 7b0396faab
[Clang][Sema] Fix crash when type used in return statement contains errors (#79788)
In Sema in `BuildReturnStmt(...)` when we try to determine is the type
is move eligible or copy elidable we don't currently check of the init
of the `VarDecl` contain errors or not. This can lead to a crash since
we may send a type that is not complete into `getTypeInfo(...)` which
does not allow this.

This fixes: https://github.com/llvm/llvm-project/issues/63244
https://github.com/llvm/llvm-project/issues/79745
2024-01-29 10:08:09 -08:00
..
2024-01-20 18:57:35 -08:00