aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2009-10-21 02:50:40 +0000
committerJohn McCall <rjmccall@apple.com>2009-10-21 02:50:40 +0000
commit1dc9acdb06dbd5f0a5747dd0ffa7ede680d7ca08 (patch)
treea1f33118aea725829dca4e2712b7dae0f0093e12 /lib/Sema/SemaTemplateInstantiateDecl.cpp
parent71e2bf960105daeb3b6f7005e73885b790b2a1b1 (diff)
Preserve type source information when substituting into ParmVarDecls.
Apparently I'm grinding my commit count. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@84735 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 14d8c35485..0bd4ee520c 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -774,23 +774,23 @@ Decl *TemplateDeclInstantiator::VisitCXXConversionDecl(CXXConversionDecl *D) {
}
ParmVarDecl *TemplateDeclInstantiator::VisitParmVarDecl(ParmVarDecl *D) {
- QualType OrigT = SemaRef.SubstType(D->getOriginalType(), TemplateArgs,
- D->getLocation(), D->getDeclName());
- if (OrigT.isNull())
+ DeclaratorInfo *OrigT = SemaRef.SubstType(D->DeclaratorInfo(), TemplateArgs,
+ D->getLocation(), D->getDeclName());
+ if (!OrigT)
return 0;
- QualType T = SemaRef.adjustParameterType(OrigT);
+ QualType T = SemaRef.adjustParameterType(OrigT->getType());
// Allocate the parameter
ParmVarDecl *Param = 0;
- if (T == OrigT)
+ if (T == OrigT->getType())
Param = ParmVarDecl::Create(SemaRef.Context, Owner, D->getLocation(),
- D->getIdentifier(), T, D->getDeclaratorInfo(),
+ D->getIdentifier(), T, OrigT,
D->getStorageClass(), 0);
else
Param = OriginalParmVarDecl::Create(SemaRef.Context, Owner,
D->getLocation(), D->getIdentifier(),
- T, D->getDeclaratorInfo(), OrigT,
+ T, OrigT, OrigT->getType(),
D->getStorageClass(), 0);
// Mark the default argument as being uninstantiated.