diff options
author | Abramo Bagnara <abramo.bagnara@gmail.com> | 2012-01-27 09:46:47 +0000 |
---|---|---|
committer | Abramo Bagnara <abramo.bagnara@gmail.com> | 2012-01-27 09:46:47 +0000 |
commit | 7945c981b974f58c021762e77f13cd4859ac447b (patch) | |
tree | bde36b37a54a925cd44c1683bd35e4ea3d3adb47 /clang/lib/Parse/ParseDeclCXX.cpp | |
parent | fc0da1a8e095a52fba5e7d9a0a537725716ce508 (diff) | |
download | bcm5719-llvm-7945c981b974f58c021762e77f13cd4859ac447b.tar.gz bcm5719-llvm-7945c981b974f58c021762e77f13cd4859ac447b.zip |
Added source location for the template keyword in AST template-id expressions.
llvm-svn: 149127
Diffstat (limited to 'clang/lib/Parse/ParseDeclCXX.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDeclCXX.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index 92a501a8c4a..d102fb3158f 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -461,12 +461,14 @@ Decl *Parser::ParseUsingDeclaration(unsigned Context, // Parse the unqualified-id. We allow parsing of both constructor and // destructor names and allow the action module to diagnose any semantic // errors. + SourceLocation TemplateKWLoc; UnqualifiedId Name; if (ParseUnqualifiedId(SS, /*EnteringContext=*/false, /*AllowDestructorName=*/true, /*AllowConstructorName=*/true, ParsedType(), + TemplateKWLoc, Name)) { SkipUntil(tok::semi); return 0; @@ -835,8 +837,8 @@ Parser::TypeResult Parser::ParseBaseTypeSpecifier(SourceLocation &BaseLoc, TemplateName.setIdentifier(Id, IdLoc); // Parse the full template-id, then turn it into a type. - if (AnnotateTemplateIdToken(Template, TNK, SS, TemplateName, - SourceLocation(), true)) + if (AnnotateTemplateIdToken(Template, TNK, SS, SourceLocation(), + TemplateName, true)) return true; if (TNK == TNK_Dependent_template_name) AnnotateTemplateIdTokenAsType(); @@ -1692,8 +1694,10 @@ void Parser::ParseCXXClassMemberDeclaration(AccessSpecifier AS, /*EnteringContext=*/false); // Try to parse an unqualified-id. + SourceLocation TemplateKWLoc; UnqualifiedId Name; - if (ParseUnqualifiedId(SS, false, true, true, ParsedType(), Name)) { + if (ParseUnqualifiedId(SS, false, true, true, ParsedType(), + TemplateKWLoc, Name)) { SkipUntil(tok::semi); return; } |