Maintain type source information for functions through template
instantiation.  Based on a patch by Enea Zaffanella!  I found a way to
reduce some of the redundancy between TreeTransform's "standard"
FunctionProtoType transformation and TemplateInstantiator's override,
and I killed off the old SubstFunctionType by adding type source info
for the last cases where we were creating FunctionDecls without TSI
(at least that get passed through template instantiation).



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98252 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp
index 94fcfc6..7608199 100644
--- a/lib/Sema/SemaDecl.cpp
+++ b/lib/Sema/SemaDecl.cpp
@@ -2718,6 +2718,7 @@
                                         D.getIdentifierLoc(), Name, R,
                                         isInline,
                                         /*isImplicitlyDeclared=*/false);
+      NewFD->setTypeSourceInfo(TInfo);
 
       isVirtualOkay = true;
     } else {