[clang] Sema: suppress deprecated field warnings in implicit special-member functions Fixes: https://github.com/llvm/llvm-project/issues/147293 (PR #147400)
Shashi Shankar via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 8 03:14:58 PDT 2025
================
@@ -547,6 +547,20 @@ static void DoEmitAvailabilityWarning(Sema &S, AvailabilityResult K,
return;
}
case AR_Deprecated:
+ // Suppress -Wdeprecated-declarations in purely implicit special-member functions.
+ if (const FunctionDecl *FD = S.getCurFunctionDecl()) {
+ // Only proceed if this is an implicit, defaulted member function:
+ if (auto *MD = dyn_cast_if_present<CXXMethodDecl>(FD);
----------------
shashi1687 wrote:
Thank you for the feedback! I’ve made the changes
https://github.com/llvm/llvm-project/pull/147400
More information about the cfe-commits
mailing list