================ @@ -2052,7 +2052,7 @@ static void DiagnoseNonTriviallyRelocatableReason(Sema &SemaRef, } if (!D->hasSimpleMoveConstructor() && !D->hasSimpleCopyConstructor()) { - const auto *Decl = cast<CXXConstructorDecl>( + const auto *Decl = cast_or_null<CXXConstructorDecl>( ---------------- ojhunt wrote:
I didn't realize that this path was being hit solely as a "is there some other constructor?" check, I was paranoid that there was a prior state error that meant a constructor was expected to exist. https://github.com/llvm/llvm-project/pull/143350 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits