aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplateInstantiateDecl.cpp
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-08-29 22:22:07 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-08-29 22:22:07 +0000
commitc5573a81a83c4173c92c7e91b01371b7223d88c4 (patch)
treed6f8b9c885e5d0ecc575581f0b9e6cfaf2577b0b /lib/Sema/SemaTemplateInstantiateDecl.cpp
parente3a97db45ac46adf963115d0266cfd3e6bc2dce8 (diff)
Make instantiating initializers for classes with a dependent base type
work correctly. The change in lib/AST/DeclCXX.cpp is mostly a large reindentation; I couldn't figure out a good way to avoid it. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@80446 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplateInstantiateDecl.cpp')
-rw-r--r--lib/Sema/SemaTemplateInstantiateDecl.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplateInstantiateDecl.cpp b/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 5978dae311..9785fb2653 100644
--- a/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -1134,9 +1134,9 @@ Sema::InstantiateMemInitializers(CXXConstructorDecl *New,
MemInitResult NewInit;
if (Init->isBaseInitializer()) {
- // FIXME: Type needs to be instantiated.
- QualType BaseType =
- Context.getCanonicalType(QualType(Init->getBaseClass(), 0));
+ QualType BaseType(Init->getBaseClass(), 0);
+ BaseType = SubstType(BaseType, TemplateArgs, Init->getSourceLocation(),
+ New->getDeclName());
NewInit = BuildBaseInitializer(BaseType,
(Expr **)NewArgs.data(),