diff options
author | John McCall <rjmccall@apple.com> | 2010-12-14 07:30:51 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-12-14 07:30:51 +0000 |
commit | 5bfe232d1f07a6fd160fcf82c277c055a412a1c0 (patch) | |
tree | 0970af747e2811a9fa2c649a20e111820ecc7392 /lib/Sema/SemaTemplateInstantiateDecl.cpp | |
parent | 0e88aa7100da32acc63bc8a4dcb946ed517868f1 (diff) |
Pull out r121752 in case it's causing the selfhost breakage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121759 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r-- | lib/Sema/SemaTemplateInstantiateDecl.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp index 2f73991ec5..31692fc1f2 100644 --- a/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -1995,20 +1995,19 @@ TemplateDeclInstantiator::InitFunctionInstantiation(FunctionDecl *New, // Rebuild the function type - FunctionProtoType::ExtProtoInfo EPI = Proto->getExtProtoInfo(); - EPI.HasExceptionSpec = Proto->hasExceptionSpec(); - EPI.HasAnyExceptionSpec = Proto->hasAnyExceptionSpec(); - EPI.NumExceptions = Exceptions.size(); - EPI.Exceptions = Exceptions.data(); - EPI.ExtInfo = Proto->getExtInfo(); - const FunctionProtoType *NewProto = New->getType()->getAs<FunctionProtoType>(); assert(NewProto && "Template instantiation without function prototype?"); New->setType(SemaRef.Context.getFunctionType(NewProto->getResultType(), NewProto->arg_type_begin(), NewProto->getNumArgs(), - EPI)); + NewProto->isVariadic(), + NewProto->getTypeQuals(), + Proto->hasExceptionSpec(), + Proto->hasAnyExceptionSpec(), + Exceptions.size(), + Exceptions.data(), + Proto->getExtInfo())); } SemaRef.InstantiateAttrs(TemplateArgs, Tmpl, New); |