aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorFrancois Pichet <pichet2000@gmail.com>2010-12-09 10:07:54 +0000
committerFrancois Pichet <pichet2000@gmail.com>2010-12-09 10:07:54 +0000
commit40e17752086c2c497951d64f5ac6ab5039466113 (patch)
tree892e1022b87912bfd8fd34fe12169dc6e80aa0a0 /lib/Sema/SemaTemplateInstantiateDecl.cpp
parentc66b516707a73b026cd34f3c0bfcaaf4409155c7 (diff)
Fix PR8760: IndirectFieldDecl Type was not updated during template instantiation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index e3b8cfe751..f98efec5ed 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -467,9 +467,10 @@ Decl *TemplateDeclInstantiator::VisitIndirectFieldDecl(IndirectFieldDecl *D) {
NamedChain[i++] = (SemaRef.FindInstantiatedDecl(D->getLocation(),
*PI, TemplateArgs));
+ QualType T = cast<FieldDecl>(NamedChain[i-1])->getType();
IndirectFieldDecl* IndirectField
= IndirectFieldDecl::Create(SemaRef.Context, Owner, D->getLocation(),
- D->getIdentifier(), D->getType(),
+ D->getIdentifier(), T,
NamedChain, D->getChainingSize());