Ensure code generation for friend declarations in class templates.



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80418 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 8370bd1..df4ebfa 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -498,6 +498,8 @@
     Function->setObjectOfFriendDecl(WasDeclared);
     if (!Owner->isDependentContext())
       DC->makeDeclVisibleInContext(Function);
+
+    Function->setInstantiationOfMemberFunction(D);
   }
   
   if (InitFunctionInstantiation(Function, D))