Fix bug 4784 and allow friend declarations to properly extend
existing declaration chains.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80636 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index aa116b2..c5b2894 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -498,7 +498,7 @@
bool WasDeclared = (FOK == Decl::FOK_Declared);
Function->setObjectOfFriendDecl(WasDeclared);
if (!Owner->isDependentContext())
- DC->makeDeclVisibleInContext(Function);
+ DC->makeDeclVisibleInContext(Function, /* Recoverable = */ false);
Function->setInstantiationOfMemberFunction(D);
}