================ @@ -9192,7 +9194,7 @@ ComputeDefaultedComparisonExceptionSpec(Sema &S, SourceLocation Loc, EnterExpressionEvaluationContext Context( S, Sema::ExpressionEvaluationContext::Unevaluated); - CXXRecordDecl *RD = cast<CXXRecordDecl>(FD->getLexicalParent()); + auto RD = getRecordDeclFromFirstParameter(FD); ---------------- a-tarasyuk wrote:
@zyn0217 Thanks for the feedback and for pointing out that helper. I've updated the code to use it. Previously, I used a solution similar to `DefineDefaultedComparison` to maintain a consistent approach, which might make sense at the `DefineDefaultedComparison` stage but not in `ComputeDefaultedComparisonExceptionSpec`. https://github.com/llvm/llvm-project/pull/96228 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits