diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-09-09 00:23:06 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-09-09 00:23:06 +0000 |
commit | 3b6afbb99a1c44b4076f8e15fb7311405941b306 (patch) | |
tree | c1cd15e2e3745e95de9bb6714d84ef1f4000e39d /lib/Sema/SemaTemplate.cpp | |
parent | 7f4f86a2167abc116275e49c81350fc3225485e5 (diff) |
Initial stab at implement dependent member references to member
templates, e.g.,
x.template get<T>
We can now parse these, represent them within an UnresolvedMemberExpr
expression, then instantiate that expression node in simple cases.
This allows us to stumble through parsing LLVM's Casting.h.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r-- | lib/Sema/SemaTemplate.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp index bc2c304ecc..dc455185fe 100644 --- a/lib/Sema/SemaTemplate.cpp +++ b/lib/Sema/SemaTemplate.cpp @@ -1229,7 +1229,7 @@ Sema::ActOnMemberTemplateIdReferenceExpr(Scope *S, ExprArg Base, else if (OverloadedFunctionDecl *Ovl = Template.getAsOverloadedFunctionDecl()) Name = Ovl->getDeclName(); else - assert(false && "Cannot support dependent template names yet"); + Name = Template.getAsDependentTemplateName()->getName(); // Translate the parser's template argument list in our AST format. llvm::SmallVector<TemplateArgument, 16> TemplateArgs; @@ -1287,11 +1287,6 @@ Sema::ActOnDependentTemplateName(SourceLocation TemplateKWLoc, return Template; } - // FIXME: We need to be able to create a dependent template name with just - // an identifier, to handle the x->template f<T> case. - assert(!ObjectType && - "Cannot handle dependent template names without a nested-name-specifier"); - NestedNameSpecifier *Qualifier = static_cast<NestedNameSpecifier *>(SS.getScopeRep()); return TemplateTy::make(Context.getDependentTemplateName(Qualifier, &Name)); |