[clang] [RFC] Initial implementation of P2719 (PR #113510)
Oliver Hunt via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 25 13:50:55 PDT 2025
================
@@ -16298,6 +16396,70 @@ bool Sema::CompleteConstructorCall(CXXConstructorDecl *Constructor,
return Invalid;
}
+bool Sema::isTypeAwareOperatorNewOrDelete(const NamedDecl *ND) const {
+ const FunctionDecl *FnDecl = nullptr;
+ if (auto *FTD = dyn_cast<FunctionTemplateDecl>(ND))
+ FnDecl = FTD->getTemplatedDecl();
+ else if (auto *FD = dyn_cast<FunctionDecl>(ND))
+ FnDecl = FD;
+
----------------
ojhunt wrote:
I think I might have variations of this for CXXRecord vs Template, does getAsCXXRecordDecl() or similar exist that does this? (I'll do a search for all uses of dyn_cast)
https://github.com/llvm/llvm-project/pull/113510
More information about the cfe-commits
mailing list