================ @@ -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); ---------------- zwuis wrote:
```cpp if (auto *MD = dyn_cast_if_present<CXXMethodDecl>(S.getCurFunctionDecl()); MD && ...) ``` See <https://llvm.org/docs/ProgrammersManual.html#the-isa-cast-and-dyn-cast-templates>. 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