Skip to content

Commit ad1af5f

Browse files
committed
fixup
1 parent 30b0359 commit ad1af5f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

clang/include/clang/AST/DeclTemplate.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,17 @@ class FunctionTemplateDecl : public RedeclarableTemplateDecl {
10151015
return getTemplatedDecl()->isInstantiatedFromMemberTemplate() ||
10161016
isThisDeclarationADefinition();
10171017
}
1018+
1019+
// This bit closely tracks 'RedeclarableTemplateDecl::InstantiatedFromMember',
1020+
// except this is per declaration, while the redeclarable field is
1021+
// per chain. This indicates a template redeclaration which
1022+
// is compatible with the definition, in the non-trivial case
1023+
// where this is not already a definition.
1024+
// This is only really needed for instantiating the definition of friend
1025+
// function templates, which can have redeclarations in different template
1026+
// contexts.
1027+
// The bit is actually stored in the FunctionDecl for space efficiency
1028+
// reasons.
10181029
void setInstantiatedFromMemberTemplate(FunctionTemplateDecl *D) {
10191030
getTemplatedDecl()->setInstantiatedFromMemberTemplate();
10201031
RedeclarableTemplateDecl::setInstantiatedFromMemberTemplate(D);

0 commit comments

Comments
 (0)