aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaTemplate.cpp
diff options
context:
space:
mode:
authorAbramo Bagnara <abramo.bagnara@gmail.com>2010-08-06 12:11:11 +0000
committerAbramo Bagnara <abramo.bagnara@gmail.com>2010-08-06 12:11:11 +0000
commit7c15353ccaed24f2df932571166bf305c1b98b6d (patch)
tree3bec806204cab1e70ad06ffb6d15c52b0407a9bd /lib/Sema/SemaTemplate.cpp
parent91db30ad4a7bad37b57748c31f8b592b7bf7cbeb (diff)
Template keyword should not be ignored building a QualifiedTemplateName.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110441 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaTemplate.cpp')
-rw-r--r--lib/Sema/SemaTemplate.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/Sema/SemaTemplate.cpp b/lib/Sema/SemaTemplate.cpp
index 175ddf639c..1c324b8a02 100644
--- a/lib/Sema/SemaTemplate.cpp
+++ b/lib/Sema/SemaTemplate.cpp
@@ -97,6 +97,7 @@ static void FilterAcceptableTemplateNames(ASTContext &C, LookupResult &R) {
TemplateNameKind Sema::isTemplateName(Scope *S,
CXXScopeSpec &SS,
+ bool hasTemplateKeyword,
UnqualifiedId &Name,
TypeTy *ObjectTypePtr,
bool EnteringContext,
@@ -150,7 +151,8 @@ TemplateNameKind Sema::isTemplateName(Scope *S,
if (SS.isSet() && !SS.isInvalid()) {
NestedNameSpecifier *Qualifier
= static_cast<NestedNameSpecifier *>(SS.getScopeRep());
- Template = Context.getQualifiedTemplateName(Qualifier, false, TD);
+ Template = Context.getQualifiedTemplateName(Qualifier,
+ hasTemplateKeyword, TD);
} else {
Template = TemplateName(TD);
}
@@ -1681,8 +1683,8 @@ TemplateNameKind Sema::ActOnDependentTemplateName(Scope *S,
// "template" keyword is now permitted). We follow the C++0x
// rules, even in C++03 mode with a warning, retroactively applying the DR.
bool MemberOfUnknownSpecialization;
- TemplateNameKind TNK = isTemplateName(0, SS, Name, ObjectType,
- EnteringContext, Result,
+ TemplateNameKind TNK = isTemplateName(0, SS, TemplateKWLoc.isValid(), Name,
+ ObjectType, EnteringContext, Result,
MemberOfUnknownSpecialization);
if (TNK == TNK_Non_template && LookupCtx->isDependentContext() &&
isa<CXXRecordDecl>(LookupCtx) &&