[Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the...
[Clang] Fix lambda CheckForDefaultedFunction(...) so that it checks the CXXMethodDecl is a special member function before attempting to call DefineDefaultedFunction(...) In Sema::CheckCompletedCXXClass(...) It used a lambda CheckForDefaultedFunction the CXXMethodDecl passed to CheckForDefaultedFunction may not be a special member function and so before attempting to apply functions that only apply to special member functions it needs to check. It fails to do this before calling DefineDefaultedFunction(...). This PR adds that check and test to verify we no longer crash. This fixes https://github.com/llvm/llvm-project/issues/57431 Differential Revision: https://reviews.llvm.org/D132906
Loading
Please sign in to comment