]> granicus.if.org Git - clang/blobdiff - lib/Sema/SemaType.cpp
Revert r279486 "Fix regression introduced by r279164"
[clang] / lib / Sema / SemaType.cpp
index 8a49f6120cf8e82254c8184004884044366614ca..091a4e34e19543c490e77bc4c40d9cd73fc5bcce 100644 (file)
@@ -6890,10 +6890,6 @@ bool Sema::hasVisibleDefinition(NamedDecl *D, NamedDecl **Suggested,
       return false;
     }
     D = ED->getDefinition();
-  } else if (auto *FD = dyn_cast<FunctionDecl>(D)) {
-    if (auto *Pattern = FD->getTemplateInstantiationPattern())
-      FD = Pattern;
-    D = FD->getDefinition();
   }
   assert(D && "missing definition for pattern of instantiated definition");
 
@@ -6901,7 +6897,7 @@ bool Sema::hasVisibleDefinition(NamedDecl *D, NamedDecl **Suggested,
   if (isVisible(D))
     return true;
 
-  // The external source may have additional definitions of this entity that are
+  // The external source may have additional definitions of this type that are
   // visible, so complete the redeclaration chain now and ask again.
   if (auto *Source = Context.getExternalSource()) {
     Source->CompleteRedeclChain(D);