Skip to content

Commit 3ad3b6c

Browse files
committed
update comments
1 parent 5e24d21 commit 3ad3b6c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

clang/lib/Sema/SemaTemplateInstantiateDecl.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4694,6 +4694,13 @@ bool Sema::InstantiateDefaultArgument(SourceLocation CallLoc, FunctionDecl *FD,
46944694
ParmVarDecl *Param) {
46954695
assert(Param->hasUninstantiatedDefaultArg());
46964696

4697+
// FIXME: We don't track member specialization info for non-defining
4698+
// friend declarations, so we will not be able to later find the function
4699+
// pattern. As a workaround, don't instantiate the default argument in this
4700+
// case. This is correct per wording and only an error recovery issue, as per
4701+
// [dcl.fct.default]p4:
4702+
// if a friend declaration D specifies a default argument expression,
4703+
// that declaration shall be a definition.
46974704
if (FD->getFriendObjectKind() != Decl::FOK_None &&
46984705
!FD->getTemplateInstantiationPattern())
46994706
return true;

0 commit comments

Comments
 (0)