[clang] [clang] Track function template instantiation from definition (PR #110387)
Younan Zhang via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 8 18:54:14 PDT 2024
================
@@ -1008,6 +1008,15 @@ class FunctionTemplateDecl : public RedeclarableTemplateDecl {
return getTemplatedDecl()->isThisDeclarationADefinition();
}
+ bool isCompatibleWithDefinition() const {
+ return getTemplatedDecl()->isInstantiatedFromMemberTemplate() ||
+ isThisDeclarationADefinition();
+ }
+ void setInstantiatedFromMemberTemplate(FunctionTemplateDecl *D) {
+ getTemplatedDecl()->setInstantiatedFromMemberTemplate();
+ RedeclarableTemplateDecl::setInstantiatedFromMemberTemplate(D);
+ }
----------------
zyn0217 wrote:
Get it, thanks!
https://github.com/llvm/llvm-project/pull/110387
More information about the cfe-commits
mailing list