[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:43:09 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:
So the flag on FunctionDecl now appears to be just a shortcut of getDescribedTemplate()->getInstantiatedFromMemberTemplate(), or am I missing something else?
https://github.com/llvm/llvm-project/pull/110387
More information about the cfe-commits
mailing list