summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-03-11 09:03:00 +0000
committerJohn McCall <rjmccall@apple.com>2010-03-11 09:03:00 +0000
commit58f10c3380640962d251db70ac876e5ea7336c59 (patch)
tree8a649d3425186c5779746e250b519b853bcbda91 /clang/lib/Sema/SemaDecl.cpp
parent8c4df8160ed0d6e2b96a31c1c0fb12cc77328c80 (diff)
downloadbcm5719-llvm-58f10c3380640962d251db70ac876e5ea7336c59.tar.gz
bcm5719-llvm-58f10c3380640962d251db70ac876e5ea7336c59.zip
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). llvm-svn: 98252
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r--clang/lib/Sema/SemaDecl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp
index 94fcfc6c29e..76081992027 100644
--- a/clang/lib/Sema/SemaDecl.cpp
+++ b/clang/lib/Sema/SemaDecl.cpp
@@ -2718,6 +2718,7 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC,
D.getIdentifierLoc(), Name, R,
isInline,
/*isImplicitlyDeclared=*/false);
+ NewFD->setTypeSourceInfo(TInfo);
isVirtualOkay = true;
} else {
OpenPOWER on IntegriCloud