================ @@ -547,6 +547,15 @@ static void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K, return; } case AR_Deprecated: + // Suppress -Wdeprecated-declarations in purely implicit special-member functions. + if (auto *MD = dyn_cast_if_present<CXXMethodDecl>(S.getCurFunctionDecl()); + MD && MD->isImplicit() && MD->isDefaulted() && + (isa<CXXConstructorDecl, CXXDestructorDecl>(MD) || + MD->isCopyAssignmentOperator() || + MD->isMoveAssignmentOperator())) { + return; + } + ---------------- shashforge wrote:
@zwuis – just to clarify: * @cor3ntin review comment has already been addressed**: the early-exit now lives in Sema::ShouldWarnAboutDeprecatedDecl`, exactly as suggested. * This was pushed **before** I re-requested review. * Relevant code, now on `HEAD`: ```cpp if (const auto *FD = dyn_cast_or_null<FunctionDecl>(S.getCurFunctionDecl()); FD && FD->isImplicit()) return; } ``` `ninja check-clang` is green. Let me know if I missed anything—happy to tweak further! https://github.com/llvm/llvm-project/pull/147400 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits