[modules] Allow a function to be redefined if the old definition is not visible.
llvm-svn: 233407
diff --git a/clang/lib/Sema/SemaLookup.cpp b/clang/lib/Sema/SemaLookup.cpp
index ac7376e..1244829 100644
--- a/clang/lib/Sema/SemaLookup.cpp
+++ b/clang/lib/Sema/SemaLookup.cpp
@@ -1226,8 +1226,7 @@
DeclContext *DC = D->getLexicalDeclContext();
if (!D->isModulePrivate() &&
DC && !DC->isFileContext() && !isa<LinkageSpecDecl>(DC)) {
- NamedDecl *Hidden;
- if (SemaRef.hasVisibleDefinition(cast<NamedDecl>(DC), &Hidden)) {
+ if (SemaRef.hasVisibleDefinition(cast<NamedDecl>(DC))) {
if (SemaRef.ActiveTemplateInstantiations.empty()) {
// Cache the fact that this declaration is implicitly visible because
// its parent has a visible definition.