summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-09-09 00:23:06 +0000
committerDouglas Gregor <dgregor@apple.com>2009-09-09 00:23:06 +0000
commit308047d3a5dc226ab49758253e4a2e4a69c6e43d (patch)
treee4d8442c929c01e04e8399387a8827562bfb8fc3 /clang/lib/Sema/SemaTemplate.cpp
parentc466e31309b569389d8ff267311bcae6401ba2e7 (diff)
downloadbcm5719-llvm-308047d3a5dc226ab49758253e4a2e4a69c6e43d.tar.gz
bcm5719-llvm-308047d3a5dc226ab49758253e4a2e4a69c6e43d.zip
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. llvm-svn: 81300
Diffstat (limited to 'clang/lib/Sema/SemaTemplate.cpp')
-rw-r--r--clang/lib/Sema/SemaTemplate.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/clang/lib/Sema/SemaTemplate.cpp b/clang/lib/Sema/SemaTemplate.cpp
index bc2c304ecc0..dc455185fec 100644
--- a/clang/lib/Sema/SemaTemplate.cpp
+++ b/clang/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));
OpenPOWER on IntegriCloud