Commit 9f6b3199 authored by Shafik Yaghmour's avatar Shafik Yaghmour
Browse files

[Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the...

[Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the CXXMethodDecl is not deleted before attempting to call DefineDefaultedFunction(...)

I discovered this additional bug at the end of working on D132906

In Sema::CheckCompletedCXXClass(...)  uses a lambda CheckForDefaultedFunction to
verify each CXXMethodDecl holds to the expected invariants before passing them
on to CheckForDefaultedFunction.

It is currently missing a check that it is not deleted, this adds that check and
a test that crashed without this check.

This fixes: https://github.com/llvm/llvm-project/issues/57516

Differential Revision: https://reviews.llvm.org/D133177
parent 38941da0
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