Unverified Commit 7b0396fa authored by Shafik Yaghmour's avatar Shafik Yaghmour Committed by GitHub
Browse files

[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
parent 20737825
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment