diff --git lib/Sema/SemaTemplateInstantiateDecl.cpp lib/Sema/SemaTemplateInstantiateDecl.cpp
index bbf8f50..7381e27 100644
--- lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -2424,9 +2424,6 @@ void Sema::InstantiateExceptionSpec(SourceLocation PointOfInstantiation,
 bool
 TemplateDeclInstantiator::InitFunctionInstantiation(FunctionDecl *New,
                                                     FunctionDecl *Tmpl) {
-  if (Tmpl->isDeletedAsWritten())
-    New->setDeletedAsWritten();
-
   // If we are performing substituting explicitly-specified template arguments
   // or deduced template arguments into a function template and we reach this
   // point, we are now past the point where SFINAE applies and have committed
@@ -2549,9 +2546,10 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
 
   Stmt *Pattern = PatternDecl->getBody(PatternDecl);
   assert(PatternDecl && "template definition is not a template");
+  bool IsDefined = true;
   if (!Pattern) {
-    // Try to find a defaulted definition
-    PatternDecl->isDefined(PatternDecl);
+    // Try to find a defaulted or deleted definition
+    IsDefined = PatternDecl->isDefined(PatternDecl);
   }
   assert(PatternDecl && "template definition is not a template");
 
@@ -2571,7 +2569,7 @@ void Sema::InstantiateFunctionDefinition(SourceLocation PointOfInstantiation,
     Pattern = PatternDecl->getBody(PatternDecl);
   }
 
-  if (!Pattern && !PatternDecl->isDefaulted()) {
+  if (!Pattern && !IsDefined) {
     if (DefinitionRequired) {
       if (Function->getPrimaryTemplate())
         Diag(PointOfInstantiation,
diff --git test/SemaCXX/deleted-function.cpp test/SemaCXX/deleted-function.cpp
index 2ee6064..2e9695e 100644
--- test/SemaCXX/deleted-function.cpp
+++ test/SemaCXX/deleted-function.cpp
@@ -59,7 +59,6 @@ DelDtor dd; // expected-error {{attempt to use a deleted function}}
 template<typename> void test2() = delete;
 template void test2<int>();
 
-// test3 really shouldn't have behavior that differs from test2 above
-template<typename> void test3() = delete; // expected-note {{explicit instantiation refers here}}
+template<typename> void test3() = delete;
 template<typename> void test3();
-template void test3<int>(); // expected-error {{explicit instantiation of undefined function template 'test3'}}
+template void test3<int>();
